[mapserver-users] WMS Client does not recognize "wms_extent"
Heiko Schröter
schroete at iup.physik.uni-bremen.de
Wed Apr 14 01:20:51 PDT 2010
Hello,
mapserver seems not to take "wms_extent" into account when receiving raster images via WMS.
According to the docs this tag should take precedence over all others.
Case 1, SRC Projection = DST Projection :
a) Images are displayed correctly when read via DATA statement. msResampleGDALToMap() called.
b) Images are displayed incorrectly when read via WMS. wld_file does not matter. msDrawRasterLayerGDAL() called. Calling msResampleGDALToMap() instead fixes this.
Case 2, SRC Projection != DST Projection
a) Images are displayed correctly when read via DATA statement. msResampleGDALToMap() called.
b) Images are displayed incorrectly when read via WMS. wld_file does matter. msResampleGDALToMap() called. "wms_extent" not recognized and does not take precedence. Bug(?) in msGetGDALGeoTransform().
Force Removing the wld_file in mapwmslayer.c in function msDrawWMSLayerLow() before msDrawLayer() is called, forces same proceeding as with images read via DATA statement and fixes it.
Else something is broken in the processing logic of the WMS (client) handling or i'am doing something completely wrong (and stupid).
Thanks and Regards
Heiko
/var/www/localhost/mapserver/mapserv -v
MapServer version 5.6.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
The image recieved via WMS is the same as the in the DATA statment.
LAYER
EXTENT -180 -90 180 90
NAME "GRID_TEST"
OPACITY 60
STATUS ON
DEBUG ON
METADATA
"wms_timeextent" "1970-01-01/2030-12-31"
"wms_timeitem" "datum" #column in postgis table of type timestamp
"wms_timedefault" "2007-12-10/2007-12-11"
"wms_title" "grid_test"
"wms_name" "grid_test"
"wms_format" "image/png"
"wms_server_version" "1.1.1"
"wms_srs" "EPSG:4326"
"wms_extent" "-180 -90 180 90"
END
PROJECTION
"init=epsg:4326"
END
CONNECTION "http://mailserv2/cgi-bin/grid_test.pl?"
CONNECTIONTYPE WMS
# DATA "/var/www/localhost/htdocs/grafik/wackelkontakt.png"
TYPE RASTER
END # Layer
LAYER
EXTENT -180 -90 180 90
NAME "GRID_TEST1"
OPACITY 60
STATUS ON
DEBUG ON
METADATA
"wms_timeextent" "1970-01-01/2030-12-31"
"wms_timeitem" "datum" #column in postgis table of type timestamp
"wms_timedefault" "2007-12-10/2007-12-11"
"wms_title" "grid_test1"
"wms_name" "grid_test1"
"wms_format" "image/png"
"wms_server_version" "1.1.1"
"wms_srs" "EPSG:4326"
"wms_extent" "-180 -90 180 90"
END
PROJECTION
"init=epsg:4326"
END
# CONNECTION "http://mailserv2/cgi-bin/grid_test.pl?"
# CONNECTIONTYPE WMS
DATA "/var/www/localhost/htdocs/grafik/wackelkontakt.png"
TYPE RASTER
END # Layer
More information about the MapServer-users
mailing list