Overview

Currently the map layer data utilized by the Standard Search UI 2D and 3D maps rely on external tile services.  In cases where the DDF deployment is on a private network and potentially has no or sporadic connectivity to a tile server, the DDF Search UI functionality will be limited to textual search and result visualization.  Even in cases where a tile server is available, map performance map may be poor due to network latency or bandwidth limitations.  An ideal solution to this problem would include

GeoWebCache

http://geowebcache.org/ - licensed under LGPL.  

GWC provides seeding/caching of tiles from WMS providers and a proxy capability to get around cross domain policy issues when accessing external WMS services. GWC also provides aggregation of tile services, and multiple endpoints for accessing tile data, including WMS 1.1.1, WMTS 1.0.0, and TMS 1.0.0.

CriteriaGeoWebCacheComments
tile cachingYes - automatic and administrative seeding 
service aggregationyes - WMS, WMTS, TMSnew services can be added
runs in DDFYes, war will deploy in DDF with some modifications
  • war must be "bundled" for deployment in karaf
  • spring beans and spring security configurations must be modified
administrationeasy administration via packaged REST services

could be utilized via an admin plugin

licensingLGPL v3 

 

Endpoints

Configuration 

Security

GWC utilizes spring security for its endpoints.  Luckily, security can be disabled by modifying the spring security config (WEB-INF/acegi-config.xml).  DDF security works with the GWC endpoints as with any of the other DDF endpoints.

GeoWebCache REST Service examples

Retrieve a list of configured layers

curl -v -k "https://localhost:8993/geowebcache/rest/layers" 
<layers>
  <layer>
    <name>img states</name>
    <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="https://localhost:8993/geowebcache/rest/layers/img+states.xml" type="text/xml"/>
  </layer>
  <layer>
    <name>raster</name>
    <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="https://localhost:8993/geowebcache/rest/layers/raster.xml" type="text/xml"/>
  </layer>
</layers>

Retrieve a specific layer

curl -v -k "https://localhost:8993/geowebcache/rest/layers/img+states.xml"
<wmsLayer>
  <name>img states</name>
  <mimeFormats>
    <string>image/gif</string>
    <string>image/jpeg</string>
    <string>image/png</string>
    <string>image/png8</string>
  </mimeFormats>
  <wmsUrl>
    <string>http://demo.opengeo.org/geoserver/wms?</string>
  </wmsUrl>
  <wmsLayers>nurc:Img_Sample,topp:states</wmsLayers>
</wmsLayer> 

Delete a layer

curl -v -k -XDELETE "https://localhost:8993/geowebcache/rest/layers/raster.xml"

The last part of the path is in the format of <layer name>.xml.

 

Add a layer

curl -v -k -XPUT -H "Content-type: text/xml" -d @states.xml "https://localhost:8993/geowebcache/rest/layers/states.xml"
<wmsLayer>
  <name>states</name>
  <mimeFormats>
    <string>image/gif</string>
    <string>image/jpeg</string>
    <string>image/png</string>
    <string>image/png8</string>
  </mimeFormats>
  <wmsUrl>
    <string>http://demo.opengeo.org/geoserver/wms</string>
  </wmsUrl>
  <wmsLayers>nurc:Img_Sample,topp:states</wmsLayers>
</wmsLayer>

 

 Modify a layer

curl -v -k -XPOST -H "Content-type: text/xml" -d @states2.xml "https://localhost:8993/geowebcache/rest/layers/states.xml"
<wmsLayer>
  <name>states</name>
  <mimeFormats>
    <string>image/gif</string>
    <string>image/jpeg</string>
    <string>image/png</string>
  </mimeFormats>
  <wmsUrl>
    <string>http://demo.opengeo.org/geoserver/wms</string>
  </wmsUrl>
  <wmsLayers>nurc:Img_Sample,topp:states</wmsLayers>
</wmsLayer>

 

GeoWebCache Layer Schema

The layer schema for GWC can be found here: http://geowebcache.org/schema/1.5.0/geowebcache.xsd.  Key wmsLayer elements:

ElementExample ValueDescription
namelayer1The name of the layer that GWC should respond to. It is equivalent to the value of LAYERS= in WMS requests, and can contain commas. See wmsLayers
mimeFormats<string>image/jpeg</string>List of formats to be supported. These must be known to GeoWebCache. Legal values are image/png, image/png8, image/png24, image/gif, image/jpeg, image/tiff, gml, application/vnd.google-earth.kml+xml, application/vnd.google-earth.kmz+xml
wmsUrlhttp://example.org/wmsA list of URLs to backend servers than can render tiles for this layer. They are used in a round robin fashion for load balancing and automatic failover. The only time you can ommit this element is if you expect the layer to be merged with that from another source.
wmsLayerslayer1,layer2The LAYERS parameter sent to the WMS backend. It may contain commas, to request composites of several layers from the backend, and be different from the name element.
wmsVersion1.1.1The VERSION parameter sent to the WMS backend. The default is 1.1.1
tiledfalseThe TILED parameter sent to the WMS backend. The default is FALSE, you should generally not change this.

 

 

Prototype in DDF

Remaining work