wradlib.io.gdal.VectorSource#
- class wradlib.io.gdal.VectorSource(data=None, trg_crs=None, name='layer', source=0, **kwargs)[source]#
DataSource class for handling ogr/gdal vector data
DataSource handles creates in-memory (vector) ogr DataSource object with one layer for point or polygon geometries.
- Parameters:
data (sequence or
str) – sequence of source points (shape Nx2) or polygons (shape NxMx2) or Vector File (GDAL/OGR) filename containing source points/polygonstrg_crs – Coordinate Reference System (CRS) of the coordinates. Can be one of:
A
pyproj.crs.CoordinateSysteminstanceA
cartopy.crs.CRSinstanceA
osgeo.osr.SpatialReferenceinstanceA type accepted by
pyproj.crs.CRS.from_user_input(e.g., EPSG code, PROJ string, dictionary, WKT, or any object with a to_wkt() method)
CRS the source data should be projected to.
- Keyword Arguments:
name (
str) – Layer Name, defaults to “layer”.source (
int) – Number of layer to load, if multiple layers in source shape file.mode (
str) – Return type of class access functions/properties. Can be either of “numpy”, “geo” and “ogr”, defaults to “numpy”.src_crs –
Coordinate Reference System (CRS) of the coordinates. Can be one of:
A
pyproj.crs.CoordinateSysteminstanceA
cartopy.crs.CRSinstanceA
osgeo.osr.SpatialReferenceinstanceA type accepted by
pyproj.crs.CRS.from_user_input(e.g., EPSG code, PROJ string, dictionary, WKT, or any object with a to_wkt() method)
CRS in which source data is provided in.
Warning
Writing shapefiles with the wrong locale settings can have impact on the type of the decimal. If problem arise use
LC_NUMERIC=Cin your environment.Examples
See Vector Source.
|
|
|
Output layer to GDAL Rasterfile |
|
Output layer to OGR Vector File |
|
Return attributes |
|
Return properties and attributes |
|
Returns DataSource geometries filtered by given attribute/value |
|
Returns DataSource geometries filtered by given geometry |
|
Returns DataSource geometries from given index |
|
Return geometry properties |
|
Read Layer from OGR Vector File |
|
Add/Set given Attribute with given values |