data (#23) - many many questions… (#315) - Message List

many many questions…

Hi folks,

I've got some (more) questions. Before I start, I hope this is the right place to post this stuff and ... I'm german, so apolagize my bad english. bla. Some history: I spent lots of nights beside my intrinsic job to run my virtual car through the streets of Hamburg. One of the major problems was and still is that I'm running Windows instead of Linux. So osm2pgrouting was not part of my toolbox. I found out, that meanwhile the shape files from the geofabrik are of quite good quality so I decided to give my routing attempts a second chance. I'm still using the old version of 2007/2008 (postgres, postgis, pgrouting) but am wondering about some annoying issues:

1) assign_vertex_id only seems to be able to handle srid -1 in combination with MULTILINESTRINGs. Any attempt to use LINESTRINGs failed. I was forced to modify the proc to handle srid 4326. Is this fixed in the latest versions?

2) as I've never got the chance to see results from osm2pgrouting (no .. I don't want to bother my machine with any kind of VM) can you tell me what the major differences / advantages are? As I mentioned before, got quite goot results with the shapes from Geofabrik.

3) I've seen here some higher versions of pgrouting for Windows but was wondering why they are ten times bigger than the those from the 1.0-Version.

4) This is my most important question: Many OSM-streets are made of many vertices. (MULTI-)LINESTRING But if another street crosses, this cannot be routed except the crossing is at the start- or enpoints. e.g.

 * (1)
 |
 * (2)
 | \
 |  \
 |   \
 *----*------*
 (3)  (4)    (5)

Street 1: (1),(2),(3),(4),(5)

Street 2: (2),(4)

If you run shortest_path street 1 will never be chosen, because it does not crosses points (1) and (5). So my question is: Is there any script that handles segments of streets? Or is there a postres-funtion that can fix this problem? e.g. split these kind of graph into more segments?

Regards

PIMapper

  • Message #1233

    Correction: Street 2 will never be chosen. - Sorry for that mistake.

    • Message #1234

      Here you can see the OSM-Problem:

      GREEN POINTS: calculated with assign_vertex_id

      RED POINTS: my own postgis-layer showing those crossings that are neither startpoints nor endpoints.

      http://www2.pic-upload.de/29.11.09/osrmu74wn2o.png

      • Message #1255

        Hello,

        You are using really ancient version of pgRouting indeed. What you can do is to check out the newest version from SVN and try to replace your old SQL files with newer ones.

        The new version of assign_vertex_id reads SRID value from geometry_columns table and you can specify snapping distance value in your projection units.

        Sorry for the late response.

        Anton.

    • Message #1262

      Hello Anton,

      yes, I've already figured out that there's a new interface for assign_vertex_id. But this is not my major problem anymore. My very problem is to detect the real topology. Without those missing crossings in the graphics above (red points). In the meantime I wrote some posgres/gis-functions to correct this data. I also wrote a new assign_vertex_id for my case. The original one operates on geoms with a distance. This is much too slow and in case of OSM-Data, not necessary. My function takes about 3 minutes too calculate the city of Hamburg. (about 15000 records) It is divided into 3 steps: 1) Splitting the original into two-points-line-segments, 2) decting crossings, start-end-points, and pure vertices 3) rearranging these infos into new geoms und building the topo on x-y-equality. (I don't use assign_vertex_id anymore, instead I operate on simple x-y-double - this is much faster) But for calculating a bigger area (e.g. complete germany) this is not a good approach either - except you are the proud owner of a monster-computer. So I'm still looking for a good program that can handle data in the range of 10 Mio-100 Mio records. Best choice: Java, because it runs everywhere.