Hi Andrea, > but could be more efficiently represented as enums, as they >have a small set of values.
> GeoPackage has a native notion of enums, check the spec and search for > "table 27" for an example: > http://www.geopackage.org/spec/ My understanding of table 27 is that it is just to define constraints on the values of a column, but not a way to establish a integer<-->string mapping as you'd like. Unless I'm missing something. Of course you could create an auxiliary table with the mapping, but I'm not aware of a standardized way of registering it. > So I'm wondering, is there direct support for enum fields? No, there's no such concept of enum fields in the OGR data model itself The schema extension ( http://www.geopackage.org/spec/#extension_schema ) is minimilastically implement in the OGR GPKG driver. It just supports setting the mime_type of a column to "application/json" to map from/to the OGR type=string, subtype=json for columns. > Any way to map a string column to enum during a ogr2ogr call? If there was really a way to encode what you want to do in the specification, I'imagine that could potentially be a new driver specific option where you would provide the mapping. Even -- Spatialys - Geospatial professional services http://www.spatialys.com
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev