Opened 12 years ago

Last modified 12 years ago

#4167 new defect

MapServer seems to always use GDAL driver with cascaded WMS (instead of AGG)

Reported by: elzouavo Owned by: msogcbugs
Priority: normal Milestone:
Component: WMS Client Version: 5.6
Severity: normal Keywords:
Cc:

Description (last modified by dmorissette)

Hi,

I have some troubles using AGG with cascaded WMS.

I have my first mapfile that exposes WMS layers (MapServer is used as a WMS server and a WMS client): refs.map

I have a second mapfile that contains a Postgis layer (this mapfile uses only MapServer as WMS server): roads.map

I'm using MapServer 5.6.0 beta 3 on Debian (to avoid WFS requests issues with the folowing versions). But I have the same problem with 5.6.3. I advertise raster formats with "GetMap formats" to use AGG driver. I can get nice PNG with AGG when I request directly my second mapfile roads.map (using mapserver only as WMS server). But if I request my first mapfile refs.map (that then requests my second mapfile using MapServer as WMS client), I get PNG with bad aliasing (AGG does not seem to be used!).

I looked at the mapserv.log (for the WMS/GetMap that requests the cascaded WMS) and I saw : "msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,4"

Does "msDrawGDAL" meen that DGAL driver is used instead of AGG driver ?

Thanks for your reply. Laurent NB : Sorry for my poor English...

An extract of my first mapfile (refs.map):

MAP
...
   OUTPUTFORMAT
     NAME "PNG"
     DRIVER "AGG/PNG"
     MIMETYPE "image/png"
     IMAGEMODE RGBA
     TRANSPARENT ON
   END
   ...
   WEB
     ...
     METADATA
        ...
        "wms_getmap_formatlist" "image/png,image/jpg,image/jpeg"
     END
   END
   LAYER
     NAME "my_layer"
     ...
     CONNECTIONTYPE WMS
     "http://my_domain/cgi-bin/mapserv?map=/my_path/roads.map";
     METADATA
       WMS_NAME "my_roads"
       "wms_server_version"  "1.1.1"
       "wms_format" "image/png"
       ...
     END
   END
   ...
END

An extract of my second mapfile (roads.map) :

MAP
...
   OUTPUTFORMAT
     NAME "PNG"
     DRIVER "AGG/PNG"
     MIMETYPE "image/png"
     IMAGEMODE RGBA
     TRANSPARENT ON
   END
   ...
   WEB
     ...
     METADATA
        ...
        "wms_getmap_formatlist" "image/png"
     END
   END
   LAYER
     NAME "my_roads"
     ...
     CONNECTIONTYPE    postgis
   ...
   END
...
END

I'm not sure that this behavior should be different with mapserver 6.0...

NB: I've already post this message on Tue, 27 Apr 2010 in the mailing list, but no reply... ;-(

Attachments (2)

2png.zip (255.4 KB ) - added by elzouavo 12 years ago.
PNG with direct WMS access and an other with cascading access
logs.zip (5.9 KB ) - added by elzouavo 12 years ago.
2 logs : WMS direct access and cascading WMS access

Download all attachments as: .zip

Change History (10)

by elzouavo, 12 years ago

Attachment: 2png.zip added

PNG with direct WMS access and an other with cascading access

comment:1 by sdlime, 12 years ago

Component: MapServer C LibraryWMS Client
Owner: changed from sdlime to msogcbugs

comment:2 by dmorissette, 12 years ago

Description: modified (diff)

comment:3 by dmorissette, 12 years ago

First thing to check: enable DEBUG 5 in your cascaded map layer and check in your log output that the WMS GetMap request sent to the remote server indeed produces antialiased output. i.e. we need to determine whether the problem is that cascading sends the wrong request to the remote server, or whether it's in the reading of the result that the problem happens.

Also make sure that there is no reprojection or resampling happening anywhere in the cascading (attach a copy of the logs and exact GetMap request sent to both servers if you are not sure how to check.)

Note that the use of GDAL when cascading is not as an output format, but as the input driver to read in the image that was received from the remote server. It is very possible that the image gets messed up if resampling takes place for instance.

Of course as always a small self-contained test case to reproduce can help us help you.

And yes, testing against 6.0 would be worthwhile.

comment:4 by dmorissette, 12 years ago

Actually, you may want to start by testing with 6.0 since there have been significant changes in the rendering code in 6.x.

comment:5 by elzouavo, 12 years ago

I have modified my mapfiles and symbols file to test with version 6.0. Cascading WMS works fine with this version. For 5.6 I have already put debug level to 5 and I checked the requests. There is nothing strange for me. I'll send you the log file tomorrow. Thanks a lot

comment:6 by dmorissette, 12 years ago

Note that we are unlikely to spend time working on a 5.6 bug if it's working fine in 6.x, unless it's really straightforward.

by elzouavo, 12 years ago

Attachment: logs.zip added

2 logs : WMS direct access and cascading WMS access

comment:7 by elzouavo, 12 years ago

Example of requests :

  • WMS direct access :
    http://mapserver-i2.cete-mediterranee.i2/maps/mapserv?map=/home/saez/carto/ref/ms/glissant/routier.map&LAYERS=bdtopo_route,nom_rue,numero_route,numero_euro&OPACITY=1&ISBASELAYER=false&TRANSPARENT=true&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:2154&BBOX=809947.2260669996,6302713.788200014,810800.5160669994,6303282.648200014&WIDTH=900&HEIGHT=600
    
  • WMS with cascade :
    http://georef.cete-mediterranee.i2/georef_i2/mapserv?LAYERS=nom_rue&OPACITY=1&ISBASELAYER=false&TRANSPARENT=true&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:2154&BBOX=809947.2260669996,6302713.788200014,810800.5160669994,6303282.648200014&WIDTH=900&HEIGHT=600
    

comment:8 by elzouavo, 12 years ago

I can send you an extract of my PostGIS data to reproduce this test.

Note: See TracTickets for help on using tickets.