skew#

GeosSeriesAccessor.skew(*angles, origin=None)#

Performs a 2D or 3D skew/shear transformation on all the coordinates.

2D
\[\begin{split}\begin{bmatrix} x' \\ y' \\ 1 \end{bmatrix} &= \begin{bmatrix} 1 & a_{xy} & x_{off} \\ a_{yx} & 1 & y_{off} \\ 0 & 0 & 1 \\ \end{bmatrix} \begin{bmatrix} x \\ y \\ 1 \end{bmatrix} \\ x_{off} &= -(y_{origin}*a_{xy}) \\ y_{off} &= -(x_{origin}*a_{yx})\end{split}\]
3D
\[\begin{split}\begin{bmatrix} x' \\ y' \\ z' \\ 1 \end{bmatrix} &= \begin{bmatrix} 1 & a_{xy} & a_{xz} & x_{off} \\ a_{yx} & 1 & a_{yz} & y_{off} \\ a_{zx} & a_{zy} & 1 & z_{off} \\ 0 & 0 & 0 & 1 \\ \end{bmatrix} \begin{bmatrix} x \\ y \\ z \\ 1 \end{bmatrix} \\ x_{off} &= -(y_{origin}*a_{xy} + z_{origin}*a_{xz}) \\ y_{off} &= -(x_{origin}*a_{yx} + z_{origin}*a_{yz}) \\ z_{off} &= -(x_{origin}*a_{zx} + y_{origin}*a_{zy})\end{split}\]
Parameters:
  • angles (float) – skewing angles (2D: [x, y] ; 3D: [xy, xz, yx, yz, zx, zy])

  • origin (shapely.lib.Geometry or list-like) – Origin point for the transformation.

Returns:

Transformed geometries.

Return type:

pandas.Series