On Sat, Jan 22, 2011 at 1:00 AM, Eric Jarvies <7@anonymised.com> wrote:
Hello,
I have added a cascading WMS data store to my GeoServer, and all of the remote WMS layers are appearing/loading, but I am having rendering problems.
The rendered map tiles should look like this:
http://loscabosproperties.mx/geoserver/1.png
But instead they look like this:
http://loscabosproperties.mx/geoserver/2.png
A live example can be seen here(need to zoom way-in to see the improper image tile rendering as is shown in the above 2.png image):
http://173.203.195.77:8080/geoserver_2.1b1/wms?service=WMS&version=1.1.0&request=GetMap&layers=loscabos:catastro&styles=&bbox=-110.122,22.825,-109.409,23.688&width=423&height=512&srs=EPSG:4326&format=application/openlayers
The original WMS server I am connecting to is a MapServer and is here:
http://www.catastroloscabos.gob.mx/cgi-bin/mapserv.fcgi?map=/home/juribe/webcatastro/catastro.map&
In uDig, when I connect to the original WMS source, I have to change the uDig ‘Basic WMS Renderer’ settings so that ‘image/jpeg’ is first on the list, otherwise the aforementioned source renders improperly the same way it is rendering via the GeoServer Cascading WMS. So how does one correct this in GeoServer so the image tiles render properly?
GeoServer tries to cascade using “image/png” as the format but that format is not supported,
a “image/png; image/png; mode=24bit” is reported to be available instead which GeoServer
does not understand.
Since it does not find that it just picks the first one in the capabilities, which happens to
be “image/gif”, the images you’re getting are actually the ones from mapserver as it
draws them in gif format.
Have a look at the cascaded output:
http://173.203.195.77:8080/geoserver_2.1b1/wms?LAYERS=loscabos:catastro&STYLES=&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:4326&BBOX=-109.6805230885,23.065605232237,-109.67913053708,23.067290779113&WIDTH=423&HEIGHT=512
and the same request against MapServer in GIF format:
http://www.catastroloscabos.gob.mx/cgi-bin/mapserv.fcgi?map=/home/juribe/webcatastro/catastro.map&LAYERS=catastro&STYLES=&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:4326&BBOX=-109.6805230885,23.065605232237,-109.67913053708,23.067290779113&WIDTH=423&HEIGHT=512&FORMAT=image/gif
It would be nice if GS allowed the user to choose which format to support for cascading, unfortunately
for the moment we don’t have that setting.
We have some guessing code that already tries “image/png”, “image/png24”, “png”, “png24”, I’ve
just added the MapServer “image/png; mode=24bit” one to the mix and now GS can cascade that
server without odd visual effects.
(http://jira.codehaus.org/browse/GEOT-3393)
As for adding the ability to choose the cascading format, that’s requires more time than I have now,
hopefully someone else will chime in and add that too.
In a perfect world it would be nice to have the admin setup two cascading formats, a transparent
one to be used when the wms layer is used as an overlay, and one that does not support
transparency/translucency to be used when the layer is used as a base layer: that would allow
to use JPEG or PNG 8 bits for cascading the base layers, which normally produces more compact files
(and would thus speed up cascading).
Cheers
Andrea
–
Ing. Andrea Aime
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584962313
fax: +39 0584962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf