Skip to content

OMF Import - Generate TOML config file + metadata output for BAMBAM #96

@robfitzgerald

Description

@robfitzgerald

bambam-config.toml

in order to make OMF-sourced networks available to BAMBAM for routing, we need to generate the TOML config that points to all of the downloaded files.

during omf import, we generate outputs in some output_directory as

output_directory/
  bike/
    edges-bearings-enumerated.txt.gz
    edges-classes-enumerated.txt.gz
    edges-classes-speed-mapping.csv.gz
    edges-compass.csv.gz
    edges-geometries-enumerated.txt.gz
    edges-speeds-mph-enumerated.txt.gz
  drive/
    edges-bearings-enumerated.txt.gz
    edges-classes-enumerated.txt.gz
    edges-classes-speed-mapping.csv.gz
    edges-compass.csv.gz
    edges-geometries-enumerated.txt.gz
    edges-speeds-mph-enumerated.txt.gz
  omf-raw.json # optional raw dataset
  vertices-compass.csv.gz
  walk/
    edges-bearings-enumerated.txt.gz
    edges-classes-enumerated.txt.gz
    edges-classes-speed-mapping.csv.gz
    edges-compass.csv.gz
    edges-geometries-enumerated.txt.gz
    edges-speeds-mph-enumerated.txt.gz

we need to place a bambam-config.toml file at output_directory/bambam-config.toml which

  • uses a default configuration file stored in the repository in an obvious location
  • overwrites fields based on the expected directory paths

metadata.toml (or json, yaml?)

for data provenance and scientific writing we need to store metadata and statistics about an import. using this example to illustrate some goals:

source:
  study-region: "My Region" # request a name from the CLI
  download-date: "YYYYMMDD hh:mm:ss+z"
  bbox: 1.2,3.4,5.6,7.8 # xmin,xmax,ymin,ymax

stats:
  vertices: 12345678 # len(vertices)
  edgelists:
    bike:
      edges: 1234778 # len(edges)
      miles: 50.1235 # sum of edge distances as miles
      road-classes: # count of edges by fully-qualified class
        road-primary: 10236
        ...
      speeds: # insert each k/v pair from edges-classes-speed-mapping.csv.gz (speeds by fully-qualified class)
        road-primary: 34.92927134962
        ...

Sub-issues

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions