[gdal-dev] Non-standard field types in OGR

Matthias Kuhn matthias at opengis.ch
Tue Nov 13 14:04:51 PST 2018


Hi,

I'm looking for a way to load a geopackage layer with a type affinity
set to a custom type and to detect this type.

I.e. what I have is a table with a field called myJson, the type of
which is JSON.

Looking at the debug output of QGIS, I currently get this message which
seems to be generated by OGR:

Warning 1: Field format 'JSON' not supported

Warning 1: geometry column 'myJson' of type 'JSON' ignored

Is it currently possible to load such a field via OGR?

What I was hoping is to load this field (with fallback as string) and
detect that it's of type JSON. I think even if I was able to load the
field, it would only be possible to detect which of the types in
OGRFieldType it is and not get the raw name of the type on the
underlying data source.

Am I missing something and this is already possible? If not, would it be
acceptable to patch ogr to support this? Or is the idea to have a custom
type name for JSON in a GeoPackage/SQLite container flawed in itself?

Thanks a lot

Matthias

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20181113/84ba0da1/attachment.html>


More information about the gdal-dev mailing list