osgeo.osr module
- class osgeo.osr.AreaOfUse(*args)
Bases:
objectProxy of C++ OSRAreaOfUse class.
- property east_lon_degree
- property name
- property north_lat_degree
- property south_lat_degree
- property west_lon_degree
- class osgeo.osr.CRSInfo(*args)
Bases:
objectProxy of C++ OSRCRSInfo class.
- property area_name
- property auth_name
- property bbox_valid
- property celestial_body_name
- property code
- property deprecated
- property east_lon_degree
- property name
- property north_lat_degree
- property projection_method
- property south_lat_degree
- property type
- property west_lon_degree
- osgeo.osr.DontUseExceptions()
Disable exceptions in all GDAL related modules (osgeo.gdal, osgeo.ogr, osgeo.osr, osgeo.gnm). Note: prior to GDAL 3.7, this only affected the calling module
- class osgeo.osr.ExceptionMgr(useExceptions=True)
Bases:
objectContext manager to manage Python Exception state for GDAL/OGR/OSR/GNM.
Separate exception state is maintained for each module (gdal, ogr, etc), and this class appears independently in all of them. This is built in top of calls to the older UseExceptions()/DontUseExceptions() functions.
Example:
>>> print(gdal.GetUseExceptions()) 0 >>> with gdal.ExceptionMgr(): ... # Exceptions are now in use ... print(gdal.GetUseExceptions()) 1 >>> >>> # Exception state has now been restored >>> print(gdal.GetUseExceptions()) 0
- osgeo.osr.GetAuthorityListFromDatabase() char **
- osgeo.osr.GetCRSInfoListFromDatabase(authName)
- osgeo.osr.GetPROJAuxDbPaths() char **
- osgeo.osr.GetPROJEnableNetwork() bool
- osgeo.osr.GetPROJSearchPaths() char **
- osgeo.osr.GetPROJVersionMajor() int
- osgeo.osr.GetPROJVersionMicro() int
- osgeo.osr.GetPROJVersionMinor() int
- osgeo.osr.GetUseExceptions() int
- osgeo.osr.GetUserInputAsWKT(name) OGRErr
- osgeo.osr.GetWellKnownGeogCSAsWKT(name) OGRErr
- osgeo.osr.OSRAreaOfUse_east_lon_degree_get(area) double
- osgeo.osr.OSRAreaOfUse_name_get(area) char const *
- osgeo.osr.OSRAreaOfUse_north_lat_degree_get(area) double
- osgeo.osr.OSRAreaOfUse_south_lat_degree_get(area) double
- osgeo.osr.OSRAreaOfUse_west_lon_degree_get(area) double
- osgeo.osr.OSRCRSInfo_area_name_get(crsInfo) char const *
- osgeo.osr.OSRCRSInfo_auth_name_get(crsInfo) char const *
- osgeo.osr.OSRCRSInfo_bbox_valid_get(crsInfo) bool
- osgeo.osr.OSRCRSInfo_celestial_body_name_get(crsInfo) char const *
- osgeo.osr.OSRCRSInfo_code_get(crsInfo) char const *
- osgeo.osr.OSRCRSInfo_deprecated_get(crsInfo) bool
- osgeo.osr.OSRCRSInfo_east_lon_degree_get(crsInfo) double
- osgeo.osr.OSRCRSInfo_name_get(crsInfo) char const *
- osgeo.osr.OSRCRSInfo_north_lat_degree_get(crsInfo) double
- osgeo.osr.OSRCRSInfo_projection_method_get(crsInfo) char const *
- osgeo.osr.OSRCRSInfo_south_lat_degree_get(crsInfo) double
- osgeo.osr.OSRCRSInfo_type_get(crsInfo) OSRCRSType
- osgeo.osr.OSRCRSInfo_west_lon_degree_get(crsInfo) double
- osgeo.osr.SetPROJAuxDbPath(utf8_string)
- osgeo.osr.SetPROJAuxDbPaths(paths)
- osgeo.osr.SetPROJEnableNetwork(enabled)
- osgeo.osr.SetPROJSearchPath(utf8_string)
- osgeo.osr.SetPROJSearchPaths(paths)
- osgeo.osr.UseExceptions()
Enable exceptions in all GDAL related modules (osgeo.gdal, osgeo.ogr, osgeo.osr, osgeo.gnm). Note: prior to GDAL 3.7, this only affected the calling module