Skip to content

Latest commit

 

History

History
72 lines (49 loc) · 2.15 KB

extension_geometry_encoding.adoc

File metadata and controls

72 lines (49 loc) · 2.15 KB

Appendix A: Geometry Encoding Extension (Normative)

Extension Title

User Defined Extension of GeoPackageBinary Geometry Encoding

Introduction

This extension specifies a standard way to implement user defined extensions of the GeoPackageBinary geometry encoding format to encode geometry types not specified in clauses [sql_geometry_types] and 3.1.1 and listed in [geometry_types]. It is intended to be a bridge to enable use of geometry types like EllipiticalCurve in Extended GeoPackages until standard encodings of such types are developed and published for the Well Known Binary (WKB) format.

Extension Author

Name of implementer, author_name NOT gpkg.

Extension Name or Template

Extension names are constructed from the <author_name>_geom_<gname> template where <gname> is the uppercase name of an extension geometry type NOT in [geometry_types].

Extension Type

Extension of Existing Requirement in clauses [gpb_format], [sql_geometry_types] and 3.1.1.

Applicability

This extension applies to any column specified in the gpkg_geometry_columns table.

Scope

Read-write

Requirements

This extension specifies the use of one of the reserved bits in the GeoPackageBinary header to indicate the presence of an ExtendedGeopackageBinary encoding format. In the extension case a four byte sequence follows the GPB header. This is intended to disambiguate various extensions. The actual extension geometry body is not specified.

GeoPackage

ExtendedGeoPackageBinary {
  GeoPackageBinaryHeader header; (1)
  byte[4] extension_code;        (2)
  byte[] extension_specific;     (3)
}
  1. The X bit in the header flags field must be set to 1.

  2. To indicate different extensions or vendors. 0x47504B47 (GPKG in ASCII) is reserved.

  3. Extension specific contents

GeoPackage SQLite Configuration

None

GeoPackage SQLite Extension

SQL functions that operate on GeoPackageBinary geometries as specified in other extensions SHALL operate correctly on the ExtendedGeopackageBinary specified in this extension.