geoVeRoPy.road module¶
- geoVeRoPy.road.clipRoadsByPoly(roads: dict, poly: list[list[float]] | list[tuple[float, float]]) dict[source]¶
- geoVeRoPy.road.clipRoadsByPolys(roads: dict, polys: list[list[list[float]]] | list[list[tuple[float, float]]]) dict[source]¶
- geoVeRoPy.road.createRoadNetworkFromGeoJSON(geoJSONPath: str, boundaryLatLon: list[list[float]] | list[tuple[float, float]] | None = None, projType: str = 'LatLon', buildingIncludedFlag: bool = False) dict[source]¶
Given a path to geoJSON file, returns a road network dictionary with roads (and buildings)
- Parameters:
geoJSONPath (string, required) – The path to a geoJSON file (“.geojson”)
boundaryLatLon (list[pt], optionan, default as None) – Filter out the area that are not within the boundary, if given
projType (string, optional, default as 'LatLon') – Determine the axises of exported data, options are [‘LatLon’, ‘Mercator’]
buildingIncludedFlag (bool, optional, default as False) – True if buildings are included
- Returns:
- A road network dictionary, in the following formatt:
>>> road = { ... 'boundary': boundary, ... 'road': road, ... 'building': building ... }
- Return type:
dict