From ee95a54e4f70fd7f911e8a2cacfb342c85213937 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 11 Jun 2024 19:28:10 +0200 Subject: config.yml: Add field comments. (Commented out for now since Bookworm has only GDAL v3.6.) --- webmap-import | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'webmap-import') 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 -- cgit v1.2.3