diff options
| author | Guilhem Moulin <guilhem@fripost.org> | 2024-10-27 23:21:12 +0100 | 
|---|---|---|
| committer | Guilhem Moulin <guilhem@fripost.org> | 2024-10-27 23:21:12 +0100 | 
| commit | 10ac85451af4de33237a3005ccb68640964b5b2c (patch) | |
| tree | 5b440506d0687f88281f03370b1751d57e8f34bd | |
| parent | c36edde5f028a7a64cb44eaf7260215a25ada75b (diff) | |
webmap-import: Show the list of ingnored source fields.
| -rwxr-xr-x | webmap-import | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/webmap-import b/webmap-import index 8311c26..9f9fdca 100755 --- a/webmap-import +++ b/webmap-import @@ -906,6 +906,7 @@ def importSource2(lyr_dst, path, args={}, basedir=None, extent=None):      fields = args['field-map']      fieldSet = set() +    ignoredFieldNames = []      for i in range(fieldCount):          fld = defn.GetFieldDefn(i)          fldName = fld.GetName() @@ -916,6 +917,7 @@ def importSource2(lyr_dst, path, args={}, basedir=None, extent=None):              # call SetIgnored() on unwanted source fields              logging.debug('Set Ignored=True on output field "%s"', fldName)              fld.SetIgnored(True) +            ignoredFieldNames.append(fldName)      count0 = -1      if lyr.TestCapability(ogr.OLCFastFeatureCount): @@ -953,6 +955,9 @@ def importSource2(lyr_dst, path, args={}, basedir=None, extent=None):          else:              logging.info('Source layer "%s" has %d features', layername, count0) +    logging.info('Ignored fields from source layer: %s', +        '-' if len(ignoredFieldNames) == 0 else ', '.join(ignoredFieldNames)) +      # build a list of triplets (field index, replacement_for_null, [(from_value, to_value), …])      valueMap = []      for fldName, rules in args.get('value-map', {}).items():  | 
