Skip to content

Add current-schema OpenStreetMap network exporter and docs - #108

Closed
Xuan-1998 with Copilot wants to merge 2 commits into
multi-gpu-multimodefrom
copilot/test-if-pr-107-solves-issue
Closed

Xuan-1998 with Copilot wants to merge 2 commits into
multi-gpu-multimodefrom
copilot/test-if-pr-107-solves-issue

Conversation

Copilot AI commented Aug 8, 2026 •

Copy link
Copy Markdown

Issue: existing OSM extraction notebooks produced legacy CSVs (no node index, OSM IDs in u/v, legacy OD headers), which made custom map generation for current LPSim workflows manual and error-prone. This PR adds a direct path from OSM/GraphML to the current schema consumed by routing/simulation tools.

  • New OSM export CLI (tools/generate_network.py)

    • Supports --place, --bbox, or offline --graphml input.
    • Writes nodes.csv with index and edges.csv with sequential u,v plus preserved osmid_u,osmid_v.
    • Normalizes missing/heterogeneous OSM attributes (lanes/speed), drops unusable edges, and deterministically resolves parallel edges.
  • Packaging + entrypoint updates (pyproject.toml)

    • Adds optional dependency group: network = ["networkx>=3.1", "osmnx>=2.0,<3"].
    • Adds script entrypoint: lpsim-network.
    • Includes networkx in dev extras for generator tests.
  • User-facing documentation (README.md)

    • Adds a “Generate a Custom OpenStreetMap Network” section with online and offline usage patterns.
    • Documents that output matches current LPSim CSV expectations.
  • Focused coverage (tests/test_generate_network.py)

    • Verifies exact output schema, dense IDs, strong-component selection, deterministic output, and compatibility with existing demand/partition tooling.
pip install -e ".[network]"
python3 tools/generate_network.py \
  --place "Berkeley, California, USA" \
  --output data/networks/berkeley

Copilot AI linked an issue Aug 8, 2026 that may be closed by this pull request
@Xuan-1998
Xuan-1998 requested a lite review from Copilot August 8, 2026 00:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Xuan-1998 <58761221+Xuan-1998@users.noreply.github.com>
Copilot AI changed the title [WIP] Test if recent map generation script solves issue for OSM extraction Add current-schema OpenStreetMap network exporter and docs Aug 8, 2026
Copilot AI requested a review from Xuan-1998 August 8, 2026 00:37
@Xuan-1998 Xuan-1998 closed this Aug 23, 2026
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.

Recent map generation script for OSM extraction?

3 participants