aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2024-06-19 11:31:06 +0200
committerGuilhem Moulin <guilhem@fripost.org>2024-06-19 12:05:16 +0200
commit3bbb6809a13e36208f39df2f1ec7ba75b9aca965 (patch)
tree890d2741bf9ae05769bd5edaf4c54d2d69946a12
parentceb76b0893b5a0cbfeab269d373b6bb656222b69 (diff)
webmap-import: Improve variable name.
-rwxr-xr-xwebmap-import6
1 files changed, 3 insertions, 3 deletions
diff --git a/webmap-import b/webmap-import
index 731c49f..8a2848d 100755
--- a/webmap-import
+++ b/webmap-import
@@ -1058,7 +1058,7 @@ def importSource2(lyr_dst, path, args={}, basedir=None, extent=None):
if bValueMap:
valueMapCounts = [0] * fieldCount
- n = 0
+ featureCount = 0
mismatch = {}
feature = lyr.GetNextFeature()
while feature is not None:
@@ -1127,14 +1127,14 @@ def importSource2(lyr_dst, path, args={}, basedir=None, extent=None):
if lyr_dst.CreateFeature(feature2) != ogr.OGRERR_NONE:
raise Exception(f'Could not transfer source feature #{feature.GetFID()}')
- n += 1
+ featureCount += 1
feature = lyr.GetNextFeature()
if bValueMap:
valueMapCounts = [ (lyr.GetLayerDefn().GetFieldDefn(i).GetName(), k) for i,k in enumerate(valueMapCounts) if k > 0 ]
lyr = None
- logging.info('Imported %d features from source layer "%s"', n, layername)
+ logging.info('Imported %d features from source layer "%s"', featureCount, layername)
if bValueMap:
if len(valueMapCounts) > 0: