aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xwebmap-import14
1 files changed, 7 insertions, 7 deletions
diff --git a/webmap-import b/webmap-import
index 6daceee..a3ffd50 100755
--- a/webmap-import
+++ b/webmap-import
@@ -213,9 +213,9 @@ def parseGeomType(name):
return eGType
# cf. ogr/ogr_core.h's enum OGRFieldType;
-def getFieldTypeCode(name):
+def parseFieldType(name):
if name is None:
- raise Exception('getFieldTypeCode(None)')
+ raise Exception('parseFieldType(None)')
name2 = name.lower()
if name2 == 'integer':
# simple 32bit integer
@@ -257,9 +257,9 @@ def getFieldTypeCode(name):
raise Exception(f'Unknown field type "{name}"')
# cf. ogr/ogr_core.h's enum OGRFieldSubType;
-def getFieldSubTypeCode(name):
+def parseSubFieldType(name):
if name is None:
- raise Exception('getFieldSubTypeCode(None)')
+ raise Exception('parseSubFieldType(None)')
name2 = name.lower()
if name2 == 'none':
# No subtype. This is the default value.
@@ -280,7 +280,7 @@ def getFieldSubTypeCode(name):
# UUID string representation. Only valid for OFTString.
return ogr.OFSTUUID
else:
- raise Exception(f'Unknown field subtype "{name2}"')
+ raise Exception(f'Unknown field subtype "{name}"')
# Validate layer creation options and schema. The schema is modified in
# place with the parsed result.
@@ -336,9 +336,9 @@ def validateSchema(layers, drvo=None, lco_defaults=None):
fld_def2['Comment'] = v
elif k2 == 'type':
- fld_def2['Type'] = getFieldTypeCode(v)
+ fld_def2['Type'] = parseFieldType(v)
elif k2 == 'subtype':
- fld_def2['SubType'] = getFieldSubTypeCode(v)
+ fld_def2['SubType'] = parseSubFieldType(v)
elif k2 == 'tzflag':
pass # TODO
#fld_def2['TZFlag'] = v