Publication Date: 2018-01-26

Approval Date: 2018-01-24

Posted Date: 2017-11-15

Reference number of this document: OGC 17-027

Reference URL for this document: http://www.opengis.net/doc/PER/t13-UG001

Category: Public Engineering Report

Editor: Robert Cass

Title: OGC Testbed-13: GeoPackage Engineering Report


OGC Engineering Report

COPYRIGHT

Copyright © 2018 Open Geospatial Consortium. To obtain additional rights of use, visit http://www.opengeospatial.org/

WARNING

This document is not an OGC Standard. This document is an OGC Public Engineering Report created as a deliverable in an OGC Interoperability Initiative and is not an official position of the OGC membership. It is distributed for review and comment. It is subject to change without notice and may not be referred to as an OGC Standard. Further, any OGC Engineering Report should not be referenced as required or mandatory technology in procurements. However, the discussions in this document could very well lead to the definition of an OGC Standard.

LICENSE AGREEMENT

Permission is hereby granted by the Open Geospatial Consortium, ("Licensor"), free of charge and subject to the terms set forth below, to any person obtaining a copy of this Intellectual Property and any associated documentation, to deal in the Intellectual Property without restriction (except as set forth below), including without limitation the rights to implement, use, copy, modify, merge, publish, distribute, and/or sublicense copies of the Intellectual Property, and to permit persons to whom the Intellectual Property is furnished to do so, provided that all copyright notices on the intellectual property are retained intact and that each person to whom the Intellectual Property is furnished agrees to the terms of this Agreement.

If you modify the Intellectual Property, all copies of the modified Intellectual Property must include, in addition to the above copyright notice, a notice that the Intellectual Property includes modifications that have not been approved or adopted by LICENSOR.

THIS LICENSE IS A COPYRIGHT LICENSE ONLY, AND DOES NOT CONVEY ANY RIGHTS UNDER ANY PATENTS THAT MAY BE IN FORCE ANYWHERE IN THE WORLD. THE INTELLECTUAL PROPERTY IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE DO NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE INTELLECTUAL PROPERTY WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE INTELLECTUAL PROPERTY WILL BE UNINTERRUPTED OR ERROR FREE. ANY USE OF THE INTELLECTUAL PROPERTY SHALL BE MADE ENTIRELY AT THE USER’S OWN RISK. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ANY CONTRIBUTOR OF INTELLECTUAL PROPERTY RIGHTS TO THE INTELLECTUAL PROPERTY BE LIABLE FOR ANY CLAIM, OR ANY DIRECT, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM ANY ALLEGED INFRINGEMENT OR ANY LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR UNDER ANY OTHER LEGAL THEORY, ARISING OUT OF OR IN CONNECTION WITH THE IMPLEMENTATION, USE, COMMERCIALIZATION OR PERFORMANCE OF THIS INTELLECTUAL PROPERTY.

This license is effective until terminated. You may terminate it at any time by destroying the Intellectual Property together with all copies in any form. The license will also terminate if you fail to comply with any term or condition of this Agreement. Except as provided in the following sentence, no such termination of this license shall require the termination of any third party end-user sublicense to the Intellectual Property which is in force as of the date of notice of such termination. In addition, should the Intellectual Property, or the operation of the Intellectual Property, infringe, or in LICENSOR’s sole opinion be likely to infringe, any patent, copyright, trademark or other right of a third party, you agree that LICENSOR, in its sole discretion, may terminate this license without any compensation or liability to you, your licensees or any other party. You agree upon termination of any kind to destroy or cause to be destroyed the Intellectual Property together with all copies in any form, whether held by you or by any third party.

Except as contained in this notice, the name of LICENSOR or of any other holder of a copyright in all or part of the Intellectual Property shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Intellectual Property without prior written authorization of LICENSOR or such copyright holder. LICENSOR is and shall at all times be the sole entity that may authorize you or any third party to use certification marks, trademarks or other special designations to indicate compliance with any LICENSOR standards or specifications.

This Agreement is governed by the laws of the Commonwealth of Massachusetts. The application to this Agreement of the United Nations Convention on Contracts for the International Sale of Goods is hereby expressly excluded. In the event any provision of this Agreement shall be deemed unenforceable, void or invalid, such provision shall be modified so as to make it valid and enforceable, and as so modified the entire Agreement shall remain in full force and effect. No decision, action or inaction by LICENSOR shall be construed to be a waiver of any rights or remedies available to it.

None of the Intellectual Property or underlying information or technology may be downloaded or otherwise exported or reexported in violation of U.S. export laws and regulations. In addition, you are responsible for complying with any local laws in your jurisdiction which may impact your right to import, export or use the Intellectual Property, and you represent that you have complied with any regulations or registration procedures required by applicable law to make this license enforceable.

Table of Contents

1. Summary

This Engineering Report details the processes and results related to generating GeoPackages developed to contain topographic vector features and supporting symbologies based on The National Map (TNM) product of the United States Geological Survey (USGS).

