Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
277 lines (234 sloc) 11.6 KB

OWS Context Extension (Normative)

Extension Title

OWS Context

Introduction

This extension provides a mechanism for storing OWS Context content in a GeoPackage. This extension is based on a new SQL Content extension ([owc_sql_content_extension]) for OWS Context.

Extension Author

Jeff Yutzler

Extension Name or Template

owscontext (will become gpkg_owscontext if adopted by OGC)

Extension Type

New requirement dependent on Clause 1.

Applicability

This extension adds an additional level of organization to existing GeoPackage data.

Scope

read-write

Requirements Classes

OWS Context Core

gpkg_extensions
Table Values
Requirement 1

GeoPackages with rows in the gpkg_extensions table with an extension_name of "ows_context" SHALL comply with this extension. The gpkg_extensions table SHALL contain rows as described in GeoPackage Extensions Table Values.

Table 1. GeoPackage Extensions Table Values
table_name column_name extension_name definition scope

gpkgext_context

null

ows_context

see below

read-write

gpkgext_context_resources

null

ows_context

see below

read-write

gpkgext_context_offerings

null

ows_context

see below

read-write

gpkgext_context_operations

null

ows_context

see below

read-write

gpkgext_context_contents

null

ows_context

see below

read-write

gpkgext_context_styles

null

ows_context

see below

read-write

The values in the definition column SHOULD refer in some human-readable way to this extension specification.

gpkgext_context
Table Definition
Requirement 2

A GeoPackage that complies with this extension SHALL contain a gpkgext_context table as per OWS Context Table Definition and [gpkgext_context_sql].

Table 2. OWS Context Table Definition
Column Name Column Type Column Description Null Default Key

id

INTEGER

Autoincrement primary key

no

PK

title

TEXT

A human-readable title for the OWS Context document

no

abstract

TEXT

A human-readable description of the OWS Context document purpose and/or content

yes

''

last_change

DATETIME

timestamp of last change to content, in ISO 8601 format

no

strftime('%Y-%m-%dT%H:%M:%fZ', 'now')

min_x

DOUBLE

Bounding box minimum easting or longitude for the users of the context document

yes

min_y

DOUBLE

Bounding box minimum northing or latitude for the users of the context document

yes

max_x

DOUBLE

Bounding box maximum easting or longitude for the users of the context document

yes

max_y

DOUBLE

Bounding box maximum northing or latitude for the users of the context document

yes

srs_id

INTEGER

Spatial Reference System ID: gpkg_spatial_ref_sys.srs_id for the geographic extents

yes

FK

author

TEXT

Identifier for the author of the document

yes

publisher

TEXT

Identifier for the publisher of the document

yes

creator

TEXT

The tool/application used to create the context document and its properties

yes

rights

TEXT

Rights which apply to the context document

yes

keywords

TEXT

Comma-delimited list of keywords related to this context document

yes

metadata_id

INTEGER

id from gpkg_metadata

yes

min_time

DATETIME

Beginning of time interval, in ISO 8601 format

yes

max_time

DATETIME

End of time interval, in ISO 8601 format

yes

Note

The rights described apply to the Context Document itself and not to any of its contents. The intent of the temporal and spatial extents is to indicate to a GeoPackage client the expected view of the information in area in time, not to describe the referenced resources themselves.

Table Values
Requirement 3

A GeoPackage that contains one or more non-null values in the metadata column of gpkgext_context SHALL conform to the GeoPackage Metadata Extension.

Requirement 4

Values of the metadata_id column of gpkgext_context SHALL correspond to the id column of gpkg_metadata.

gpkgext_context_resources

The gpkgext_context_resources table implements owc:SQLResource ([ows_context_sql_resource]).

Table Definition
Requirement 5

A GeoPackage that complies with this extension SHALL contain a gpkgext_context_resources table as per OWS Context Resources Table Definition and [gpkgext_context_resources_sql].

Table 3. OWS Context Resources Table Definition
Column Name Column Type Column Description Null Default Key

id

INTEGER

Autoincrement primary key

no

PK

context_id

INTEGER

id from gpkgext_context

no

FK

author

TEXT

Identifier for the author of the resource definition

yes

publisher

TEXT

Identifier for the publisher of the resource definition

yes

rights

TEXT

Rights which apply to the resource definition

yes

min_x

DOUBLE

Bounding box minimum easting or longitude of the resource

yes

