diff options
Diffstat (limited to 'webmap-import')
-rwxr-xr-x | webmap-import | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/webmap-import b/webmap-import index e978f34..b97b275 100755 --- a/webmap-import +++ b/webmap-import @@ -946,16 +946,16 @@ def importSource2(lyr_dst, path, args={}, basedir=None, extent=None): + f'to destination SRS ({srs_dst.GetName()})') defn = lyr.GetLayerDefn() - n = defn.GetGeomFieldCount() - if n != 1: # TODO Add support for multiple geometry fields - logging.warning('Source layer "%s" has %d != 1 geometry fields', layername, n) + geomFieldCount = defn.GetGeomFieldCount() + if geomFieldCount != 1: # TODO Add support for multiple geometry fields + logging.warning('Source layer "%s" has %d != 1 geometry fields', layername, geomFieldCount) - n = defn.GetFieldCount() - fieldMap = [-1] * n + fieldCount = defn.GetFieldCount() + fieldMap = [-1] * fieldCount fields = args['field-map'] fieldSet = set() - for i in range(n): + for i in range(fieldCount): fld = defn.GetFieldDefn(i) fldName = fld.GetName() fieldMap[i] = v = fields.get(fldName, -1) |