Publication Date: 2019-02-11
Approval Date: 2018-12-13
Submission Date: 2018-11-14
Reference number of this document: OGC 18-083
Reference URL for this document: http://www.opengis.net/doc/PER/vtp-wmts1
Category: Public Engineering Report
Editor: Panagiotis (Peter) A. Vretanos
Title: OGC Vector Tiles Pilot: WMTS Vector Tiles Extension Engineering Report
COPYRIGHT
Copyright © 2019 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.
1. Summary
The tiling of feature data is an approach that can be used to optimize the delivery vector feature data over the web to create maps. The approach provides a pre-defined shape (i.e. tile) to package vector data. Tiling of vector data enables faster map loads (due to reduced size) and offer flexible styling on the client side with modern, easy-to-use tools.
This Engineering Report (ER) describes the work done by participants during the Vector Tiles Pilot (VTP) to add Mapbox and GeoJSON vector tile support to Web Map Tile Servers. A summary of other work done in the VTP is presented in the VTP Summary Engineering Report [1].
Note
|
This engineering report interchangeably uses both 'tiled feature data' and the colloquial term 'vector tiles'. |
1.1. Requirements & Research Motivation
The Web Map Tile Service (WMTS) standard currently offers predefined tiles in a fixed set of graphical representations with no provision, from the perspective of a client, for adding additional styles or even dynamically styling tiles on the fly. However, some implementations, like GeoServer, can be configured to allow style selection, dynamic styling and even on-the-fly content filtering, at the price of either extra storage or no caching).
This ER addresses this deficiency by exploring the addition of tiled feature data support to a WMTS as another supported output format. This addition to WMTS follows lessons learnt from the recent OGC Testbed-13 initiative [2]. Tiled feature data can be efficiently transmitted to the client where the data can be styled in a manner chosen by the client using a number of easy-to-use tools before being finally rendered onto the display.
1.2. Prior-After Comparison
The following Standards Working Groups (SWGs) are most directly involved in OGC work related to map rendering and would be interested in the work described in this ER:
-
Web Mapping Service 1.4 SWG (also responsible for WMTS)
-
Styled Layer Descriptor & Symbology Encoding SWG
The GeoPackage SWG, being involved in work related to packaging formats that support map rendering in Denied, Degraded, Intermittent or Limited bandwidth (DDIL) environments would also be directly interested in the work described in this ER.
The following SWGs, are involved in work that is redefining the underlying architecture of OGC Web Services (OWS). As such, they would also be interested in the work described in this ER as it explores how far the new paradigms can be extended to support the resource type of most interest to OGC members:
-
Web Feature Service/Filter Encoding Specification SWG
-
Web Processing Service SWG
1.3. Recommendations for Future Work
Having developed a set of abstract test suites in the Vector Tiles Pilot, future work should look to develop executable test suites for compliance testing of implementations of this specification.
Further investigation is also needed towards allowing WMTS servers and clients to operate in denied, degraded, intermittent or limited bandwidth (DDIL) networks. The DDIL clause in this document discusses some avenues of investigation.
1.4. Document contributor contact points
All questions regarding this document should be directed to the editor or the contributors:
Contacts
Name | Organization |
---|---|
Panagiotis (Peter) A. Vretanos |
CubeWerx Inc. |
Kalimar Maia |
Mapbox |
1.5. 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
The following normative documents are referenced in this document.
-
OGC: OGC 07-057r7, OGC® OpenGIS Web Map Tile Service Implementation Standard, 2010
-
OGC: OGC 17-069, OGC® Web Feature Service 3.0: Part 1 - Core Candidate Standard, 2018
-
OGC: OGC 12-128r15, OGC® GeoPackage Encoding Standard - with Corrigendum, 2018
-
OGC: OGC 17-083, OGC® Tile Matrix Set Candidate Standard, 2018
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.
-
dataset
identifiable collection of data [ISO 19115-1:2014]
Note
|
The use of 'collection' in the definition from ISO 19115-1 is broader than the use of the term 'collection' in this specification. See the definition of 'feature collection'. |
-
distribution
represents an accessible form of a dataset [W3C DCAT]
EXAMPLE: a downloadable file, an RSS feed or a web service that provides the data.
-
feature
abstraction of real world phenomena [ISO 19101-1:2014]
Note
|
If you are unfamiliar with the term 'feature', the explanations in the W3C/OGC Spatial Data on the Web Best Practice document may help, in particular the section on Spatial Things, Features and Geometry. |
-
feature collection; collection
a set of features from a dataset
Note
|
In this specification, 'collection' is used as a synonym for 'feature collection'. This is done to make, for example, URI path expressions shorter and easier to understand for those that are not geo-experts. |
-
coordinate reference system
coordinate system that is related to the real world by a datum [ISO 19111]
-
coordinate system
set of mathematical rules for specifying how coordinates are to be assigned to points [ISO 19111]
-
feature info
information related to a particular pixel of a map that refers to the geographic data portrayed on that area
-
layer
basic unit of geographic information that may be requested as a map from a server
-
map
portrayal of geographic information as a digital image file suitable for display on a computer screen
-
portrayal
graphical presentation of information to humans
-
procedure oriented architectural style
platform-independent design approach that is focused on operations, their parameters and their results, that can be defined in an abstract level specification. Concrete platform-dependent specifications can be derived from the abstract level, allowing, for example, KVP or SOAP messaging.
-
resource oriented architectural style
platform-independent design approach that is focused on resources, representations and actions, that can be defined in an abstract level specification. Concrete platform-dependent specifications can be derived form the abstract level, allowing, for example, a RESTful architecture.
-
theme
a group of layers that can be nested hierarchically
-
tile
a tessellated representation of geographic data, often part of a set of such elements, covering a spatially contiguous extent which can be uniquely defined by a pair of indices for the column and row along with an identifier for the tile matrix (adapted from OGC 07-057r7)
-
tile matrix
a collection of tiles for a fixed scale
-
tile matrix set
a collection of tile matrices defined at different scales
3.1. Abbreviated terms
JPEG |
Joint Photographic Experts Group (image format) |
JVT |
GeoJSON Vector Tile |
MVT |
Mapbox Vector Tile |
PNG |
Portable Network Graphics (image format) |
REST |
Representational State Transfer |
SLD |
Styled Layer Descriptor |
WFS |
Web Feature Service |
WMTS |
Web Map Tile Service |
4. Overview
Clause 5 describes the client and server implementations deployed for the Vector Tiles Pilot.
Clause 6 presents a discussion on some of the potential requirements for a Vector Tiles extension to WMTS.
5. WMTS Implementations
A number of WMTS services and client applications took part in the Pilot. The following subsections describe those services and client applications.
5.1. Pilot Architecture
To support experimentation, an architecture was designed to cover various client-server relationships that are common in OGC use cases as illustrated in Figure 1.
The architecture therefore addresses the following client-server relationships to simultaneously enable tiled feature data across the relevant suite of OGC standards.
-
Desktop Client → Web Feature Service (WFS) 3.0
-
Web Client → Web Map Tile Service (WMTS) 1.0
-
Mobile Client → GeoPackage 1.2
The following sections focus only on WMTS, as it is the subject of this engineering report.
5.2. Servers
The pilot included WMTS services from CubeWerx, Ecere, GeoSolutions and MapBox. The following subsections describe the services.
5.2.1. CubeWerx
The CubeWerx WMTS service implements version 1.0 of the WMTS standard. The service offers the following operations:
-
GetCapabilities
-
GetTile
-
GetFeatureInfo
The service also offers the following vendor-specific operations:
-
GetDescription
-
GetLegendGraphic
-
GetTileJson
-
GetAccessibility
-
GetAssociations
Server deployment
The CubeWerx WMTS has been deployed on an Amazon instance at the following endpoint:
It offers the standard spherical mercator (smerc) tile matrix set and supports the following tile formats:
-
image/x-jpegorpng
-
image/jpgpng
-
image/png
-
image/jpeg
-
application/vnd.mapbox-vector-tile
The complete capabilities document of the server can be found here:
Implementation Efforts for Adding MVT Support to WMTS
No changes were necessary to the WMTS standard. It simply advertises that vector tiles data is offered as another available tile format. To add Mapbox Vector Tile (MVT) specification support, the server:
-
integrated the third-party protobuf 3.6.0 and protobuf-c 1.3.0 libraries to handle the Google Protobuf encoding requirements.
-
implemented the generation of MVTs as per the Mapbox Vector Tile specification [3].
Some of the challenges encountered during this implementation were:
-
supporting the various geometry types and property value types
-
implementing proper (and efficient) simplification and clipping of geometries
-
honoring any filters and scale rules that may be present in the specified style
-
making the buffer zone size configurable
-
making the ratio of internal resolution to display resolution configurable
-
making whether or not properties should be emitted configurable
-
implementing a low-level mechanism that will generate an MVT tile of any size, in any coordinate system, at any resolution, with any number of layers, from any supported source
-
implementing a higher-level tile-oriented mechanism that generates vector tiles in accordance with the WMTS-defined tile-matrix sets
-
implementing GeoJSON Vector Tile support in parallel
-
performing appropriate testing
5.2.2. Ecere
The Ecere WMTS service implements version 1.0 of the WMTS standard. The service offers the following operations:
-
GetCapabilities
-
GetTile
Server deployment
The Ecere WMTS has been deployed at the following endpoint:
Tiles for any layers are generated on-the-fly for any supported encoding and tiling scheme from a GNOSIS tiled data store.
It supports the following vector tile formats:
-
text/xml;subtype=gml/3.1.1 - GML
-
application/vnd.geo+json - GeoJSON
-
application/vnd.mapbox-vector-tile - Mapbox vector tiles
-
application/vnd.geo+econ - GeoECON
-
application/vnd.gnosis-map-tile - GNOSIS Map Tiles (initial publication)
The complete capabilities document of the server can be found here:
The service supports the following Tile Matrix Sets:
-
GlobalCRS84Pixel - EPSG:4326 (geographic); Based on the WMTS Well Known Scale Set with convenient pixels/degrees values (not a quad tree, resolution does not double at each level)
-
GlobalCRS84Scale - EPSG:4326 (geographic); Based on the WMTS Well Known Scale Set with convenient scale denominator values (not a quad tree, resolution does not double at each level)
-
GoogleCRS84Quad - EPSG:4326 (geographic); Based on the WMTS Well Known Scale Set, a quad tree with convenient scale denominator values
-
GoogleMapsCompatible - EPSG:3857 (spherical pseudo-Mercator projection); Based on the WMTS Well Known Scale Set compatible with GoogleMaps and others (also a quad tree)
-
GNOSISGlobalGrid - EPSG:4326 (geographic); A global grid with fewer columns of tiles closer to the pole than at the equator, approximating equal area tiles, a quad-tree except for starting with eight 90deg x 90deg tiles at level 0, and tiles touching a pole splitting in 3 rather than 4 [http://docs.opengeospatial.org/per/17-041.html#_global_gnosis_tiling_scheme_adapted_to_polar_regions]
Implementation Efforts for Adding MVT Support to WMTS
No changes were necessary to the WMTS specification. MVT was simply included as an additional output format offered by the WMTS. Support for encoding vector features according to the MVT specification, using Google Protocol Buffers, was implemented during the course of this pilot within the Ecere’s GNOSIS software libraries and had to be integrated within Ecere’s GNOSIS Map Server.
Testing
Mapbox vector tiles generated by Ecere’s WMTS were tested using 'vtvalidate', which performs the following tests [1]:
-
Tiled feature data consistent with the Mapbox Vector Tile specification - Version 2.
-
Read tile layer(s) and feature(s)
-
Decode properties
-
Decode geometries
Tiles were also tested successfully with OGR software, which required a fix for an extent greater than 16384, as well as with QGIS 3.2.3.
Support for visualizing Mapbox vector tiles was implemented in Ecere’s visualization client (see section below), which was also used to test the tiles delivered by the WMTS service.
The Ecere WMTS content was also successfully rendered by Compusult, thereby confirming a successful Technology Integration Experiment (TIE).
5.2.3. GeoSolutions
The GeoSolutions WMTS service implements version 1.0 of the WMTS standard. The service offers the following operations:
-
GetCapabilities
-
GetTile
-
GetFeatureInfo
Server deployment
The GeoSolutions WMTS has been deployed at the following endpoint:
It supports the following tile formats:
-
application/vnd.mapbox-vector-tile
The complete capabilities document of the server can be found here:
The vector tiles are served in the following Tile Matrix Sets:
-
EPSG:4326 (WGS84 world coverage, starting with two side by side tiles at zoom level zero)
-
EPSG:4326_512 (same as above, but having tiles of 512 pixels)
-
EPSG:900913 (Google maps compatible alias)
Implementation Efforts for Adding MVT Support to WMTS
No changes were necessary to the WMTS specification. MVT was simply included as an additional output format offered by the WMTS, both as in Key-Value Pair (KVP) and Representational State Transfer (REST) service styles.
The GeoServer MVT implementation has the following features:
-
MapBox 2.1 specification (acquired during pilot development, previous supported version was 1.0.1)
-
Tile contents are driven by the style associated to the layer in GeoServer, the filters or rules active at the specified zoom level are used to decide which features get into the tile
-
Single or multi-layer support
-
Automatic determination of buffer zone based on the symbolizers included in the reference style (can be manually configured too)
-
Efficient rectangular clipping, followed by a topology preserving geometry simplification
-
All attributes available are included in the output tile
5.2.4. Mapbox
The Mapbox WMTS service implements version 1.0 of the WMTS standard. The service offers the following operations:
-
GetCapabilities
-
GetTile
Server deployment
In the spirit of interoperability, the Mapbox WMTS was implemented using Klokan Tech’s tileserver-gl https://tileserver.readthedocs.io/en/latest/
The Mapbox WMTS has been deployed at the following endpoint:
The service also offers the following:
-
Style viewer (both raster and vector)
-
GL Style viewer
-
TileJSON
-
WMTS
-
XYZ
-
mbtiles inspector
5.3. Clients
The pilot included WMTS client applications from CubeWerx, Compusult, Ecere, GeoSolutions and MapBox. The following subsections describe the clients.
5.3.1. CubeWerx
The CubeWerx WMTS client runs as a web-browser based application. The client application allows an end-user to select the layers to display through the interface shown in Figure 3.
Once the end user has selected one or more layers to display, a separate tab is opened to display the contents of that layer. A screenshot showing MVT data rendered on a map is shown in Figure 4.
5.3.2. GeoSolutions
The GeoSolutions WMTS client runs as a web-browser based application:
The client application presents 6 maps, with integrated controls between them (that is panning and zooming one map, adjusts the other maps as well). A screenshot showing the client application is presented in Figure 6 and Figure 5.
The 6 maps are implemented using:
-
OpenLayers (Converted from Mapbox Styles)
-
Leaflet with Mapbox GL (using Mapbox Styles)
-
Mapbox GL (using Mapbox Style), OpenLayers (using OpenLayers styling)
-
Leaflet with Leaflet.VectorGrid (using Leaflet styling)
-
Leaflet with Tangram (using Tangram styling)
The second client instead shows all available datasets in the GeoServer implementation, giving an idea of performance extracting data on the fly, without caching, over large areas, and :
The lack of zoom based automatic feature selection, coupled with the lack of caching, shows that MVT can also deliver relatively poor performance when mis-used. Just like the other client, clicking on a feature shows a popup with the attributes, as fetched from the vector tile contents.
5.3.3. Compusult
The Compusult WMTS client runs as a web-browser based application, as well as a desktop/android based application. The WMTS client supports both Mapbox Vector Tile and GeoJSON tile formats. The client application allows users to interactively enable/disable specific WMTS layers, as well as overlay any specified base map for visualization. Styles are randomly generated for each layer. The screenshots below show the WMTS client rendering different WMTS server providers. The client also allows for native GetFeatureInfo requests. Supported by the server, or implemented by the client.
There were some minor issues noted:
-
WMTS services displayed with all feature types as individual layers resulted in slow rendering times on a web-based client due to the number of requests and browser request limitations.
-
Services with MVT tiles that have polygons that are not buffered will result in intermittent tile boundaries when trying to render polygon strokes. Same issue occurs rendering points with images that cross tile boundaries
-
Services with multiple layers did not specify the correct drawing order to properly layer all feature types
Recommendations:
-
OGC should consider including a WMTS extension that allows for a user to filter the layers for an MVT that has a multi-layer composition. It makes sense to only make 1 request for all layers of a MVT, but the user may want to filter those layers on demand to be recognized by the server. WMS allows for a layer list, while WMTS does not. Since an MVT will only be used as a WMTS, but does not fit the standard WMTS base map type response, OGC may want to allow selecting multiple layers per request, or filtering layers inside of a single MVT layer.
-
Clients should not have to depend on sibling tiles to perform proper rendering operations.
5.3.4. Ecere
The Ecere WMTS client is implemented as a capability of Ecere’s GNOSIS software libraries, available from within Ecere’s GNOSIS Cartographer GIS tool, as well as from any application built using the GNOSIS SDK (whether for desktop, web or mobile). Support for accessing vector tiles through WMTS has been added for this pilot, with support for GNOSIS Map Tiles, GML, GeoECON, GeoJSON and Mapbox vector tiles. Visualizations of Mapbox vector tiles and GeoJSON tiles were entirely new capabilities developed during the pilot.