Skip to content

Latest commit

 

History

History
173 lines (99 loc) · 9.41 KB

3_extensions.adoc

File metadata and controls

173 lines (99 loc) · 9.41 KB

Registered Extensions

This clause specifies requirements for GeoPackage extensions. Definitions of those extensions in the form specified by the template in [extension_template] are provided in Annexes J through P.

Features

The extensions defined in the following sub clauses MAY be implemented in a GeoPackage that implements features per clause Features.

GeoPackage Geometry Types Extension

Data

This extension of clause [sql_geometry_types] partially described in [extension_geometry_types] defines additional geometry types.

Extension Types

A GeoPackage MAY store feature table geometries with the extended non-linear geometry types (CircularString, CompoundCurve, CurvePolygon, MultiCurve, MultiSurface, Curve, Surface) in [geometry_types]. If it does so, they SHALL be encoded in the GeoPackageBinary geometry format.

Extensions Types - Extensions Name

An extension name to specify a feature geometry extension type SHALL be defined for the “gpkg” author name using the “gpkg_geom_<gname>” template where <gname> is the uppercase name of the extension geometry type from [geometry_types] used in a GeoPackage.

Extensions Types - Extensions Row

A GeoPackage that contains a gpkg_geometry_columns table or updateable view with row records that specify extension geometry_type_name column values SHALL contain a gpkg_extensions table that contains row records with table_name and column_name values from the gpkg_geometry_columns row records that identify extension type uses, and extension_name column values for each of those geometry types constructed per clause 3.1.1.1.2.

User-Defined Geometry Types Extension

Data

This extension of clauses [gpb_format], [sql_geometry_types] and GeoPackage Geometry Types Extension partially described in [extension_geometry_encoding] enables encoding of additional user-defined geometry types in ExtendedGeoPackageBinary format in an Extended GeoPackage.

Extensions Encoding

The ExtendedGeoPackageBinary format defined in [extension_geometry_encoding] SHALL be used to encode geometry types other than those specified in clauses [sql_geometry_types] and GeoPackage Geometry Types Extension and listed in [geometry_types].

Extensions Encoding - Extensions Name

An extension name to specify a feature geometry extension type encoded in the ExtendedGeoPackageBinary format SHALL be defined for an author name that is NOT “gpkg” using the “<author_name>_geom_<gname> template where <gname> is the uppercase name of an extension geometry type NOT listed in [geometry_types] used in a GeoPackage.

Extensions Encoding - Extensions Row

An Extended GeoPackage that contains a gpkg_geometry_columns table or updateable view with row records that specify extension geometry_type_name column values other than those specified in clauses [sql_geometry_types] and 3.1.1 and listed in [geometry_types] SHALL contain a gpkg_extensions table that contains row records with table_name and column_name values from the gpkg_geometry_columns row records that identify extension type uses, and extension_name column values for each of those geometry type constructed per clause 3.1.2.1.2.

Geometry Columns Geometry Type Name

The geometry_type_name value in a gpkg_geometry_columns row SHALL be the [user_defined_geometry_ext_name_req] extension name in uppercase.

RTree Spatial Indexes

Data

This extension described in [extension_rtree] adds a new capability for spatially indexing columns with geometries encoded per clause [gpb_format] and User-Defined Geometry Types Extension.

Spatial Indexes Implementation

Spatial indexes provide a significant performance advantage for searches with basic envelope spatial criteria that return subsets of the rows in a feature table with a non-trivial number (thousands or more) of rows.[1]

A GeoPackage SHALL implement spatial indexes on feature table geometry columns as specified in clause 3.1.3.1.1 using the SQLite Virtual Table RTrees and triggers specified in [extension_rtree].

Spatial Indexes - Extensions Name

The “gpkg_rtree_index” extension name SHALL be used as a gpkg_extensions table extension name column value to specify implementation of spatial indexes on a geometry column.

Spatial Indexes - Extensions Row

