diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2024-06-11 19:28:10 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2024-06-11 20:47:22 +0200 |
commit | ee95a54e4f70fd7f911e8a2cacfb342c85213937 (patch) | |
tree | f3c8927a346024f249a299cbc1b80facc828e2b7 /webmap-import | |
parent | 13b0de59786afa7b64e6807a4a658e54f389fd18 (diff) |
config.yml: Add field comments.
(Commented out for now since Bookworm has only GDAL v3.6.)
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 |