Add functionality to create centroids and centroid connector to model network#478
Draft
lmz wants to merge 251 commits into
Draft
Add functionality to create centroids and centroid connector to model network#478lmz wants to merge 251 commits into
lmz wants to merge 251 commits into
Conversation
Moving API detail to API_*.md
- Fix TypeError 'Series object is not callable' in match_bus_stops_to_roadway_nodes (missing & operator, extra parens treating boolean Series as a function call) - Fix unhashable type error in add_additional_data_to_stops by converting Categorical route_type column to int before groupby aggregation - Relax TripsTable.shape_id to nullable=True (shape_id is optional per GTFS spec) - Add Union import to io_table.py Not centroid-branch related; applies to any use of transit network creation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds end-to-end support for creating centroids and centroid connectors in a model network, including the core APIs, geometry/link generation logic, and tests/documentation updates needed to use and validate the workflow.
What this PR does
This PR introduces functionality to build model-zone access structures by generating:
Key changes
Why this change is needed
Many demand and assignment workflows require zone-level connectors to represent how trips enter/exit the physical network. This PR provides a native, repeatable way to generate those structures directly in network_wrangler, reducing manual preprocessing and ensuring consistent connector generation behavior.
Implementation notes
Centroid generation and connector generation are implemented as explicit network-building operations so they can be run as part of a reproducible wrangling pipeline.
Connector creation is based on proximity/eligibility rules to attach centroids to nearby nodes.
The new functionality is intended to be configurable for model-specific connector policies.
Testing
Limitations / follow-ups
Connector selection policies may still need tuning for specific model conventions (e.g., max connectors per zone, facility/type filtering, directional behavior).
Future enhancements can expand configurability and performance for very large zone sets.