Vector
Bases: Iterable[VectorLayer]
The vector specifies the layers.
Notes
- The
layersproperty returns a reference to the layers - The
metadataproperty returns a reference to the metadata - The dunder methods
__getattr__,__getitem__, and__iter__return or yield a reference to a layer
| PARAMETER | DESCRIPTION |
|---|---|
layers
|
Layers
TYPE:
|
metadata
|
Metadata
TYPE:
|
copy
|
If True, the layers and metadata are copied during initialization
TYPE:
|
layers
property
| RETURNS | DESCRIPTION |
|---|---|
list[VectorLayer]
|
Layers |
metadata
property
writable
| RETURNS | DESCRIPTION |
|---|---|
dict[str, object]
|
Metadata |
is_copied
property
| RETURNS | DESCRIPTION |
|---|---|
bool
|
If True, the layers and metadata are copied during initialization |
layer_names
property
| RETURNS | DESCRIPTION |
|---|---|
set[str]
|
Layer names |
__eq__
Compares the vectors.
| PARAMETER | DESCRIPTION |
|---|---|
other
|
Other vector
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the vectors are equal, False otherwise |
__len__
Computes the number of layers.
| RETURNS | DESCRIPTION |
|---|---|
int
|
Number of layers |
__bool__
Checks if the vector contains layers.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the vector contains layers, False otherwise |
__contains__
Checks if the layer is in the vector.
| PARAMETER | DESCRIPTION |
|---|---|
layer_name
|
Layer name
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the layer is in the vector, False otherwise |
__getattr__
Returns the layer.
| PARAMETER | DESCRIPTION |
|---|---|
layer_name
|
Layer name
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
VectorLayer
|
Layer |
__getitem__
Returns the layer.
| PARAMETER | DESCRIPTION |
|---|---|
layer_name
|
Layer name
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
VectorLayer
|
Layer |
__iter__
Iterates over the layers.
| YIELDS | DESCRIPTION |
|---|---|
VectorLayer
|
Layer |
append
Appends the layers.
| PARAMETER | DESCRIPTION |
|---|---|
layers
|
Layers
TYPE:
|
inplace
|
If True, the layers are appended inplace
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Vector
|
Vector |