spacenet.helpers#
Helper functions for spatial networks#
Extracts edge weights from a spatial network for a specified weight attribute and returns them as a numpy array. |
|
A function to extract node indices and labels from a spatial network. |
|
Retrieves node-node distance information from a spatial network's distance cache for a specified weight attribute and an optional subset of source nodes. |
|
Computes the shortest path distances from a set of source nodes to all other nodes in a spatial network, with optional caching to avoid redundant computations. |
|
Update the node-node distance cache in the spatial network with new distances for a given weight and limit. |
|
Removes specified nodes from the distance cache of a spatial network. |
|
Computes the shortest path distance from node_a to node_b in a spatial network using Dijkstra's algorithm, with the specified edge weight. |
|
Clear the distance cache of a spatial network. |
|
Compute shortest path distances from multiple source nodes to all other nodes in the graph using Dijkstra's algorithm in batches. |