-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sub network/schedule #103
Sub network/schedule #103
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
@@ -420,6 +420,10 @@ def links_on_spatial_condition(self, region_input, how='intersect'): | |||
the tokens string copied using http://s2.sidewalklabs.com/regioncoverer/ | |||
e.g. '89c25985,89c25987,89c2598c,89c25994,89c25999ffc,89c2599b,89c259ec,89c259f4,89c25a1c,89c25a24' | |||
- shapely.geometry object, e.g. Polygon or a shapely.geometry.GeometryCollection of such objects | |||
:param how: | |||
- 'intersect' default, will return IDs of the Services whose at least one Stop intersects the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, I can see use cases for both types selection
""" | ||
logging.info('Subsetting a Network will likely result in a disconnected network graph. A cleaner will be ran ' | ||
'that will remove links to make the resulting Network strongly connected for modes: ' | ||
'car, walk, bike.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be parametrised for future compatibility? Perhaps not, as car, walk, bike is fairly standard and I can't think of any non PT modes we may introduce in the future. I suppose networks for scooters etc is technically possible.
Subset a Network object using a spatial bound | ||
:param region_input: | ||
- path to a geojson file, can have multiple features | ||
- string with comma separated hex tokens of Google's S2 geometry, a region can be covered with cells and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely to see so many options. I imagine geojson will be v common, but S2 support is 🆒
* 5.2. Modifying Network - PT Schedule
Methods to return a new
Network
orSchedule
object subsetted using link IDs and service IDs.