[Geoserver-users] Tile caching, WMS request without workspace name

Hello all,

I’ve been playing around with GeoWebCache and the GeoServer 2.2 lastly, but I still have some questions about WMS request : I tiled a layer XXX from a workspace xxx. So now I can perfectly query it with these URL, and have fast raster display :

The thing is I don’t want to use the workspace name xxx in my WMS query (the GS architecture should be transparent). The query without this statement works, but it doesn’t use the tiled image, even if I use tiled=true (so it’s quite long…). GWC doesn’t recognize the layers if I query only LAYERS=XXX with the /gwc/service/wms URL.

Does tile caching only works with the full workspace-layer name, or is there a trick to have tiled images with something like :

http://myServer/geoserver/wms?LAYERS=XXX&TILED=true&FORMAT=image/jpeg&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:4326&BBOX=0,-90,180,90&WIDTH=256&HEIGHT=256

Thanks for your help.

Gabriel

On Thu, Nov 15, 2012 at 5:34 PM, Gabriel Vatin <gabriel.vatin@anonymised.com97…> wrote:

Hello all,

I’ve been playing around with GeoWebCache and the GeoServer 2.2 lastly, but I still have some questions about WMS request : I tiled a layer XXX from a workspace xxx. So now I can perfectly query it with these URL, and have fast raster display :

The thing is I don’t want to use the workspace name xxx in my WMS query (the GS architecture should be transparent). The query without this statement works, but it doesn’t use the tiled image, even if I use tiled=true (so it’s quite long…). GWC doesn’t recognize the layers if I query only LAYERS=XXX with the /gwc/service/wms URL.

Does tile caching only works with the full workspace-layer name, or is there a trick to have tiled images with something like :

http://myServer/geoserver/wms?LAYERS=XXX&TILED=true&FORMAT=image/jpeg&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:4326&BBOX=0,-90,180,90&WIDTH=256&HEIGHT=256

I’m not sure if it’s possible or not in the integrated GWC.
GeoServer has the ability to support both qualified and unqualified names as you say, but
GeoWebCache only supports one name for its layers, and it’s the fully qualified one.

It should not be too hard to make the GWC integration in GeoServer do some sort of lookup
on the GeoServer catalog in case the layer requested is not found, and fall back on GS
lookup logic.

Basically the integration code would have to “fix” the layer name before the request actually
enters in the GWC core.

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Ok, thanks Andrea.
I’ve seen in the gwc folder that tiled images are stores in folders named workspaceName_layerName, and then numbers. I guess that’s why the workspace name has to appear in the request URL, so that it can find the right folder.

It would be interesting to look in GS code where the folder name for GWC storage is created, and maybe change it to a simpler name for my request. But for now, I will work with the complete workspace+layer name…

Gabriel

On 17/11/2012 18:23, Andrea Aime wrote:

On Thu, Nov 15, 2012 at 5:34 PM, Gabriel Vatin <gabriel.vatin@anonymised.com> wrote:

Hello all,

I’ve been playing around with GeoWebCache and the GeoServer 2.2 lastly, but I still have some questions about WMS request : I tiled a layer XXX from a workspace xxx. So now I can perfectly query it with these URL, and have fast raster display :

The thing is I don’t want to use the workspace name xxx in my WMS query (the GS architecture should be transparent). The query without this statement works, but it doesn’t use the tiled image, even if I use tiled=true (so it’s quite long…). GWC doesn’t recognize the layers if I query only LAYERS=XXX with the /gwc/service/wms URL.

Does tile caching only works with the full workspace-layer name, or is there a trick to have tiled images with something like :

http://myServer/geoserver/wms?LAYERS=XXX&TILED=true&FORMAT=image/jpeg&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:4326&BBOX=0,-90,180,90&WIDTH=256&HEIGHT=256

I’m not sure if it’s possible or not in the integrated GWC.
GeoServer has the ability to support both qualified and unqualified names as you say, but
GeoWebCache only supports one name for its layers, and it’s the fully qualified one.

It should not be too hard to make the GWC integration in GeoServer do some sort of lookup
on the GeoServer catalog in case the layer requested is not found, and fall back on GS
lookup logic.

Basically the integration code would have to “fix” the layer name before the request actually
enters in the GWC core.

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it