raster_tools.open_vectors#
- raster_tools.open_vectors(path, layers=None)[source]#
Open a vector source.
This can be any GDAL/OGR compatible source.
- Parameters
path (str, Path) – The vector source path.
layers (list of int, int, list of str, str, or None, optional) – The layer(s) to read from the source. This can be a single layer int or string, a list of layer ints/strings, or
None
. IfNone
, all layers are read in. If int(s) are given, they are treated as 0-based layer indices.
- Returns
If only a single layer was specified or found, a single Vector object is returned. Otherwise, a list of Vector objects is returned.
- Return type
Vector, list of Vector