aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2024-06-19 03:03:43 +0200
committerGuilhem Moulin <guilhem@fripost.org>2024-06-19 03:32:33 +0200
commitb7531ec5c353c616bcb905964339b06b5c8b6ed0 (patch)
tree512760b911fad674608803b256b588ecff8ef12a
parentbc58a552b1be29d0f11d6856da60282034339e96 (diff)
webmap-import: Improve variable name.
-rwxr-xr-xwebmap-import12
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)