scale#
- GeosSeriesAccessor.scale(x, y, z=None, *, origin=None)#
Performs a 2D or 3D scaling on all the coordinates.
- 2D
- \[\begin{split}\begin{bmatrix} x' \\ y' \\ 1 \end{bmatrix} &= \begin{bmatrix} x_s & 0 & x_{off} \\ 0 & y_s & y_{off} \\ 0 & 0 & 1 \\ \end{bmatrix} \begin{bmatrix} x \\ y \\ 1 \end{bmatrix} \\ x_{off} &= x_{origin} - x_{origin}*x_s \\ y_{off} &= y_{origin} - y_{origin}*y_s\end{split}\]
- 3D
- \[\begin{split}\begin{bmatrix} x' \\ y' \\ z' \\ 1 \end{bmatrix} &= \begin{bmatrix} x_s & 0 & 0 & x_{off} \\ 0 & y_s & 0 & y_{off} \\ 0 & 0 & z_s & z_{off} \\ 0 & 0 & 0 & 1 \\ \end{bmatrix} \begin{bmatrix} x \\ y \\ z \\ 1 \end{bmatrix} \\ x_{off} &= x_{origin} - x_{origin}*x_s \\ y_{off} &= y_{origin} - y_{origin}*y_s \\ z_{off} &= z_{origin} - z_{origin}*z_s\end{split}\]
- Parameters:
- Returns:
Transformed geometries.
- Return type: