diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2024-06-21 21:41:35 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2024-06-21 23:32:07 +0200 |
commit | d6b72ca9f661218f31415f6b1845e4ad97c58908 (patch) | |
tree | 2e562a15d91a92f11f4908762a5db59c122f6841 /webmap-import | |
parent | d1f52a5e7ac2dd62c6348f17b02ccf324456c9da (diff) |
webmap-import: Don't crash if the destination layer has no SRS.
This is the case for the PGDump driver, for instance.
Diffstat (limited to 'webmap-import')
-rwxr-xr-x | webmap-import | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/webmap-import b/webmap-import index 6502c8f..8512e6d 100755 --- a/webmap-import +++ b/webmap-import @@ -948,7 +948,10 @@ def importSource2(lyr_dst, path, args={}, basedir=None, extent=None): raise Exception('Source layer has no SRS') srs_dst = lyr_dst.GetSpatialRef() - if srs_dst.IsSame(srs): + if srs_dst is None: + logging.warning('Destination has no SRS, skipping coordinate transformation') + ct = None + elif srs_dst.IsSame(srs): logging.debug('Both source and destination have the same SRS (%s), skipping coordinate transformation', srs_dst.GetName()) ct = None |