geosnap.analyze.isochrones_from_gdf¶
- geosnap.analyze.isochrones_from_gdf(origins, threshold, network, network_crs=None, reindex=True, hull='shapely', ratio=0.2, allow_holes=False, use_edges=True)[source]¶
Create travel isochrones for several origins simultaneously
- Parameters:
- origins
geopandas.GeoDataFrame
a geodataframe containing the locations of origin point features
- threshold: float
maximum travel cost to define the isochrone, measured in the same impedance units as edges_df in the pandana.Network object.
- network
pandana.Network
pandana Network instance for calculating the shortest path isochrone for each origin feature
- network_crs
str
,int
,pyproj.CRS
(optional) the coordinate system used to store x and y coordinates in the passed pandana network. If None, the network is assumed to be stored in the same CRS as the origins geodataframe
- reindexbool
if True, use the dataframe index as the origin and destination IDs (rather than the node_ids of the pandana.Network). Default is True
- hull
str
, {‘libpysal’, ‘shapely’} Which method to generate container polygons (concave hulls) for destination points. If ‘libpysal’, use libpysal.cg.alpha_shape_auto to create the concave hull, else if ‘shapely’, use shapely.concave_hull. Default is libpysal
- ratio
float
ratio keyword passed to shapely.concave_hull. Only used if hull=’shapely’. Default is 0.3
- allow_holesbool
keyword passed to shapely.concave_hull governing whether holes are allowed in the resulting polygon. Only used if hull=’shapely’. Default is False.
- use_edges: bool
If true, use vertices from the Network.edge_df to make the polygon more accurate by adhering to roadways. Requires that the ‘geometry’ column be available on the Network.edges_df, most commonly by using geosnap.io.get_network_from_gdf
- origins
- Returns:
GeoPandas.DataFrame
polygon geometries with the isochrones for each origin point feature