gpkgAddSpatialIndex - geopaparazzi/Spatialite-Tasks-with-Sql-Scripts GitHub Wiki

Create a GeoPackage SpatialIndex

--> 'List of Sql-Commands'

<-- 'Index Page for GeoPackage - Commands'


Original Documentation 'SQL functions implementing OGC GeoPackage compatibility'

  • gpkgAddSpatialIndex( table_name String , geometry_column_name String ) : void
    • This function will add Geopackage Spatial Index support for the named table

  • sample 20140101.world_Haiti.gpkg
SELECT gpkgAddSpatialIndex('geonames','geometry');
  • returns

    • NULL
  • gpkg_extensions

    • now has 1 entry
'geonames' 'geometry' 'gpkg_rtree_index' 'GeoPackage 1.0 Specification Annex L' 'write-only'`
  • 4 rtree_geonames_* VIRTUAL TABLE's have been created

    • rtree_geonames_geometry
      • is empty
  • INSERT,DELETE,UPDATE triggers's have been added to geonames

    • for rtree_geonames_geometry

2014-05-23: Mark Johnson, Berlin Germany