[gdal-dev] Geopackages and Datetime fields
even.rouault at spatialys.com
Fri Jan 24 07:01:47 PST 2020
> I'm experimenting with writing time-based model results into
> geopackages, and make those results (1 run = 1 geopackage) automatically
> available as WMS-t.
> -1- First thing I wonder is how gdal/mapserver is handling geopackages
> in a multi-threaded environment: if more web=clients are making a lot of
> requests, is gdal/mapserver able to open the geopackage in parallel?
> Reason I ask is because of the '-shm' and '-wal' files.
As long as you don't write at the same time as you read, then no need to
enable WAL mode. Concurrent reads on SQLite databases work out of the box.
This is the SHARED locking mode of
> -2- Seconds Question is about Datetime handling.
> Reading  I understand that SQLite (and so gpkg) does not have a
> native store format for date/times.
True for plain SQLite, but GPKG specifies a DATETIME time:
See Table 1 at http://www.geopackage.org/spec121/#_sqlite_container
ISO-8601 date/time string in the form YYYY-MM-DDTHH:MM:SS.SSSZ with T
separator character and Z suffix for coordinated universal time (UTC) encoded
in either UTF-8 or UTF-16. See TEXT. Stored as SQLite TEXT.
GDAL implements that. If putting other type of content in such columns, GDAL
master since a couple days will warn about it. Previous versions would just
create a unset field.
Spatialys - Geospatial professional services
More information about the gdal-dev