Hi Hug, Thanks for your email. I did not realise that the st_offsetcurve function existed! It looks like it will do what I would like to do. However there is a problem. In the documentation for st_offsetcurve here:
http://postgis.refractions.net/docs/ST_OffsetCurve.html It says that lines like this are not valid: http://i.stack.imgur.com/bCUjt.png However some of the journeys along roads that I want to adjust DO have this sort of format to the line. Any ideas? Thanks James On 25 October 2013 17:25, Hugues François <[email protected]> wrote: > 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 <[email protected]> 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 > [email protected] > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users > _______________________________________________ > postgis-users mailing list > [email protected] > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users _______________________________________________ postgis-users mailing list [email protected] http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
