Skip to content

Latest commit



101 lines (62 loc) · 4 KB

File metadata and controls

101 lines (62 loc) · 4 KB

GeoPackage 1.0 Extension


Extension follows template from Annex I of the OGC GeoPackage 1.0 Specification.

Extension Title

GeoPackage OWC specification


The main goal of the extension is to store context and styling of a mapping project as part of a GeoPackage file containing the data it refers to.

Approach: Table owc_context stores one or multiple OWS Context files that defines a set of layers on a set of data tables using certain styles. Each layer is encoded in an ows:entry element; each style is encoded whithin the layer, as a ows:offering, in the owc:styleSet element. Any data table or style can be referenced by a layer in an OWS Context multiple times. Table owc_style defines which styles are available. Resources from owc_resources can be referenced from metadata, styles or context, to enable inclusion of images, pdf, fonts etc.

OWS Context 1.0 defines the capability to reference layers from OWS services and certain filetypes (gml/kml). In this extension we introduce the capability in OWS context to reference tables local to the Geopackage.

The OWS Context specification is extended with an offeringtype="gpkg" and OWS-context is extended to support referencing resources local to the Geopackage by using #table={table}[&{fieldname}={value}].

<owc:offering code="">
  <owc:content type="application/x-sqlite" href="#table=MyPoints" />
    <owc:title>Simple point</owc:title>
    <owc:content href="#table=owc_style&amp;name=simplePoint" type="application/sld+xml"/>

OWC offering MUST include a styleSet reference, referencing an external SLD file or an SLD from the owc_style table.

Extension Author

Paul van Genuchten, Joana Simoes.

Extension Name or Template


Extension Type

Extension of concepts


This extension applies to additional tables owc_context, owc_resources, owc_style.





Extension tables

An Extended GeoPackage with Context support MAY contain the following tables or views:


Column type Description
name varchar(30) unique Context name
abstract text Context abstract
author text Comma separated list of authors
language text based on RFC-3066 code
mime_type text NOT NULL mime type of context (application/atom+xml / application/json / application/vnd.owc+xml)
content text NOT NULL Content of OWS_Context encoded as indicated in mime_type


Column type Description
name varchar(30) *
abstract text
mime_type varchar(30) * The mime type of the style ( application/vnd.sld+xml / text/css / application/json)
content text NOT NULL Content of the style encoded as indicated in mime_type

A unique index of name and mime_type allows clients to select the most optimal mime-type for rendering (some mime-types may support additional vendor parameters). It is recommended to at least provide one style as appliction/vnd.sld+xml.


Column type Description
name varchar(30) unique Name of resource (file name)
mime_type text NOT NULL The mime type of the resource (image/png, application/pdf, ...)
content blob NOT NULL Binary content of resource

GeoPackage SQLite Configuration


GeoPackage SQLite Extension