[postgis-users] Scale without translate?

Bruce Rindahl rindahl at lrcwe.com
Thu May 17 15:03:04 PDT 2007


Don't know.  How many times will you do this or how large is the table?  If
it will be an issue then you may want to play with this a bit by loading the
centroid coordinates into a scratch table and the calling the function below
with those values.
Bruce

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Rob Agar
Sent: Thursday, May 17, 2007 4:00 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Scale without translate?

Bruce Rindahl wrote:
> SELECT translate(
> scale(
> translate(the_geom,-x(centroid(the_geom)),-y(centroid(the_geom)))
> ,myScale)
> ,x(centroid(the_geom)),y(centroid(the_geom)))

on a side point, is the postgresql optimizer smart enough not to call 
centroid() four times in this case?

Rob
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users






More information about the postgis-users mailing list