Mapper
Classes to map Niva ID to IACS layer.
Mapper(map_dict, *args, **kwargs)
¶
Bases: niva.core.mixins.QgsLogicMixin
Mapper base class to join NIVA ID.
Attributes:
| Name | Type | Description |
|---|---|---|
map_dict |
typing.Dict[typing.Any, int]
|
Dict that map any nomenclature to Niva ID. |
Source code in niva/core/mapper/niva_mapper.py
28 29 30 31 32 33 34 | |
map(layer, field)
¶
Map NIVA ID to layer based on field.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
layer
|
qgis.core.QgsVectorLayer
|
Layer to add NIVA ID. |
required |
field
|
str
|
Mapping field. |
required |
Returns:
| Type | Description |
|---|---|
qgis.core.QgsVectorLayer
|
Layer with NIVA ID field. |
Source code in niva/core/mapper/niva_mapper.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |