[geos-devel] [GEOS] #687: Affine transformation functions

GEOS geos-trac at osgeo.org
Sun Mar 16 14:55:15 PDT 2014


#687: Affine transformation functions
-----------------------------+----------------------------------------------
 Reporter:  mwtoews          |       Owner:  geos-devel@…              
     Type:  enhancement      |      Status:  new                       
 Priority:  major            |   Milestone:  GEOS Future               
Component:  Default          |     Version:                            
 Severity:  Feature Request  |    Keywords:                            
-----------------------------+----------------------------------------------
 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
 [https://github.com/Toblerity/Shapely/blob/master/shapely/affinity.py#L8
 shapely.affinity] and PostGIS (e.g.
 [http://trac.osgeo.org/postgis/browser/trunk/liblwgeom/ptarray.c#L1670
 here] and
 [http://trac.osgeo.org/postgis/browser/trunk/postgis/lwgeom_functions_basic.c#L2532
 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.

-- 
Ticket URL: <http://trac.osgeo.org/geos/ticket/687>
GEOS <http://geos.refractions.net/>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).


More information about the geos-devel mailing list