-
Notifications
You must be signed in to change notification settings - Fork 2
AutoGPKGStart Stop
mj10777 edited this page Oct 26, 2018
·
16 revisions
Creating / Destroying of a VirtualGPKG wrapper
<-- 'Index Page for GeoPackage - Commands'
Original Documentation [[SQL functions implementing OGC GeoPackage compatibility
|http://www.gaia-gis.it/gaia-sins/spatialite-sql-latest.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' returns
1
- 1
features
[Geometry] table calledgeonames
- 1
tiles
[Raster] table calledfromosm_tiles
- 1
-
'CheckGeoPackageMetaData' returns
- a valid R10 GeoPackage
SELECT AutoGPKGStart();
- returns
1
- 1
features
[Geometry] table found - a new table called
vgpkg_geonames
now exists- the
show CREATE statement
shows:CREATE VIRTUAL TABLE "vgpkg_geonames" USING VirtualGPKG("geonames")
- the
- 1
--
- when viewing the Geometry field with
BLOB explore
-
geonames
: showsBLOB sz=?? UNKNOWN type
- a Geometry in the gpkg-format
-
vgpkg_geonames
: showsBLOB sz=?? GEOMETRY
- a Geometry in the spatialite-format
-
'GeomFromGPB'
- will
not
be needed to retrieve these Geometries
- will
-
'GeomFromGPB'
- a Geometry in the spatialite-format
-
Note: at this point there is no (Spatialite-specific) SpatialIndex
-
'CreateSpatialIndex'
- will
fail
in aGeoPackage
- due to the missing, spatialite-specific,
geometry_columns
TABLE
- due to the missing, spatialite-specific,
- will
2014-05-23: Mark Johnson, Berlin Germany