Opened 10 years ago
Last modified 6 years ago
#687 new enhancement
Affine transformation functions
Reported by: | Mike Taves | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | GEOS Fund Me |
Component: | Default | Version: | |
Severity: | Feature Request | Keywords: | |
Cc: | mloskot |
Description
This is a feature request to apply a 2D or 3D affine transformation to a geometry. The routine should ideally be applied in-place, only changing the values of the vertices.
There are several implementations of the affine transform, including shapely.affinity and PostGIS (e.g. here and here).
Derived functions, such as "rotate", "scale", "transform" and "skew" can be build by client applications by assembling the appropriate matrix parameters. As for the function signature, I think the best approach would be to keep the same matrix order of [a, b, d, e, xoff, yoff]
for 2D and [a, b, c, d, e, f, g, h, i, xoff, yoff, zoff]
for 3D. Whether or not these should be fed into a single function as either a 6 or 12-length double array, or as two functions with fixed arguments is debatable.
Change History (5)
comment:1 by , 10 years ago
comment:2 by , 9 years ago
This might help QGIS handling of rotation: http://hub.qgis.org/issues/11814
comment:3 by , 7 years ago
Cc: | added |
---|
comment:4 by , 7 years ago
@mwtoews Grab JTS sources and start scratching re-write of their AffineTransformationBuilder
from Java to C++
https://gist.github.com/guziy/1356654/75434783be64cd35a72d540ec244d8de4d13554d
Submit a patch against trunk, even if half-baked implementation then we can continue improving it.
And of course there is a JTS AffineTransformation Class, which seems the ideal way to define how this should be defined in GEOS.