diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2025-05-20 11:57:55 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2025-05-21 18:57:50 +0200 |
commit | 9b192ebb312741672babd46523d8558b6e74ff9a (patch) | |
tree | 7af98a5c5526aaf486416c818c462192e16bc6ef /import_source.py | |
parent | d3df2c2ef8d253ffa3365d0eec326bb611b9b7e2 (diff) |
webmap-import: Add option to generate Mapbox Vector Tiles (MVT).
Diffstat (limited to 'import_source.py')
-rw-r--r-- | import_source.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/import_source.py b/import_source.py index 04dea4b..46ec1e9 100644 --- a/import_source.py +++ b/import_source.py @@ -449,6 +449,9 @@ class ImportStatus(Enum): IMPORT_ERROR = 1 IMPORT_NOCHANGE = 255 + def __str__(self): + return self.name.removeprefix('IMPORT_') + # pylint: disable-next=dangerous-default-value def importSources(dso : gdal.Dataset, lyr : ogr.Layer, sources : dict[str,Any] = {}, @@ -651,6 +654,7 @@ def _importSource2(lyr_dst : ogr.Layer, path : str, args : dict[str,Any], else: # TODO Use GetSupportedSRSList() and SetActiveSRS() with GDAL ≥3.7.0 # when possible, see apps/ogr2ogr_lib.cpp + # pylint: disable=duplicate-code logging.debug('Creating transforming from source SRS (%s) to destination SRS (%s)', srs.GetName(), srs_dst.GetName()) ct = osr.CoordinateTransformation(srs, srs_dst) |