[postgis-users] Move road lines to pavement lines?
Hugues François
hugues.francois at irstea.fr
Fri Oct 25 09:25:47 PDT 2013
Hello,
Did you take a look et st_offsetcurve ? The documentation says: " For positive distance the offset will be at the left side of the input line and retain the same direction."
Hug
James David Smith <james.david.smith at gmail.com> a écrit :
Hi there,
Just looking for some general thoughts and guidance on the best way to
do this please. What I have is about 50,000 linestrings of varying
length. They are in a projected coordinate system (OSGB36). They
represent people walking around a city. The routing however has been
done as road centrelines. So what I would like to do, is to move each
line 3 metres to the left so that it gives a better representation of
where they actually walked. I realise this is very inexact, but it
will do for my purposes.
So does anyone have any thoughts about how to do this? Obviously
'left' is a relative term as it will depend on the direction of
travel.
I think maybe I need to break apart the linestring into collections of
two points. XY_start and XY_end. Then calculate the angle between
them. The add or subtract 3 metres onto one of the sets of coordinates
in one direction, depending on what the result of the angle
calculation was. Once I've done this, I could then recombine all the
sets of points back into linestrings. Does this sound like a
reasonable approach? (Whether I'll actually be able to do it or not is
another thing).
Thanks
James
_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list