[postgis-users] Line intersects
Rémi Cura
remi.cura at gmail.com
Sat Oct 11 04:37:18 PDT 2014
Hey,
seems like a typical job for postgis topology...
Build your topology using AddLinestring
<http://postgis.net/docs/TopoGeo_AddLineString.html>
Then you have easy access to shared part, intersection & so.
Cheers,
Rémi-C
2014-10-10 23:45 GMT+02:00 Zenon Panoussis <oracle at provocation.net>:
>
> Hello everyone
>
> I have a number of OSRM routes and I'm looking for a way to find
> intersections between them and order them by the length of the line
> between intersections. Say for example that I have the following:
>
> A: Brussels - Aachen - Köln - Montabaur - Frankfurt a.M. - Fulda.
> B: Eindhoven - Venlo - Koblenz - Mainz - Aschaffenburg.
> C: Venlo - Köln - Montabaur - Wiesbaden.
> D: Tilburg - Eindhoven - Venlo - Koblenz - Mainz - Aschaffenburg -
> Würzburg.
> E: Maastricht - Venlo -Duisburg - (ehum, Bielefeld) - Hannover.
>
> A to D intersect each-other at more than one point, so each one
> of them can substitute the others for part of the way. E does not
> intersect A and intersects B, C and D at one single point, so it
> cannot substitute any of them. B and D overlap exactly part of the
> way, so D can substitute B completely while B can only substitute
> D partially.
>
> What I need to do is to test all of them against all other and come
> up with those that can replace the shortest or the longest stretch
> of the route that they are being matched against.
>
> The raw data is a GPX of edge points like
> <rtept lat="38.895080" lon="22.435042"></rtept>
> <rtept lat="38.894685" lon="22.434856"></rtept>
>
> Can anyone suggest an efficient way to do this kind of matching?
>
> Z
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20141011/9612fd47/attachment.html>
More information about the postgis-users
mailing list