[postgis-users] Finding the center of a street

Nelson Correia nelsonwc7 at hotmail.com
Thu Jul 16 03:21:30 PDT 2009




Hi all,
 
I have a database of streets, wich is composed by multilinestring segments. I want to find the centre of the street (i.e. the point that is in the middle and contained in the street geometry) and not the centroid (which may not be in the street).
 
I can do this with linemerge (to obtain a linestring instead of a multilinestring) and then use the st_line_interpolate_point to calculate the middle point.
 
The problem is with streets that have T junctions in the middle or that are composed by non-contiguous sections, for what I can't find a way to obtain a linestring to calculate the middle point.
 
Anyone had a similar problem or know a solution to this problem?
 
Thanks in advance!
 
Nelson


_________________________________________________________________
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20090716/e2fc505a/attachment.html>


More information about the postgis-users mailing list