1.1. Requirements

The Engineering Report shall describe all testbed activities on the integration of USGS Topo Combined Vector Product data to GeoPackage, all experiences made during implementation, including recommendations to the sponsor, and provide any resulting standards change requests to the appropriate standards working groups. The report will also cover these specific items:

  • Problems / obstacles encountered working on the USGS specific GeoPackage and geospatial/non geospatial metadata integration requirements.

  • Documented process used in meeting the requirements including process for downloading the GeoPackage (encoded with symbology)

  • Recommendations for further work needed specific to these Testbed-13 requirements.

The work covered by this Engineering Report falls under the two Testbed-13 deliverables :

  • UG102 GeoPackage

  • AB102 GeoPackage Mobile client for Symbology and Styles

1.2. Key Findings and Prior-After Comparison

Standardized Universal Transverse Mercator (UTM) tile grids are a worthwhile goal for the OGC. Since work on the testbed began, a set of universal tilesets has been proposed. These tilesets are under consideration for adoption for use in GeoPackage to support map projections other than Geographic and Web Mercator. The adoption of these standardized tilesets will aid interoperability and put the necessary references in the hands of GeoPackage producers to generate GeoPackaged tilesets using Map Projections required by client communities.

OGC Symbology Encoding (SE) has been in existence since 2007 and has some uptake, however, there are some key barriers to its adoption. These barriers are the complexity of a full implementation which requires adherence to ideas such as filters, arbitrary sets of functions, which are beneficial, but require more investment than an engine that draws only the symbology. This testbed used the symbol drawing functionality proposed by SE as a sort of SE "lite". The approach is discussed further in [[annex-gpkg]]. This approach was reasonable, and the limitations on the symbology were typical shortcomings of SE related to placement of symbols or labels, for which there are no specific directives available in SE.

1.2.1. Prior Work

In OGC testbed-12 similar work stored the same topographic and reference data, using a static proprietary symbology encoding. The Testbed-12 Engineering Report B004-GeoPackage-US-Topo[TB12GPKG] documented the work. The GeoPackage Community expressed a need to have well-known standards for rendering geographic features on a map using instructions stored in an interoperable manner. The Testbed-12 approach had limitations which prompted the Testbed-13 work :

  • Styling was static and would not change when features were updated

  • Symbology in a proprietary format

  • Reference data was not projected into local projections such as UTM

  • Layer grouping and layer ordering did not exist

  • Compliant Metadata was not supported in the GeoPackage

A group has proposed using OGC Web Services (OWS) Context in GeoPackage, which includes support for layer ordering and symbolization to support these requirements. The context encoding has a broad function which does not make use of the table structure and query functionality associated with a GeoPackage.

No definitive uniform Tile Matrix Sets for UTM exist.Work performed within the United States National System for Geospatial Intelligence (NSG) has defined approaches for global Mercator projections[SIG0014], some of this work may be valuable to understand how to define these tile sets.

1.3. What does this ER mean for the Working Group and OGC in general

This ER should help advance the understanding of GeoPackage, suggest a method of symbology encoding, methods of storing tiles in non global projections. This ER should provide insight into using mobile clients to render GeoPackages in local projections e.g. UTM.

1.4. Document contributor contact points

All questions regarding this document should be directed to the editor or the contributors:

Table 1. Contacts
Name Organization

Rob Cass

Compusult Ltd.

Kristin Fishburn

USGS

1.5. Future Work

Future work related to the efforts described in this engineering report should focus on:

  • the continued support and development of symbology standards within the OGC meet the needs of mapping organizations such as the USGS,

  • the extension of the GeoPackage standard to support the encoding of styling information accompanying feature data stored in a GeoPackage,

  • the adoption of common raster tilesets for well-known projections to support easy exchange of tiled raster data through Web Map Tile Service (WMTS) and GeoPackage,

  • the extension of OWS Context (OWC) to support well known vector storage formats such as ESRI FileGDB and GeoPackage,

  • the extension of OWC to support referencing and querying "layers" of information contained in traditionally opaque formats such as GeoPackage, KML, FileGDB; and

  • a standard for internally referencing GeoPackage entities and attributes that use querying methods.

1.6. Foreword

Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. The Open Geospatial Consortium shall not be held responsible for identifying any or all such patent rights.

Recipients of this document are requested to submit, with their comments, notification of any relevant patent claims or other intellectual property rights of which they may be aware that might be infringed by any implementation of the standard set forth in this document, and to provide supporting documentation.

2. References

3. Terms and definitions

For the purposes of this report, the definitions specified in Clause 4 of the OWS Common Implementation Standard OGC 06-121r9 shall apply. In addition, the following terms and definitions apply.

3.1. asynchronous

A form of client-server communication in which the server responds immediately that a requested operation has begun. A client can make requests to the server for the status and result of the operation, or the client can receive notification of the status and result. This form of communication is typically used when the operation takes a significant amount of time.

3.2. portrayal

The process of using symbology to draw map features.

