find_nearest_branch
='overall', maxdist=5) find_nearest_branch(branches, geometries, method
Determine nearest branch for each geometry.
The nearest branch can be found by finding t from both ends (ends) or the nearest branch from the geometry as a whole (overall), the centroid (centroid), or intersecting (intersect).
Parameters
Name | Type | Description | Default |
---|---|---|---|
branches | geopandas.GeoDataFrame | Geodataframe with branches | required |
geometries | geopandas.GeoDataFrame | Geodataframe with geometries to snap | required |
method | Method for determine branch | 'overall' |
|
maxdist | Maximum distance for finding nearest geometry | 5 |