spacenet.global_metrics.volume#
- spacenet.global_metrics.volume(spatial_network, edge_weight_name='Distance')#
Computes the total volume of a spatial network, which is defined as the sum of the edge weights specified by edge_weight_name. The default edge weight is ‘Distance’, which represents the physical distance between nodes in the spatial network. The function checks that the specified edge weight exists in the graph and then sums up the values of that edge weight for all edges in the graph to compute the total volume.
- Parameters:
- spatial_networkNetworkX graph
The spatial network for which to compute the volume.
- edge_weight_namestr, optional
The name of the edge attribute to use as the weight for computing the volume. Default is ‘Distance’.
- Returns:
- total_volumefloat
The total volume of the spatial network, which is the sum of the edge weights specified by edge_weight_name.