min_y

DOUBLE

Bounding box minimum northing or latitude of the resource

yes

max_x

DOUBLE

Bounding box maximum easting or longitude of the resource

yes

max_y

DOUBLE

Bounding box maximum northing or latitude of the resource

yes

srs_id

INTEGER

Spatial Reference System ID: gpkg_spatial_ref_sys.srs_id for the geographic extents

yes

FK

min_time

DATETIME

Beginning of time interval, in ISO 8601 format

yes

max_time

DATETIME

End of time interval, in ISO 8601 format

yes

description

TEXT

A reference to a description of the Context resource in alternative format

yes

active

BOOLEAN

This flag indicates the state of the resource within the context document. It can be interpreted by the caller as required (this may be defined in a profile or in the specific service extensions)

yes

TRUE

keywords

TEXT

Comma-delimited list of keywords related to this context document

yes

min_scale_denominator

DOUBLE

Minimum scale for the display of the layer

yes

max_scale_denominator

DOUBLE

Maximum scale for the display of the layer

yes

order

DOUBLE

The ascending order of the resource

yes

Table Values
Requirement 6

The context_id column for each row in gpkgext_context_resources SHALL refer to the id from gpkgext_context.

gpkgext_context_offerings

The gpkgext_context_offerings table implements owc:Offering ([owc_offering]).

Table Definition
Requirement 7

A GeoPackage that complies with this extension SHALL contain a gpkgext_context_offerings table as per OWS Context Offerings Table Definition and [gpkgext_context_offerings_sql].

Table 4. OWS Context Offerings Table Definition
Column Name Column Type Column Description Null Default Key

id

INTEGER

Autoincrement primary key

no

PK

resource_id

INTEGER

id from gpkgext_context_resources

no

FK

code

TEXT

Code identifying the type of offering

no

Table Values
Requirement 8

The resource_id column for each row in gpkgext_context_offerings SHALL refer to the id from gpkgext_context_resources.

gpkgext_context_operations

The gpkgext_context_operations table implements owc:Operation ([owc_operation]).

Table Definition
Requirement 9

A GeoPackage that complies with this extension SHALL contain a gpkgext_context_operations table as per OWS Context Operations Table Definition and [gpkgext_context_operations_sql].

Table 5. OWS Context Operations Table Definition
Column Name Column Type Column Description Null Default Key

id

INTEGER

Autoincrement primary key

no

PK

offering_id

INTEGER

id from gpkgext_context_offerings

no

FK

code

TEXT

Code identifying the type of operation

no

method

TEXT

Name of operation method request

no

type

TEXT

MIMEType of the return result

no

requestURL

TEXT

Service Request URL

no

request

TEXT

Optional request body content

yes

result

BLOB

Result of the operation

yes

Table Values
Requirement 10

The offering_id column for each row in gpkgext_context_operations SHALL refer to the id from gpkgext_context_offerings.

gpkgext_context_contents

The gpkgext_context_contents table implements owc:SQLContent ([owc_sql_content]).

Table Definition
Requirement 11

A GeoPackage that complies with this extension SHALL contain a gpkgext_context_contents table as per OWS Context Contents Table Definition and [gpkgext_context_contents_sql].

Table 6. OWS Context Contents Table Definition
Column Name Column Type Column Description Null Default Key

id

INTEGER

Autoincrement primary key

no

PK

operation_id

INTEGER

id from gpkgext_context_operations

no

FK

from

TEXT

A single table or view name

no

query

TEXT

The actual SQL query

yes

Table Values
Requirement 12

The operation_id column for each row in gpkgext_context_contents SHALL refer to the id from gpkgext_context_operations.

gpkgext_context_styles

The gpkgext_context_styles table implements owc:StyleSet.

Table Definition
Requirement 13

A GeoPackage that complies with this extension SHALL contain a gpkgext_context_styles table as per OWS Context Styles Table Definition and [gpkgext_context_styles_sql].

Table 7. OWS Context Styles Table Definition
Column Name Column Type Column Description Null Default Key

id

INTEGER

Autoincrement primary key

no

PK

offering_id

INTEGER

id from gpkgext_context_offerings

no

FK

TBD

TBD

TBD

TBD

TBD

TBD

Table Values
Requirement 14

The offering_id column for each row in gpkgext_context_styles SHALL refer to the id from gpkgext_context_offerings.

You can’t perform that action at this time.