From d6b72ca9f661218f31415f6b1845e4ad97c58908 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Fri, 21 Jun 2024 21:41:35 +0200 Subject: webmap-import: Don't crash if the destination layer has no SRS. This is the case for the PGDump driver, for instance. --- webmap-import | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'webmap-import') 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 -- cgit v1.2.3