A GeoPackage that implements spatial indexes SHALL have a gpkg_extensions table that contains a row for each spatially indexed column with extension_name “gpkg_rtree_index”, the table_name of the table with a spatially indexed column, and the column_name of the spatially indexed column.

Geometry Type Triggers

Data

This extension described in [extension_geometry_type_triggers] adds a new geometry type triggers capability for columns with geometries encoded per clause [gpb_format] and User-Defined Geometry Types Extension.

Geometry Type Triggers – Implementation

A GeoPackage SHALL include the SQL insert and update triggers specified in [extension_geometry_type_triggers] on every geometry column to enforce the geometry type values specified for those columns in the gpkg_geometry_columns table.

Geometry Type Triggers – Extensions Name

The “gpkg_geometry_type_trigger” extension name SHALL be used as a gpkg_extensions table extension name column value to specify implementation of geometry type triggers.

Geometry Type Triggers – Extensions Row

A GeoPackage that implements geometry type triggers on geometry columns SHALL contain a gpkg_extensions table that contains a row for each such geometry column with extension_name “gpkg_geometry_type_trigger”, table_name of the feature table with a geometry column, and column_name of the geometry column.

SRS_ID Triggers

Data

This extension described in [extension_geometry_srsid_triggers] adds a new srs_id triggers capability for columns with geometries encoded per clause [gpb_format] and User-Defined Geometry Types Extension.

SRS_ID Triggers – Implementation

A GeoPackage SHALL include the SQL insert and update triggers specified in [extension_geometry_srsid_triggers] on every geometry column to enforce the srs_id values specified for those columns in the gpkg_geometry_columns table.

SRS_ID Triggers – Extensions Name

The “gpkg_srs_id_trigger” extension name SHALL be used as a gpkg_extensions table extension name column value to specify implementation of SRS_ID triggers specified in [extension_geometry_srsid_triggers].

SRS_ID Triggers – Extensions Row

A GeoPackage that implements srs_id triggers on feature table geometry columns SHALL contain a gpkg_extensions table that contains a row for each geometry column with extension_name “gpkg_srs_id_trigger”, table_name of the feature table with a geometry column, and column_name of the geometry column.

Tiles

The extensions defined in the following sub clauses MAY be implemented in a GeoPackage that implements tiles per clause Tiles.

Zoom Levels

Data

This extension of clause [zoom_levels] described in [extension_zoom_other_intervals] allows zoom level intervals other than a factor of two.

Zoom Other Intervals

Tile pyramid user data tables MAY have pixel sizes that vary by irregular intervals or by regular intervals other than a factor of two (the default) between adjacent zoom levels.

Zoom Other – Extensions Name

The “gpkg_zoom_other” extension name SHALL be used as a gpkg_extensions table extension name column value to specify implementation of other zoom intervals on a tile pyramid user data table as specified in [extension_zoom_other_intervals].

Zoom Other – Extensions Row

A GeoPackage that implements other zoom intervals SHALL have a gpkg_extensions table that contains a row for each tile pyramid user data table with other zoom intervals with extension_name “gpkg_zoom_other”, the table_name of the table with other zoom intervals, and the “tile_data” column_name.

Tile Encoding WEBP

Data

This extension of clauses [tile_enc_png] and [tile_enc_jpeg] described in [extension_tiles_webp] allows encoding of tile images in WebP format.

WEBP MIME Type

A GeoPackage that contains a tile pyramid user data table that contains tile data MAY store tile_data in MIME type image/x-webp [22].

WEBP — Extensions Name

The "gpkg_webp" extension name SHALL be used as a gpkg_extensions table extension name column value to specify storage of tile pyramid images in WEBP format as specified in [extension_tiles_webp].

WEBP — Extensions Row

A GeoPackage that contains tile pyramid user data tables with tile_data columns that contain images in WEBP format SHALL contain a gpkg_extensions table that contains row records with table_name values for each such table, “tile_data” column_name values and extension_name column values of “gpkg_webp”.


1. If an application process will make many updates, it is often faster to drop the indexes, do the updates, and then recreate the indexes.