[postgis-users] Finding the center of a street

Luigi Castro Cardeles luigi.cardeles at gmail.com
Fri Jul 17 21:51:58 PDT 2009


Hi Nelson,

i don't understand the problem with the T junctions but with the
non-contiguous sections you could create a contiguous linestring and use
that to find the middle point but you may get middle points that don't
intersects with then. Is this a problem?

[]'s
Luigi Castro Cardeles


2009/7/16 Nelson Correia <nelsonwc7 at hotmail.com>

>  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
>
>
> ------------------------------
> check out the rest of the Windows Live™. More than mail–Windows Live™ goes
> way beyond your inbox. More than messages<http://www.microsoft.com/windows/windowslive/>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20090718/d15c06e2/attachment.html>


More information about the postgis-users mailing list