[postgis-devel] [PostGIS] #381: Add an optional parameter to ST_Scale to specify the anchor point
PostGIS
trac at osgeo.org
Tue Jan 10 20:05:08 PST 2012
#381: Add an optional parameter to ST_Scale to specify the anchor point
-------------------------+--------------------------------------------------
Reporter: kneufeld | Owner: kneufeld
Type: enhancement | Status: new
Priority: low | Milestone: PostGIS 2.1.0
Component: postgis | Version: trunk
Keywords: |
-------------------------+--------------------------------------------------
Comment(by mwtoews):
For CAD systems, you need to specify a point of origin, not just midpoint
or corner. A similar enhancement for ST_Rotate (#1251) could also be
adapted for ST_Scale to provide:
{{{
ST_Scale (geometry geomA, float XFactor, float YFactor, [float ZFactor,]
geometry pointOrigin);
}}}
then a user could do, for example:
{{{
-- Scale down feet to metres from the top left corner
SELECT ST_Scale(geom, 0.3048, 0.3048, ST_MakePoint(ST_XMin(geom),
ST_YMax(geom)));
-- Scale up by 2x from centre
SELECT ST_Scale(geom, 2.0, 2.0, ST_Centroid(geom));
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/381#comment:3>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list