AequilibraE / aequilibrae

aequilibrae - Python package for transportation modeling

Home Page:https://www.aequilibrae.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Importing OSM networks from PBF files directly.

pedrocamargo opened this issue · comments

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.