iduedu.clip_urban_graph¶
- iduedu.clip_urban_graph(graph_gdf, polygon)[source]¶
Clip graph nodes by geometry and keep only edges with retained endpoints.
polygonfollows the rule ofterritoryin the graph builders: a shapely geometry is in EPSG:4326 (longitude, latitude); a GeoSeries or GeoDataFrame carries its own CRS. Either is reprojected to the graph CRS. Node ids are preserved; callrelabel_urban_graph()if dense labels are needed.- Return type:
- Parameters:
graph_gdf (UrbanGraph)
polygon (BaseGeometry | GeoSeries | GeoDataFrame)