Skip to content

Commit eb5e3c3

Browse files
paul van genuchtenpka
paul van genuchten
authored andcommitted
move owc to its own repo (#24)
1 parent a2af085 commit eb5e3c3

File tree

1 file changed

+7
-98
lines changed

1 file changed

+7
-98
lines changed

owc_geopackage_extension.md

+7-98
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,10 @@
1-
# GeoPackage 1.0 Extension
1+
# GeoPackage-OWC
22

3-
**DRAFT**
3+
QGPKG offers read support for the GeoPackage-OWC extension. Goal of the extension is to store context and styling of a mapping project in a standardised way as part of a GeoPackage file. The specification is maintained at [this repository](https://github.com/GeoCat/geopackage-owc-spec).
44

5-
Extension follows template from Annex I of the OGC [GeoPackage 1.0 Specification](http://www.geopackage.org/).
5+
The extension introduces 3 tables;
6+
- owc_context; which stores the project context (layer order)
7+
- owc_style; which store the layer styling
8+
- owc_resource; stores additional resources (thumbnails, fonts, documentation)
69

7-
## Extension Title
8-
9-
**OWS Context**
10-
11-
## Introduction
12-
13-
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. The extension aims at similar use cases as presented in [The USGS GeoPackage Styling Experiment in Testbed 12](http://docs.opengeospatial.org/per/16-037.html), however the approach is a bit different.
14-
15-
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.
16-
17-
[OWS Context](http://www.owscontext.org/) 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.
18-
19-
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}]`.
20-
21-
```xml
22-
<owc:offering code="http://www.opengis.net/spec/owc-atom/1.0/req/gpkg">
23-
<owc:content type="application/x-sqlite" href="#table=MyPoints" />
24-
<owc:styleSet>
25-
<owc:name>simple_point</owc:name>
26-
<owc:title>Simple point</owc:title>
27-
<owc:content href="#table=owc_style&amp;name=simplePoint" type="application/sld+xml"/>
28-
</owc:styleSet>
29-
</owc:offering>
30-
```
31-
32-
OWC offering MUST include a styleSet reference, referencing an external SLD file or an SLD from the owc_style table.
33-
34-
35-
## Extension Author
36-
37-
Paul van Genuchten, Joana Simoes.
38-
39-
40-
## Extension Name or Template
41-
42-
`owc`
43-
44-
## Extension Type
45-
46-
Extension of concepts
47-
48-
## Applicability
49-
50-
This extension applies to additional tables `owc_context`, `owc_resources`, `owc_style`.
51-
52-
## Scope
53-
54-
Read-write
55-
56-
## Requirements
57-
58-
### GeoPackage
59-
60-
#### Extension tables
61-
62-
An Extended GeoPackage with Context support MAY contain the following tables or views:
63-
64-
**owc_context**
65-
66-
| Column | type | Description |
67-
|----|-----|----|
68-
| name | varchar(30) unique | Context name |
69-
| abstract | text | Context abstract |
70-
| author | text | Comma separated list of authors |
71-
| language | text | based on RFC-3066 code|
72-
| mime_type | text NOT NULL | [mime type](http://www.iana.org/assignments/media-types/media-types.xhtml) of context ([application/atom+xml](https://portal.opengeospatial.org/files/?artifact_id=55183) / [application/json](https://github.com/opengeospatial/owscontext/tree/master/json) / [application/vnd.owc+xml](https://portal.opengeospatial.org/files/?artifact_id=55182)) |
73-
| content | text NOT NULL | Content of OWS_Context encoded as indicated in `mime_type` |
74-
75-
**owc_style**
76-
77-
| Column | type | Description |
78-
|----|-----|----|
79-
| name | varchar(30) * | |
80-
| abstract | text | |
81-
| mime_type | varchar(30) * | The [mime type](http://www.iana.org/assignments/media-types/media-types.xhtml) of the style ( [application/vnd.sld+xml](http://www.opengeospatial.org/standards/sld) / text/css / application/json) |
82-
| content | text NOT NULL | Content of the style encoded as indicated in `mime_type` |
83-
84-
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.
85-
86-
**owc_resource**
87-
88-
| Column | type | Description |
89-
|----|-----|----|
90-
| name | varchar(30) unique | Name of resource (file name) |
91-
| mime_type | text NOT NULL | The [mime type](http://www.iana.org/assignments/media-types/media-types.xhtml) of the resource (image/png, application/pdf, ...) |
92-
| content | blob NOT NULL | Binary content of resource |
93-
94-
95-
### GeoPackage SQLite Configuration
96-
97-
None
98-
99-
### GeoPackage SQLite Extension
100-
101-
None
10+
A GeoPackage-OWC example is provided [here](examples/multiple_layers.gpkg)

0 commit comments

Comments
 (0)