Skip to content

Commit

Permalink
align OGR types to OpenAPI (#423)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Apr 26, 2020
1 parent 6916099 commit 11ee705
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pygeoapi/provider/ogr.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,14 @@ def get_fields(self):
fieldName = field_defn.GetName()
fieldTypeCode = field_defn.GetType()
fieldType = field_defn.GetFieldTypeName(fieldTypeCode)

fields[fieldName] = fieldType.lower()

if fields[fieldName] == 'integer64':
fields[fieldName] = 'integer'
elif fields[fieldName] == 'real':
fields[fieldName] = 'number'

# fieldWidth = layer_defn.GetFieldDefn(fld).GetWidth()
# GetPrecision = layer_defn.GetFieldDefn(fld).GetPrecision()

Expand Down

0 comments on commit 11ee705

Please sign in to comment.