Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing OSM networks from PBF files directly. #350

Open
pedrocamargo opened this issue Oct 21, 2022 · 0 comments
Open

Importing OSM networks from PBF files directly. #350

pedrocamargo opened this issue Oct 21, 2022 · 0 comments

Comments

@pedrocamargo
Copy link
Contributor

pedrocamargo commented Oct 21, 2022

OSM imports are currently a bit slow through the API, so speeding them up would be desirable.

There are two ways of doing this:

  1. Introducing the read from OSM files as an alternative to going through the API (the osmium package)
  2. Using a different OSM importer into a known format (OSM2GMNS)
  3. Do nothing and just change how we deal with triggers

The first option has not been explored yet, but the second alternative is very simple:

import osm2gmns as og

net = og.getNetFromFile("D:\south-africa-latest.osm.pbf")

og.outputNetToCSV(net, output_folder="D:/wb")

The result (links and nodes) can be imported directly into the project file.

Dealing with triggers means checking whether we can remove all triggers from the network before inserting links and nodes and then adding the triggers again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant