cityImage.road_barriers#
- cityImage.road_barriers(place, download_method, distance=500.0, epsg=None, include_primary=False, include_secondary=False)[source]#
The function downloads major roads from OSM. These can be considered to be barrier to pedestrian movement or, at least, to structure people’s cognitive Image of the City. If ‘include_primary’ is true, the function considers also primary roads, beyond motorway and trunk roads. if ‘include_secondary’ is true, the function considers also secondary roads, beyond motorway and trunk roads. The user should assess based on the study area categorisation whether primary and secondary roads may indeed constitute barriers to pedestrian movement.
- Parameters:
place (str, tuple, Shapely Polygon) – Name of cities or areas in OSM: - when using “distance_from_point” please provide a (lat, lon) tuple to create the bounding box around it; - when using “distance_from_address” provide an existing OSM address; - when using “OSMplace” provide an OSM place name. The query must be geocodable and OSM must have polygon boundaries for the geocode result. - when using “polygon” please provide a Shapely Polygon in unprojected latitude-longitude degrees (EPSG:4326) CRS;
download_method (str, {"distance_from_address", "distance_from_point", "OSMplace", "polygon"}) – It indicates the method that should be used for downloading the data.
distance (float) – Used when download_method == “distance from address” or == “distance from point”.
epsg (int) – Epsg of the area considered; if None OSMNx is used for the projection.
include_primary (boolean) – When true, it includes primary roads as barriers.
include_secondary (boolean) – When true, it includes primary roads as barriers.
- Returns:
road_barriers – The road barriers.
- Return type:
LineString GeoDataFrame