Grid
GridBuilder(roi, **kwargs)
¶
Bases: niva.core.mixins.QgsLogicMixin
Grid builder on region of interest. Can extract from existing grid or build from scratch.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
roi
|
VectorLayer
|
Region of interest. |
required |
Attributes:
| Name | Type | Description |
|---|---|---|
roi |
VectorLayer
|
Region of interest. |
Source code in niva/core/grid/grid.py
15 16 17 18 19 20 21 22 23 24 25 26 27 | |
create()
¶
Create a grid of 1km x 1km that fits ROI.
Returns:
| Type | Description |
|---|---|
qgis.core.QgsVectorLayer
|
Created grid layer. |
Source code in niva/core/grid/grid.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | |
extract(reference_grid)
¶
Extract grid that fits ROI from reference grid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
reference_grid
|
qgis.core.QgsVectorLayer
|
Grid of reference to extract Grid from. |
required |
Returns:
| Type | Description |
|---|---|
qgis.core.QgsVectorLayer
|
Grid of cells extracted from reference grid that fits ROI. |
Source code in niva/core/grid/grid.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | |