Skip to content

Rjf/omf csv mapping source#158

Closed
robfitzgerald wants to merge 3 commits into
mainfrom
rjf/omf-csv-mapping-source
Closed

Rjf/omf csv mapping source#158
robfitzgerald wants to merge 3 commits into
mainfrom
rjf/omf-csv-mapping-source

Conversation

@robfitzgerald

@robfitzgerald robfitzgerald commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

this PR introduces an alternative means to load an OvertureMaps Places mapping. these mappings can be quite long - there are over 2000 OvertureMaps categories total - and so expressing that directly within a bambam config file is noisy. this PR allows the user to alternatively define a CSV source for category mapping:

[plugin.output_plugins.model.models.opportunity_source.places_activity_mapping]
places_mapping_input_file = "mapping.csv"
places_category_column = "omf_label"
mep_category_column = "mep_labels"
mep_category_separator = "-"  # sep to use when more than one MEP label is produced

testing

  1. unpack and copy these files into the base of the bambam repo:

omf-csv-test-assets.zip

overture-to-mep.csv
test_denver_omf.toml
  1. run bambam:
% cargo build -r --manifest-path rust/Cargo.toml
% RUST_LOG=info ./rust/target/release/bambam -c test_denver_omf.toml -q query/denver_extent.json
  1. a JSON and CSV output should appear with no errors logged to console or into the file contents, and the opportunities counted for each grid cell/mode/timebin come from OvertureMaps categories mapped to MEP categories as defined in teh overture-to-mep.csv file instance.

@robfitzgerald
robfitzgerald requested a review from admrtin July 8, 2026 20:54
@admrtin

admrtin commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

@robfitzgerald after copying the files into my repo, checking out this branch, and running the build command and bambam command, I received the following error:

[2026-07-09T06:30:10Z ERROR routee_compass::app::cli::run] Could not build CompassApp from config file: failure running output plugin: failure running plugin: Error during overturemaps collection: Group Mapping operation Failed: Group services was not found in mapping
[2026-07-09T06:30:10Z ERROR bambam] failure running output plugin: failure running plugin: Error during overturemaps collection: Group Mapping operation Failed: Group services was not found in mapping

The error message comes from the reverse_map method on TaxonomyModel, in rust/bambam-omf/src/collection/taxonomy/taxonomy_model.rs

@admrtin admrtin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some errors were output due to the "service" omf group (see above). Don't know if this was expected.

@robfitzgerald

Copy link
Copy Markdown
Collaborator Author

these code changes appear as part of PR #159.

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

Successfully merging this pull request may close these issues.

2 participants