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
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.
Criteria | GeoWebCache | Comments |
---|---|---|
tile caching | Yes - automatic and administrative seeding | |
service aggregation | yes - WMS, WMTS, TMS | new services can be added |
runs in DDF | Yes, war will deploy in DDF with some modifications |
|
administration | easy administration via packaged REST services | could be utilized via an admin plugin |
licensing | LGPL v3 |
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.
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> |
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> |
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. |
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> |
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> |
The layer schema for GWC can be found here: http://geowebcache.org/schema/1.5.0/geowebcache.xsd. Key wmsLayer elements:
Element | Example Value | Description |
---|---|---|
name | layer1 | The 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 |
wmsUrl | http://example.org/wms | A 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. |
wmsLayers | layer1,layer2 | The 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. |
wmsVersion | 1.1.1 | The VERSION parameter sent to the WMS backend. The default is 1.1.1 |
tiled | false | The TILED parameter sent to the WMS backend. The default is FALSE, you should generally not change this. |