Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 102 lines (70 sloc) 4.39 KB

Vector Tiles Extension

Extension Title

Vector Tiles

Introduction

The GeoPackage Vector Tiles extension defines the rules and requirements for encoding tiled feature data in a format commonly known as "vector tiles" into a GeoPackage data store.

Warning

This extension does not define an encoding for vector tiles. To be usable, an additional extension such as Mapbox Vector Tiles Extension or GeoJSON Vector Tiles Extension must also be used.

This extension, like all GeoPackage extensions, is intended to be transparent and to not interfere with GeoPackage-compliant, but non-supporting, software packages.

Extension Author

Image Matters LLC, in collaboration with the participants of the OGC Vector Tiles Pilot and OGC Testbed-15.

Extension Name or Template

im_vector_tiles (If this extension is adopted by OGC, then gpkg_vector_tiles will be named as an alias.)

Extension Type

This extension provides new requirements dependent on GeoPackage Clause 2.2 (tiles).

Applicability

This extension defines an alternate way to encode feature information into a GeoPackage.

Scope

read-write

Specification

If this extension is in use, then all of the Tiles Option applies. The individual tiles (tile_data in a tile pyramid user data table) are vector tiles.

Note

Individual vector tiles MAY be deflate compressed.

There are two additional required metadata tables, [gpkgext_tfd_layers] and [gpkgext_tfd_fields], that mirror the vector_layers key from the JSON object from the metadata from MBTiles. This allows client software to understand the feature schemas without having to open individual tiles.

gpkg_extensions

To use this extension, add the following rows to this table.

Table 1. gpkg_extensions Table Rows
table_name column_name extension_name definition scope

gpkgext_vt_layers

NULL

im_vector_tiles

a reference to this file

read-write

gpkgext_vt_fields

NULL

im_vector_tiles

a reference to this file

read-write

Note

The values in the definition column SHOULD refer in some human-readable way to this extension specification. If the extension is adopted by OGC, it will gain the "gpkg_" prefix and get a different definition permalink.

gpkg_contents

Like any other content type, add a row for each tile set, using a data_type of "vector-tiles".

gpkg_spatial_ref_sys

Like any other content type, the Spatial Reference System (SRS) for the content to be stored must be registered in this table. See clause 1.1.2 in the core GeoPackage standard. While any valid SRS may be used, Web Mercator (EPSG:3857) maintains compatibility with MVT.

gpkgext_vt_layers

The gpkgext_vt_layers table describes the layers in a vector tiles set. The columns in this table are:

  • id is a primary key

  • table_name matches the entry in gpkg_contents

  • name is the layer name

  • description is an optional text description

  • minzoom and maxzoom are the optional integer minimum and maximum zoom levels

  • stylable_layer_set is the optional name to identify the intended styles and stylesheets for the layer

  • attributes_table_name is the optional name of an attributes table containing the attributes (when not embedded in the vector tiles)

gpkgext_vt_fields

The gpkgext_vt_fields table describes the fields (attributes) for a tiled feature data layer. The columns in this table are:

  • id is a primary key

  • layer_id is a foreign key to id in gpkgext_vt_layers

  • name is the field name

  • type is either "String", "Number", or "Boolean"

Note

This table is not to be used for layers with a non-null attributes_table_name.

You can’t perform that action at this time.