Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I've spent the last two days trying my hand at GeoWebCache. I've had some issues and am now out the office so can't access any code to attach. I know if i don't post this it'll bug me all weekend.

I've been using GeoServer WMS on demand from my OpenLayers app but wanted to make use of the integrated GeoWebCache. (a) do I have to use WMTS to use the cache? My current thinking is yes and I have changed my code accordingly. my new WMTS url points to geoserver/gwc/service/wmts.

So i went and configured my geowebcache.xml to include the BNG 27700 gridset. I also included 14 resolutions that correspond to my app's map scales. Map and gridset both return 256x256 tiles. No problem. I edit my layer.xml for the desired layers to include my gridset. My Catalina.out shows this is all fine when i start tomcat5. I've read i need to have a different layer name in my geowebcache.xml to the actual layer in geoserver. (b2) is this true?

My app then makes some very slow WMTS requests which take upto a minute to comeback. Significantly slower than my previous WMS. (c) Why? . I've tried png, png8 and jpeg. (d) which is quickest? Currently favour png8. I'm using mastermap area data with an simple SLD. No labels or transparency so i'm not sure why it's so slow.

I see my pyramids begin to build in the gwc directory when i make these horribly slow requests. However, when i make exactly the same request again, the tiles are replaced in the cache rather than consumed. Obviously there is no performance benefit as a result. (e) Why are my tiles replaced? I am not setting any expiry details so presume the metastore should handle this.

When i went to revert back to my previously quickish WMS request they too were now very slow. (f) Is this related? Bouncing the server didn't help.

Details: GeoServer/GeoWebCache is on a RHEL 16GB RAM machine. The cache store limit is set to 5GB which I'm nowhere near. I have the latest versions of both apps.

Help with any of my 6 questions would be great! Thanks.

share|improve this question

3 Answers 3

As per the documentation, switching from WMS to GeoWebCache only requires a URL change from:

/geoserver/wms <- direct WMS

/geoserver/gwc/service/wms <- geocached wms

and you're good to go, no need to switch WMTS. BTW, GeoWebCache requires all tiles be 256x256.

You can also seed the cache from the GeoCache home that can be reached from the Geoserver admin app.

share|improve this answer
    
OK cheers for the pointers. I'll keep my old WMS decalaration for simplicity. I don't think seeding is an option in this case. Any idea why the tiles are always replaced and not reused? –  geo_james Mar 12 '12 at 9:48

Ran into the same issue (e), using namespace:layername for WMTS layer parameter solved this issue for me.

I noticed following behaviour:

I don't know if this is a bug or expected behaviour, hope this information helps anyway.

share|improve this answer

(B2) When you will try to request getCapabilities for the WMTS layer and layer name has same name in geowebcache.xml you will get the response which contains capabilities of two layers with the same name but different . If you are getting layers on client via OpenScales you'll notice that HashMap of my:Layer will be broken.

Different names in geowebcache.xml will be the right choice. For example:

<name>gwc:Layer</name>
...
<wmsLayers>my:Layer</wmsLayers>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.