3.3. GeoPackage

An sqlite database that stores vector features, raster imagery, non-spatial data and extended data using a standard defined at http://www.geopackage.org/.

3.4. GeoPackage extension

An additional information encoding standard used in a GeoPackage defined using the GeoPackage extension mechanism.

3.5. styling

A portrayal sub-process that uses a feature's attributes and display context to determine the symbology used to draw that feature.

3.6. symbology

A system of symbols used to draw map features.

3.7. topographic data

Data used to represent man-made and natural features as well as contour intervals. This data is made available in digital form to support portrayal by computers on-screen and on paper.

4. Abbreviated terms

  • API Application Program Interface

  • GPKG GeoPackage

  • JSON JavaScript Object Notation

  • OWC OWS Context Document

  • SE OGC Symbology Encoding

  • SLD OGC Styled Layer Descriptor

  • TIFF Tagged Interchange File Format

  • TTF TrueType Font

  • UTM Universal Transverse Mercator

  • WMS Web Map Service

  • WMTS Web Map Tile Service

  • WPS OGC Web Processing Service

  • XML eXtensible Markup Language

5. Overview

This Engineering Report records the work done for Testbed-13 to support the generation of USGS topographic data GeoPackages so that they can be visualized in a client according to USGS requirements.

5.1. clause-requirements

The Engineering Report shall describe all testbed activities on the integration of USGS Topo Combined Vector Product data to GeoPackage, all experiences made during implementation, including recommendations to the sponsor, and provide any resulting standards change requests to the appropriate standards working groups. The report will also cover these specific items:

  • Problems / obstacles encountered working on the USGS specific GeoPackage and geospatial/non geospatial metadata integration requirements.

  • Documented process used in meeting the requirements including process for downloading the GeoPackage (encoded with symbology)

  • Recommendations for further work needed specific to these Testbed-13 requirements.

The work covered by this Engineering Report falls under the two Testbed-13 deliverables :

  • UG102 GeoPackage

  • AB102 GeoPackage Mobile client for Symbology and Styles

6. Solutions

6.1. Web Processing Service (WPS) Solution

To generate useful GeoPackages by aggregating distributed data sources, such as Web Map Tile Service (WMTS), Web Map Service (WMS), and network available FileGDBS and style sheets, a WPS handles the registration of these resources. Clients invoke this WPS to create GeoPackages.

The WPS takes Extensible Markup Language (XML) requests to :

  • Create, retrieve, GeoPackages

  • Monitor the status of the GeoPackage Creation Process

  • Identify the URL of the resulting GeoPackage to download

The sequence diagram below illustrates the process used for generating a GPKG from USGS resources.

GeoPackage Generation Sequence Diagram
Figure 1. GeoPackage Generation Sequence Diagram

Each operation used in the general flow follows the WPS 2.0 specification[WPS]

WPS Operations describes the WPS operations illustrated in Figure 1 in detail.

6.1.1. Support for SE Style Rendering

Testbed-13 provided an opportunity to test the effectiveness of the OGC Symbology Encoding (SE) standard as the encoding of choice used in a GeoPackage styling extension. This extension was used in Testbed-12 to style topographic vector feature data provided by the USGS.

In order to maintain a reasonable scope during the testbed a subset of SE functionality was implemented. The graphic rendering elements were kept, but other more complicated elements were discarded. This approach reduced scope, and avoided duplication of styling filters. To have the filters expressed in SE, when the filter rules were also implemented in a GeoPackage extension was unnecessary.

The diagrams shown immediately below illustrate the subset of SE symbolizers used to render the USGS topographic data.

PointSymbolizer
Figure 2. Point Symbolizer
PolygonSymbolizer
Figure 3. PolygonSymbolizer
LineSymbolizer
Figure 4. LineSymbolizer
TextSymbolizer
Figure 5. TextSymbolizer

This approach was successful. The following issues were found when trying to implement styling rules in SE :

  • Inline content or URLS are used for images in SE. In the styling extension, images are stored in a separate table. There was a need to refer to the images stored in the GeoPackage. This issue is not a fault of SE, but illustrates a common need for this form of referencing in a GeoPackage. An "extension" of SE was encoded using sql to define the database query to extract the image. It has since been pointed out that this approach is dangerous as sql could be introduced to to do something other than query the images table. This danger highlights the need for a standardized method for internal gpkg references that is approved and reviewed.

  • There is no real support for shield symbology such as highway shields which require a 2 pass approach [3]. In order to support this with the current implementation, 2 layers would be required to support the drawing of the shield symbol, then another layer to draw the shield label on top. In order to get around this, parameters were introduced for line text symbolizers so that they would be drawn at the vertices of the line feature. The shield shaped ticks for the line symbolizers are also drawn on the vertex of the line feature. Having both of these drawn in the correct order draws something like a shield. Both Bocher[3] and the GeoServer team recognized this shortcoming and either requested it or implemented the functionality as an extension. This requirement should be reviewed and supported in future versions of SE.