Create SQL View in GeoPackage in GeoServer

by Bruce Loth   Last Updated August 14, 2019 15:22 PM

In GeoServer 2.15.2 I can "publish" an entire layer from a GeoPackage. No issues there, works great.

However, If I attempt to "Configure a new SQL view..." using that same layer in the GeoPackage (or any layer from any GeoPackage), GeoServer fails to recognize "geom" as the geometry column. In the "Edit SQL view" screen, the "type" for "geom" is listed as "BigDecimal".

What I would like to do via the "SQL View" is to publish a layer from a GeoPackage and use a SQL query to scope the results (cannot do this if I just publish the entire GeoPackage layer).

Note: As I mentioned, GeoServer does indeed recognize "geom" when you "publish" the entire GeoPackage layer . . . it can successfully identify the geometry type and SRID. This fails when trying to "Configure a new SQL view...".

Related Questions

GeoServer and GeoPackage

Updated August 16, 2018 14:22 PM

Importing GeoPackage into GeoServer?

Updated March 21, 2019 21:22 PM