cityImage.downloader#
- cityImage.downloader(place, download_method, tags=None, distance=500.0, downloading_graph=False, network_type=None)[source]#
The function downloads certain geometries from OSM, by means of OSMNX functions. It returns a GeoDataFrame, that could be empty when no geometries are found, with the provided tags.
- 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.
tag (dict) – The desired OSMN tags.
distance (float) – Used when download_method == “distance from address” or == “distance from point”.
downloading_graph (bool) – Download a graph, instead of, as by default, GeoDataFrame.
network_type (str {"walk", "bike", "drive", "drive_service", "all", "all_private", "none"}) – It indicates type of street or other network to extract - from OSMNx paramaters.
- Returns:
G, geometries_gdf – The resulting Graph (when downloading_graph) or a GeoDataFrame.
- Return type:
NetworkX Graph, GeoDataFrame