GSIP 162
Add the ability to create WMS layers backed by remote WMTS layers.
Share the same rationale as WMS Cascading.
Emanuele Tajariol
This proposal is for GeoServer 2.12-beta.
- Under Discussion
- In Progress
- Completed
- Rejected
- Deferred
WMTS cascading allows for proxying a remote WMTS server and merging the results with locally rendered data. This can be useful for a number of reasons:
- printing
- reprojecting
- watermarking and decoration in general
- proxying a secured remote WMTS into an intranet available server
(Same as WMS cascading).
- Create a WMTS Store class: it's bound to a remote WMTS server, which esposes the various layers.
- Create a WMTS Layer class: it's bound to a remote WMTS layer, and proxies the various info, such as CRS, bounding box and custom dimensions.
- Extend the REST API to handle the WMTS stores and WMTS layers.
(Reflects closely WMS cascading).
A note about the authors: Implementation has initially been done by Ian Turton, and then continued by Emanuele Tajariol.
The catalog sees two new CatalogInfo
subclasses, WMTSStoreInfo
and WMTSLayerInfo
.
WMTSStoreInfo
, a StoreInfo
subinterface, describes a WTMS server
connection such as the capabilities link, and could contain other
information such as authentication credentials and http timeout.
A couple of attributes, "HTTP header name" and "HTTP header value", have been added
since an initial use case required a special authentication using HTTP headers.
WMTSLayerInfo
, which extends ResourceInfo
contains the layer name
and eventually will be be place to host eventual vendor parameter to be
used during the cascading.
The ResourcePool
has been modified to cache the WebMapTileServer
object used during the cascading operations so that the capabilities
request gets cached as a result.
The persistence subsystem (XStream, loader and persister) have been
modified to store the new objects following the same conventions as the
other stores and resources, the main difference being that the store is
described in a wmtsstore.xml
file whilst the the cascaded WMTS layer
is described in a wmtslayer.xml
file.
Example XML file contents for WMTS stores:
<wmtsStore>
<id>WMTSStoreInfoImpl--79041489:15cf3fa500d:-7fff</id>
<name>WMTS_NASA_REST</name>
<type>WMTS</type>
<enabled>true</enabled>
<workspace>
<id>WorkspaceInfoImpl--570ae188:124761b8d78:-7ff3</id>
</workspace>
<metadata>
<entry key="useConnectionPooling">true</entry>
</metadata>
<__default>false</__default>
<capabilitiesURL>https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/wmts.cgi?SERVICE=WMTS&request=GetCapabilities</capabilitiesURL>
<maxConnections>6</maxConnections>
<readTimeout>60</readTimeout>
<connectTimeout>30</connectTimeout>
</wmtsStore>
and for a WTMS layer:
<wmtsLayer>
<id>WMTSLayerInfoImpl-37c0eec1:15cf454e2d3:-7fff</id>
<name>WMTS_AIRS_CO_Total_Column_Day</name>
<nativeName>AIRS_CO_Total_Column_Day</nativeName>
<namespace>
<id>NamespaceInfoImpl--570ae188:124761b8d78:-7ff4</id>
</namespace>
<title>Carbon Monoxide (Total Column, Day, AIRS, Aqua)</title>
<nativeCRS>GEOGCS["WGS 84",
DATUM["World Geodetic System 1984",
SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST],
AXIS["Geodetic latitude", NORTH],
AUTHORITY["EPSG","4326"]]</nativeCRS>
<srs>EPSG:4326</srs>
<nativeBoundingBox>
<minx>-180.0</minx>
<maxx>180.0</maxx>
<miny>-90.0</miny>
<maxy>90.0</maxy>
<crs>EPSG:4326</crs>
</nativeBoundingBox>
<latLonBoundingBox>
<minx>-180.0</minx>
<maxx>180.0</maxx>
<miny>-90.0</miny>
<maxy>90.0</maxy>
<crs>EPSG:4326</crs>
</latLonBoundingBox>
<projectionPolicy>FORCE_DECLARED</projectionPolicy>
<enabled>true</enabled>
<store class="wmtsStore">
<id>WMTSStoreInfoImpl--79041489:15cf3fa500d:-7fff</id>
</store>
</wmtsLayer>
The CatalogBuilder
has been extended to deal with the new objects,
as a bonus the builder feeds all reusable metadata coming from the WMTS server
capabilities document into the WMTSLayerInfo
ones.
The usual store -> layer workflow has been maintained adding a new custom page to configure the WMTS store.
Icons to identify a WMTS store, layer and type have been copied from the WMS ones.
Cascading has been implemented by using the GeoTools tile-client, and in
particular the WMTSMapLayer
class, a MapLayer
that makes most of
the work making the renderer think it’s dealing with a coverage.
Supported features:
- Standard cascading
- Reprojected cascading, including the ability to pass the SRS down to the remote server should the SRS be included among the remote server supported list, otherwise the request is passed down in a supported SRS, adjusting the image ratio accordingly, and reprojecting client side (this part needs fixing)
The PR adds new paths to represent a WMTS store and a WMTS layer. The follow the same patters as data stores and feature types, but use different locations:
/workspaces/{workspace}/wmtsstores/{wmtsstore}.{format}
/workspaces/{workspace}/wmtsstores/{wmtsstore}
/workspaces/{workspace}/wmtsstores.{format}
/workspaces/{workspace}/wmtsstores
/workspaces/{workspace}/wmtsstores/{wmtsstore}/layers/{wmtslayer}.{format}
/workspaces/{workspace}/wmtsstores/{wmtsstore}/layers/{wmtslayer}
/workspaces/{workspace}/wmtsstores/{wmtsstore}/layers.{format}
/workspaces/{workspace}/wmtsstores/{wmtsstore}/layers
/workspaces/{workspace}/wmtslayers/{wmtslayer}.{format}
/workspaces/{workspace}/wmtslayers/{wmtslayer}
/workspaces/{workspace}/wmtslayers.{format}
/workspaces/{workspace}/wmtslayers
Besides the path the behavior to the various kind of HTTP methods is exactly the same as with data stores and resources, meaning they both can be listed, shown, created by POST, updated by PUT, removed by DELETE. It’s also possible to list the available, but still unpublished, wms layers in a given store (to be checked).
-
getFeatureInfo
not implemented (the WMS GetCapabilities will returnqueryable="0"
for all WMTS layers)
There are no backwards compatibility issues.
Project Steering Committee:
- Alessio Fabiani: +1
- Andrea Aime: +1
- Ben Caradoc-Davies:
- Brad Hards:
- Christian Mueller:
- Ian Turton:
- Jody Garnett: +1
- Jukka Rahkonen:
- Kevin Smith:
- Simone Giannecchini: +1
©2022 Open Source Geospatial Foundation