Skip to content
Mark Johnson edited this page May 23, 2014 · 16 revisions

Creating / Destroying of a VirtualGPKG wrapper

[--> 'List of Sql-Commands'] (Home#commands)

[<-- 'Index Page for GeoPackage - Commands'] (GeoPackage-Index#commands)


Original Documentation [[SQL functions implementing OGC GeoPackage compatibility|http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.1.0.html#p16gpkg]]

  • AutoGPKGStart( void ) : Integer
  • AutoGPKGStop( void ) : Integer

  • This function will inspect the DB layout, then automatically creating/refreshing a VirtualGPKG wrapper for each GPKG geometry table

    • returns amount of tables effected
  • sample 20140101.world_Haiti.gpkg

    • a valid R10 GeoPackage
      • ['CheckGeoPackageMetaData'] (CheckGeoPackageMetaData) returns 1
        • 1 features [Geometry] table called geonames
        • 1 tiles [Raster] table called fromosm_tiles
SELECT AutoGPKGStart();
  • returns 1
    • 1 features [Geometry] table found
    • a new table called vgpkg_geonames now exists
      • the chow CREATE statement shows:
        • CREATE VIRTUAL TABLE "vgpkg_geonames" USING VirtualGPKG("geonames") --
  • when viewing the Geometry field with BLOB explore
    • geonames: shows BLOB sz=?? UNKNOWN type
      • a Geometry in the gpkg-format
    • vgpkg_geonames: shows BLOB sz=?? GEOMETRY
      • a Geometry in the spatialite-format

2014-05-23: Mark Johnson, Berlin Germany


Clone this wiki locally