[Geoserver-devel] Make gpkg in geoserver/tools? DateTime aware

Hi Devs,

Some time ago I created this issue:
https://osgeo-org.atlassian.net/browse/GEOS-9392

In it is about Geoserver will never 'type' a column as Datetime when
creating a layer from a gpkg.

Resulting in not being able to use Geopackages in WMS-t/Dimensions.

While sqlite does not have DATE and DATETIME types, gpkg has:
http://www.geopackage.org/spec/#r5

According to Jukka (in the comments) Geoserver could try to get that
info from a query, to be fired in the geopackage. The resulting 'CREATE
TABLE' string then reveals if a column coud be used as DATETIME.

I'm able to debug geoserver/geotools now, but am puzzled on where to put
this kind of code:

- in Geoserver, somewhere in Catalog parts:
https://github.com/geoserver/geoserver/tree/master/src/main/src/main/java/org/geoserver/catalog

- in Geotools (in geopkg/GeoPackage?)
https://github.com/geotools/geotools/blob/master/modules/plugin/geopkg/src/main/java/org/geotools/geopkg/GeoPackage.java

Sort of lost in the immense codebase. If anybody could give some hints
that would be very much appreciated.

Thanks in advance.

Regards,

Richard Duivenvoorde

Nope, this is just a registry of the stores, layers and whatnot. Not what you’re looking for.

Yes, this is the right place… not sure if it’s the right class, you should consider also GeoPkgDialect
and also check what JDBCDataStore/JDBCFeatureSource are doing.

Also check:
GeoPkgDateOnlineTest
GeoPkgDateTestSetup

as you’ll have to write tests (almost no change is accepted without some new tests).
The odd thing is, if the above tests do pass, it would seem date support is present… but not sure,
I haven’t been involved in the geopkg development, besides a brief perf optimization effort.

Hope this helps

Cheers
Andrea

···

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.