pycsamt.gis.config#
pycsamt.gis.config
Configuration loader for the GIS subpackage.
Verifies availability of GDAL or a PROJ-based fallback (
pyproj).Loads EPSG definitions into
EPSG_DICTfor use by lightweight transformers.
On import, the module attempts to locate GDAL resources.
If unavailable, it verifies that pyproj can be imported.
EPSG definitions are then loaded from pyproj data where
possible; otherwise a local epsg.npy mapping is used.
Exports#
- HAS_GDALbool
Truewhen GDAL/OSR is available.- EPSG_DICTdict[int, str]
Mapping of EPSG codes to PROJ strings.
- GDALMissingErrorException
Raised when a GDAL-dependent routine is used without GDAL.
- GisErrorException
Base exception for GIS utilities.
Notes
Modern
pyproj(>=3) ships a SQLiteproj.dbrather than a flatepsgfile. This loader uses a best-effort approach to find legacy definitions; if none are found, the localepsg.npyis used as a fallback.
Classes
|
Configuration for elevation API services. |
Exceptions
Raised when a GDAL/OSR-dependent function is called while GDAL is not available. |
|
Base exception for GIS utilities. |
- exception pycsamt.gis.config.GDALMissingError[source]#
Bases:
RuntimeErrorRaised when a GDAL/OSR-dependent function is called while GDAL is not available.
Notes
Install GDAL (and the
osgeoPython bindings) to use GDAL-backed transforms. Prefer high-level helpers that can fall back to PROJ, such asproject_point_ll2utm()andproject_point_utm2ll(), when GDAL is absent.