WMS via Geoserver


Tidetech have developed a system called Tidemap, which is a combination of cloud infrastructure hosting time-series WMS layers, and a modern web-mapping client. The system can be used as a stand-alone web app, or as standards-based services in an in-house or off-the-shelf app.

The production map can be accessed at https://maps.tidetech.org. Spatial web services can be accessed at the WMS API address at https://wms.tidetech.org.

Technology

Tidemap is based on GeoServer, which implements the OGC WMS standard. While GeoServer supports tile-based services, the complex styling that has been configured for Tidemap’s layers works optimally using single-image display.

Tidetech use Leaflet in their client user interface, and there are a number of plugins for Leaflet that enable single-image layers, such as leaflet.wms.

Custom Layers

Custom layers are configurable on an as-needs basis.

Implementation Notes

Get Capabilities

The ‘get capabilities’ request returns metadata about layers. This can be used to identify what timesteps are available.

https://wms.tidetech.org/geoserver/version2/wms?request=GetCapabilities

Time

In order to make use of time-series data, a specific option must be appended to the WMS request which must also include the time step. The WMS 'GetCapabilities' response allows you to identify available time steps for each layer. Some examples of requests including time are shown below.

Time format:

yyyy-MM-ddThh:mm:ss.SSSZ

Example layer request:

https://wms.tidetech.org/geoserver/version2/ows?service=WMS&request=GetMap&version=2&layers=air_temperature&styles=&format=image%2Fpng8&transparent=true&noWrap=true&auth_key=null&options=%5Bobject%20Object%5D&time=2019-11-06T03%3A00%3A00.000Z&srs=EPSG%3A3857&width=1059&height=300&bbox=-7748880.179438027,-626172.1357121639,12973503.936786393,5244191.63658937

Tidetech uses a modified Leaflet plugin called Leaflet.TimeDimension to implement the Tidemap WMS client.

Layer Groups

Some layers are composed into layer groups for cartographic reasons. When there is a layer group, the available time steps need to be acquired from the layers which comprise that layer group. This information can be retrieved from the 'GetCapabilities' request.

Feature Information

The recommended way of retrieving information about a specific latitude and longitude is using the WMS 'GetFeatureInfo' request, returning JSON, as follows:

https://wms.tidetech.org/geoserver/public/ows?service=WMS&version=2&request=GetFeatureInfo&layers=air_temperature&query_layers=air_temperature&feature_count=10&info_format=text%2Fjavascript&format_options=callback%3AhandleJson&SrsName=EPSG%3A4326&width=101&height=101&x=50&y=50&bbox=-29.80703125%2C17.208687886770033%2C-29.60703125%2C17.408687886770036&time=2016-08-22T03%3A00%3A00.000Z&callback=jQuery22103477096048378707_1476337081596&_=1476337081599

The above request returns a JSONP response, although you can request a plain JSON response too, see http://docs.geoserver.org/latest/en/user/services/wms/reference.html


The response looks like this:

{"type":"FeatureCollection","totalFeatures":"unknown","features":[{"type":"Feature","id":"","geometry":null,"properties":{"Current speed kts":0.42437744140625}},{"type":"Feature","id":"","geometry":null,"properties":{"u":0.1200094223022461,"v":0.17999839782714844,"Current direction °T":33.6875}}],"crs":null}