0

I have downloaded a .osm.pbf file from https://download.geofabrik.de/europe.html and need to convert the data (streets etc) to Graphs so I can calculate routes. I believe these files already work with Nodes, but have trouble reading the data.

I tried using https://www.osmsharp.com/ but don't really understand the software.

Can someone give me links to a proper library or give me a few tips in how to access the data from the OSM. Some pseudo / example code is fine as well.

Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
Dubb
  • 423
  • 1
  • 7
  • 21

1 Answers1

1

I suggest to play around with OSM XML first to get an idea about how OSM data works. It is also very helpful to launch an OSM editor (e.g. the browser editor iD or the standalone editor JOSM) to take a look at real OSM data.

Later you can read about the PBF format (it is mainly smaller and faster than OSM XML) and about PBF software support. Use one of the existing libraries, don't try to reinvent the wheel.

Also read about how to calculate a routing graph from OSM data. Also look at routing in the OSM wiki. There is some general information available as well as a list of online and offline routers. If you are stuck you can take a look at their implementations.

scai
  • 20,297
  • 4
  • 56
  • 72