package documentation

GDAL wrapper.

From __init__.py:

Class DataSet Undocumented
Class Layer Undocumented
Exception Error Undocumented
Function drivers Enumerate GDAL drivers.
Function open Open a path and return a DataSet object.
Function _attr_from_ogr Undocumented
Function _attr_to_ogr Undocumented
Function _driver_name_from_extension Undocumented
Function _srs Undocumented
Constant _ATTR_TO_OGR Undocumented
Constant _GEOM_TO_OGR Undocumented
Constant _OGR_TO_ATTR Undocumented
Constant _OGR_TO_GEOM Undocumented
Variable _ext_to_driver_name Undocumented
Variable _srs_cache Undocumented
def drivers(): (source)

Enumerate GDAL drivers.

def open(path, mode, driver=None, **opts) -> DataSet: (source)

Open a path and return a DataSet object.

Parameters
pathfile path
mode'r' (read), 'a' (update), 'w' (create for writing)
driverdriver name, if omitted, will be suggested from the path extension
**optsoptions for gdal.OpenEx/CreateDataSource
Returns
DataSetDataSet object.
_ext_to_driver_name: dict = (source)

Undocumented

def _driver_name_from_extension(s): (source)

Undocumented

_srs_cache: dict = (source)

Undocumented

def _srs(srid): (source)

Undocumented

def _attr_from_ogr(gd_feature: ogr.Feature, gtype: int, idx: int, encoding: str = 'utf8'): (source)

Undocumented

def _attr_to_ogr(gd_feature: ogr.Feature, gtype: int, idx: int, value, encoding: str = None): (source)

Undocumented

_ATTR_TO_OGR = (source)

Undocumented

Value
{gws.AttributeType.bool: ogr.OFTInteger,
 gws.AttributeType.bytes: ogr.OFTBinary,
 gws.AttributeType.date: ogr.OFTDate,
 gws.AttributeType.datetime: ogr.OFTDateTime,
 gws.AttributeType.float: ogr.OFTReal,
 gws.AttributeType.floatlist: ogr.OFTRealList,
 gws.AttributeType.int: ogr.OFTInteger,
...
_OGR_TO_ATTR = (source)

Undocumented

Value
{ogr.OFTBinary: gws.AttributeType.bytes,
 ogr.OFTDate: gws.AttributeType.date,
 ogr.OFTDateTime: gws.AttributeType.datetime,
 ogr.OFTReal: gws.AttributeType.float,
 ogr.OFTRealList: gws.AttributeType.floatlist,
 ogr.OFTInteger: gws.AttributeType.int,
 ogr.OFTIntegerList: gws.AttributeType.intlist,
...
_GEOM_TO_OGR = (source)

Undocumented

Value
{gws.GeometryType.curve: ogr.wkbCurve,
 gws.GeometryType.geometrycollection: ogr.wkbGeometryCollection,
 gws.GeometryType.linestring: ogr.wkbLineString,
 gws.GeometryType.multicurve: ogr.wkbMultiCurve,
 gws.GeometryType.multilinestring: ogr.wkbMultiLineString,
 gws.GeometryType.multipoint: ogr.wkbMultiPoint,
 gws.GeometryType.multipolygon: ogr.wkbMultiPolygon,
...
_OGR_TO_GEOM = (source)

Undocumented

Value
{ogr.wkbCurve: gws.GeometryType.curve,
 ogr.wkbGeometryCollection: gws.GeometryType.geometrycollection,
 ogr.wkbLineString: gws.GeometryType.linestring,
 ogr.wkbMultiCurve: gws.GeometryType.multicurve,
 ogr.wkbMultiLineString: gws.GeometryType.multilinestring,
 ogr.wkbMultiPoint: gws.GeometryType.multipoint,
 ogr.wkbMultiPolygon: gws.GeometryType.multipolygon,
...