[postgis-users] break road linestrings intelligently

Richard Greenwood richard.greenwood at gmail.com
Tue Sep 25 18:43:10 PDT 2012


I have a table of linestrings representing road centerlines. The
linestrings have the common "from" and "to" address min/max values.
But the linestrings are not broken at all of the intersecting streets.
So I need to break the linestrings at all intersections, but I need to
populate the "from" and "to" values appropriately in the new
linestrings. The addressing is based on line length. So I might start
with a linestring that goes from 100 to 500 and has two intersecting
streets. I break the original linestring into 3 new linestrings, but
how do I populate the "from" and "to" values? If I know the order of
the 3 new linestrings it would be very easy to calculate the new
values based on the length of each new linestring, eg. line #1
100-240, line#2 241-385, line #3 386-500 or some such thing.

It seems like something that topology should help with, but I'm not
sure where to start. Sorry if I haven't clearly defined my problem.
Any suggestions are appreciated.

Rich

-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com



More information about the postgis-users mailing list