geosnap.analyze.pdna_to_adj¶
- geosnap.analyze.pdna_to_adj(origins, network, threshold, reindex=True, drop_nonorigins=True)[source]¶
- Create an adjacency list of shortest network-based travel between
origins and destinations in a pandana.Network.
- Parameters:
- origins
geopandas.GeoDataFrame
Geodataframe of origin geometries to begin routing. If geometries are polygons, they will be collapsed to centroids
- network
pandana.Network
pandana.Network instance that stores the local travel network
- threshold
int
maximum travel distance (inclusive)
- reindexbool, optional
if True, use geodataframe index to identify observations in the adjlist. If False, the node_id from the OSM node nearest each observation will be used. by default True
- drop_nonoriginsbool, optional
If True, drop any destination nodes that are not also origins, by default True
- origins
- Returns:
pandas.DataFrame
adjacency list with columns ‘origin’, ‘destination’, and ‘cost’