I have about 50,000 linestrings in PostGIS. They represent routes along roads. But I want them to be (roughly) pavements (aka sidewalks) instead. So I need to move all the lines 3 metres to the left of the direction they are travelling.
I found this function:
http://postgis.net/docs/ST_OffsetCurve.html
And tried to implement it, however some of my lines are self crossing, and thus it doesn't work. I think that this is reason anyway. An error I get it:
"ERROR: GEOSOffsetCurve: IllegalArgumentException: Cannot get offset of single-vertex line"
I presume that this is becase there are some straight lines aswell as curves. So I need to cope with this.
Also, when I try to store these, sometimes it says that the result of st_offsetcurve has created a multi-string - though I'm not sure why?
Does anyone know of how I could do this please?
Thanks
James
أكثر...
I found this function:
http://postgis.net/docs/ST_OffsetCurve.html
And tried to implement it, however some of my lines are self crossing, and thus it doesn't work. I think that this is reason anyway. An error I get it:
"ERROR: GEOSOffsetCurve: IllegalArgumentException: Cannot get offset of single-vertex line"
I presume that this is becase there are some straight lines aswell as curves. So I need to cope with this.
Also, when I try to store these, sometimes it says that the result of st_offsetcurve has created a multi-string - though I'm not sure why?
Does anyone know of how I could do this please?
Thanks
James
أكثر...