pgRouting / osm2pgrouting

Import tool for OpenStreetMap data to pgRouting database
https://pgrouting.org
GNU General Public License v2.0
286 stars 113 forks source link

Too many edges #297

Open tygrysio opened 2 years ago

tygrysio commented 2 years ago

Fedora 34. pgRouting-3.2.1. osm2pgrouting-2.3.8

When it imports the data for that area. https://www.openstreetmap.org/#map=19/53.43298/14.54038 It gets something like this.

placSzarychSzeregów

` `
tygrysio commented 2 years ago

Perhaps the problem stems from the fact that the road follows the same trail as the tramline. I think when the paths coincide, each node generates an intersection point. Maybe it can be detected and eliminated somehow.

cvvergara commented 2 years ago

When you mention "It gets something like this." the map shows only nodes and the data is osm data. A curved line geometry is made out of many nodes. I do not know which table you are showing on your image, but the nodes that belong to intersections are on table ways_vertices_pgr does the image of nodes come from that table?

tygrysio commented 2 years ago

Yes. Circles are nodes in the ways_vertices_pgr table. I used the map image to see it better.

I solved the problem with osmfilter. I have noticed that osm2pgrouting generates nodes when a road crosses railroads, pedestrian crossings and cycle routes. You can get rid of it by using an osmfilter .

There are also vertices whose origin I don't understand. Maybe they are the outlines of intersections or roads. However, I cannot get rid of them.

cvvergara commented 2 years ago

Roads are segmented like with speed bumps, stop signs, pedestrian crossings, etc