Apply a 3D/2D affine transformation to the given geometry.
x = a * x + b * y + c * z + xOff | x = a * x + b * y + xOff
y = d * x + e * y + f * z + yOff | y = d * x + e * y + yOff
z = g * x + h * y + i * z + zOff
The 3D form is used only when c, f, g, h, i and zOff are all given.
SQL reference: ST_Affine
Signature
Parameters
Geometry to apply affine transformation to
a Union[ColumnOrName, float]
required
Coefficient of x in the new x value.
b Union[ColumnOrName, float]
required
Coefficient of y in the new x value.
d Union[ColumnOrName, float]
required
Coefficient of x in the new y value.
e Union[ColumnOrName, float]
required
Coefficient of y in the new y value.
xOff Union[ColumnOrName, float]
required
Offset added to the new x value.
yOff Union[ColumnOrName, float]
required
Offset added to the new y value.
c Optional[Union[ColumnOrName, float]]
default: "None"
Coefficient of z in the new x value. Default 0.0
f Optional[Union[ColumnOrName, float]]
default: "None"
Coefficient of z in the new y value. Default 0.0
g Optional[Union[ColumnOrName, float]]
default: "None"
Coefficient of x in the new z value. Default 0.0
h Optional[Union[ColumnOrName, float]]
default: "None"
Coefficient of y in the new z value. Default 0.0
i Optional[Union[ColumnOrName, float]]
default: "None"
Coefficient of z in the new z value. Default 0.0
zOff Optional[Union[ColumnOrName, float]]
default: "None"
Offset added to the new z value. Default 0.0
Returns
Geometry with affine transformation applied