diff options
Diffstat (limited to 'webmap-import')
-rwxr-xr-x | webmap-import | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/webmap-import b/webmap-import index 56d907c..1bb235a 100755 --- a/webmap-import +++ b/webmap-import @@ -284,7 +284,7 @@ def parseSubFieldType(name): else: raise Exception(f'Unknown field subtype "{name}"') -# Parse timezone (WARN for GDAL ≥3.8 only) +# Parse timezone TZ_RE = re.compile(r'(?:UTC\b)?([\+\-]?)([0-9][0-9]):?([0-9][0-9])', flags=re.IGNORECASE) def parseTimeZone(tz): if tz is None: @@ -381,6 +381,7 @@ def validateSchema(layers, drvo=None, lco_defaults=None): elif k2 == 'alternativename' or k2 == 'alias': fld_def2['AlternativeName'] = v elif k2 == 'comment': + # (WARN support added in GDAL 3.7) fld_def2['Comment'] = v elif k2 == 'type': @@ -388,6 +389,7 @@ def validateSchema(layers, drvo=None, lco_defaults=None): elif k2 == 'subtype': fld_def2['SubType'] = parseSubFieldType(v) elif k2 == 'tz': + # (WARN support added in GDAL 3.8) fld_def2['TZFlag'] = parseTimeZone(v) elif k2 == 'width' and v is not None and isinstance(v, int): fld_def2['Width'] = v |