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 <[email protected]>: > > 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 > [email protected] > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
_______________________________________________ postgis-users mailing list [email protected] http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
