[postgis-users] Shifting linestrings left

pcreso at pcreso.com pcreso at pcreso.com
Wed Dec 22 19:07:14 PST 2010


Hey Ben...

Seasons greetings!!

You have a couple of options:

ST_Translate() is the simplest, but if your lines are horizontal you may want a Y shift as well?

http://postgis.refractions.net/documentation/manual-svn/ST_Translate.html


Having done this, I suggest you also use ST_reverse() to reflect the direction is now going the other way (unless it already is :-)
http://postgis.refractions.net/documentation/manual-svn/ST_Reverse.html


Cheers,

  Brent

For more complex shifting of features, probably overkill in your case, see
http://postgis.refractions.net/documentation/manual-svn/ST_Affine.html
--- On Thu, 12/23/10, Ben Madin <lists at remoteinformation.com.au> wrote:

From: Ben Madin <lists at remoteinformation.com.au>
Subject: [postgis-users] Shifting linestrings left
To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
Date: Thursday, December 23, 2010, 3:13 PM

G'day all,

I have a problem where I am trying to show the route of livestock movements, but I am loosing information when the travel along the same road in different directions (ie in some cases they travel from a saleyard to a feedlot, then back to the saleyard after a period). The roads they travel along are single linestrings.

Is there a way to 'shift' the linestring to the left - after all, that would be sensible side of the road to drive on...

cheers

Ben


_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20101222/999a65b9/attachment.html>


More information about the postgis-users mailing list