osm2pgrouting icon indicating copy to clipboard operation
osm2pgrouting copied to clipboard

Too many edges

Open tygrysio opened this issue 3 years ago • 4 comments

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

<osm version="0.6" generator="CGImap 0.8.5 (282149 spike-07.openstreetmap.org)" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/"> <way id="829873237" visible="true" version="1" changeset="88476252" timestamp="2020-07-24T21:22:59Z" user="diverpl" uid="603523"> <nd ref="1648910558"/> <nd ref="7152402421"/> <nd ref="7152402418"/> <nd ref="7152402419"/> <nd ref="7152402417"/> <nd ref="7152402420"/> <nd ref="7152402414"/> <nd ref="7152402416"/> <nd ref="7152402415"/> <nd ref="4519628705"/> <nd ref="7152402413"/> <nd ref="1648910477"/> <nd ref="7152402412"/> <nd ref="4519628707"/> <nd ref="7152402411"/> <nd ref="4519628706"/> <nd ref="7152402409"/> <nd ref="1648910450"/> <nd ref="7152402410"/> <nd ref="4519628704"/> <nd ref="7152402408"/> <nd ref="4519628703"/> <nd ref="7152402407"/> <nd ref="1648910441"/> <nd ref="7152402405"/> <nd ref="4519628702"/> <nd ref="7152402406"/> <nd ref="4519628701"/> <nd ref="7152402404"/> <nd ref="4519628700"/> <nd ref="7152402403"/> <nd ref="1648910429"/> <nd ref="7152402402"/> <nd ref="4519628699"/> <nd ref="1648910398"/> <nd ref="4519628694"/> <nd ref="4519628698"/> <nd ref="4519628697"/> <nd ref="1648910392"/> <nd ref="4519628695"/> <nd ref="7152402401"/> <nd ref="4519628696"/> <nd ref="7152402396"/> <nd ref="7152402397"/> <nd ref="7152402395"/> <nd ref="7152402398"/> <nd ref="7152402394"/> <nd ref="7152402399"/> <nd ref="7152402393"/> <nd ref="7152402400"/> <nd ref="1648910389"/> <tag k="access" v="no"/> <tag k="bus" v="yes"/> <tag k="highway" v="service"/> <tag k="oneway" v="yes"/> </way> </osm>

tygrysio avatar Sep 28 '21 09:09 tygrysio

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.

tygrysio avatar Sep 28 '21 11:09 tygrysio

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?

cvvergara avatar Oct 07 '21 14:10 cvvergara

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.

tygrysio avatar Oct 08 '21 06:10 tygrysio

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

cvvergara avatar Oct 08 '21 19:10 cvvergara