From 3bbb6809a13e36208f39df2f1ec7ba75b9aca965 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Wed, 19 Jun 2024 11:31:06 +0200 Subject: webmap-import: Improve variable name. --- webmap-import | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'webmap-import') 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: -- cgit v1.2.3