Distance computation
distance_computation(geodataframe, raster_profile, max_distance=None)
Calculate distance from raster cell to nearest geometry.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
geodataframe |
GeoDataFrame
|
The GeoDataFrame with geometries to determine distance to. |
required |
raster_profile |
Union[Profile, dict]
|
The raster profile of the raster in which the distances to the nearest geometry are determined. |
required |
max_distance |
Optional[Number]
|
The maximum distance in the output array. |
None
|
Returns:
Type | Description |
---|---|
ndarray
|
A 2D numpy array with the distances computed. |
Raises:
Type | Description |
---|---|
NonMatchingCrsException
|
The input raster profile and geodataframe have mismatching CRS. |
EmptyDataFrameException
|
The input geodataframe is empty. |
Source code in eis_toolkit/vector_processing/distance_computation.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|