I'm having trouble understanding how GeoWebCache and GeoServer fit together
when it comes to new GridSets - this may be a bug but I'm not sure.

I have defined a new GridSet which seems fine (no more messages in
GeoServer's log when I reload geowebcache.xml). I found out here:
http://osgeo-org.1560.n6.nabble.com/GeoSserver-and-GeoWebCache-td3799862.html
that I need to specify which layers implement this GridSet.

The documentation I found for geowebcache.xml
(http://geowebcache.org/docs/current/_sources/configuration/layers/projections.txt)
says when I define a wmsLayer element within layers I can choose any name I
want. At first I wondered how GeoWebCache would know which layer I actually
wanted to cache, when all I tell it about the URL is the WMS end-point with
no layer argument, but then I read here:
http://osgeo-org.1560.n6.nabble.com/gwc-layer-naming-convention-td4481580.html
about using the wmsLayers element to specify the layers within the service I
want. However, it doesn't work.

If I use the GeoServer name for a layer in geowebcache.xml it doesn't show
up in the list of layers I can seed, because the layer is already listed
there by default and only has the default 4326 and 900913 GridSets. If I
give it a new name, which doesn't match a GeoServer layer - e.g. "the new
layer", it shows up as a seed-able layer with my custom GridSet (and neither
of the defaults), but seeding fails with the message "Unexpected response
code from backend: 404 for http://host_name:8080/geoserver/test/wms?";. If I
use the preview available with the GWC seed page I can see that the WMS URL
it uses contains "...wms?LAYERS=the new layer" - it is using the layer name
I provided which is supposed to be arbitrary, instead of the layers I
explicitly provided within the wmsLayers element.

Is this a bug in GeoWebCache, or something going wrong in my configuration
file? I disabled "Automatically configure a cached layer for newly added
layers" and added a new layer in GeoServer, thinking that it wouldn't appear
in the seed-able list with the default GridSets, and therefore I could
safely use the GeoServer layer name, but it DID show up in the seed-able
list by default, so I'm no better off.

The relevant part of geowebcache.xml looks like this... Any suggestions very
much appreciated.

  <gridSets>
    <gridSet>
      <name>Test_GridSet</name>
      <srs>
        <number>900913</number>
      </srs>
      <extent>
        <coords>
          <double>-20037508</double>
          <double>-20037508</double>
          <double>20037508</double>
          <double>20037508</double>
        </coords>
      </extent>
      <metersPerUnit>1</metersPerUnit>
      <tileHeight>256</tileHeight>
      <tileWidth>256</tileWidth>
    </gridSet>
  </gridSets>
...
  <layers>
    <wmsLayer>
      <name>the new layer</name>
      <wmsLayers>namespace:geoserver_layer_name</wmsLayers>
      <mimeFormats>
        <string>image/gif</string>
        <string>image/jpeg</string>
        <string>image/png</string>
        <string>image/png8</string>
      </mimeFormats>
      <gridSubsets>
        <gridSubset>
          <gridSetName>Test_GridSet</gridSetName>
        </gridSubset>
      </gridSubsets>
      <wmsUrl>
        <string>http://host_name:8080/geoserver/test/wms</string>
      </wmsUrl>
    </wmsLayer>
  </layers>


--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/GeoWebCache-geowebcache-xml-bug-custom-GridSet-and-applying-it-to-a-layer-tp4538078p4538078.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to