Vector density
vector_density(geodataframe, resolution=None, base_raster_profile=None, buffer_value=None, statistic='density')
Compute density of geometries within raster.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
geodataframe |
GeoDataFrame
|
The dataframe with vectors of which density is computed. |
required |
resolution |
Optional[float]
|
The resolution i.e. cell size of the output raster. Optional if base_raster_profile is given. |
None
|
base_raster_profile |
Optional[Union[Profile, dict]]
|
Base raster profile to be used for determining the grid on which vectors are burned in. If None, the geometries and provided resolution value are used to compute grid. |
None
|
buffer_value |
Optional[float]
|
For adding a buffer around passed geometries before computing density. |
None
|
Returns:
Type | Description |
---|---|
Tuple[ndarray, dict]
|
Computed density of vector data and metadata. |
Source code in eis_toolkit/vector_processing/vector_density.py
10 11 12 13 14 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 |
|