[Qgis-user] WMS problem with QGIS
Jacolin Yves
yjacolin at free.fr
Fri Sep 12 08:16:22 PDT 2008
Hi,
A few monthes I sent an email to this list to know if some people get the same
problem than me :
http://www.nabble.com/WMS-in-QGIS%3A-no-map-displayed-td15479976.html#a15479976
I tried again to setup a WMS service using mapserver and use it with QGIS. I
built the same release for all librayries needed and then this issues came up
again.
I finally find why this occurs and would like to share it with you.
*** The problem :
When you load a WMS service the url asked by QGIS is wrong, the size of the
map and the extent is not the same than the one used inside QGIS. For
example, if you are using a map WIDTH=1127 and HEIGHT=645 and extent =
498320.400455,2343760.450000,726624.599545,2474361.550000, QGIS will ask a
size map of WIDTH=250 and HEIGHT=307, and an extent =
362527.432874,2367229.084226,448867.322384,2473331.248467
Furthermore, the url seems not complete !
Bad request :
http://geomatique/cgi-bin/wms?
SERVICE=WMS&VERSION=1.1.1&
REQUEST=GetMap&
BBOX=
362527.432874,
2367229.084226,
448867.322384,
2473331.248467&
SRS=EPSG:27572&
WIDTH=250&HEIGHT=307&
LAYERS=basias
Good request :
http://geomatique/cgi-bin/wms?
SERVICE=WMS&VERSION=1.1.1&
REQUEST=GetMap&
BBOX=
588028.155182,
2432149.054856,
599460.687155,
2438689.018892&
SRS=EPSG:27572&WIDTH=1127&HEIGHT=645&
LAYERS=basias&STYLES=&
FORMAT=image/png&TRANSPARENT=TRUE
*** How to avoid this issue:
Why this occurs? I do not know really why but I have find how to avoid this,
so it can be useful for everyone.
Here was my mapfile:
LAYER
NAME "basias"
STATUS ON
TYPE POINT
DUMP TRUE
CONNECTIONTYPE postgis
CONNECTION "dbname=dev_sig user=www password=www host=localhost"
DATA "the_geom from gis_basias"
TEMPLATE "ttt"
PROJECTION
"init=epsg:27572"
END
CLASS
...
END
CLASS
...
END
METADATA
"ows_title" "BASIAS"
"ows_abstract" "Inventaires historiques régionaux des sites industriels et
activités de service.<br/> <strong>Source :</strong> BRGM, 2007."
"wms_srs" "EPSG:27572"
"ows_extent" "537029 2365526 619213 2468573"
"ows_attribution_logourl_href" "http://geomatique/mapserv_wms?LAYERS=basias&BBOX=585562,2432060,588090,2434202&REQUEST=GetMap&VERSION=1.1.1&SERVICE=WMS&WIDTH=50&HEIGHT=50&
SRS=EPSG:27572"
"ows_attribution_logourl_height" "50"
"ows_attribution_logourl_width" "50"
"ows_attribution_logourl_format" "image/png"
"gml_featureid" "basias"
"gml_include_items" "all"
END
END
If I comment "ows_extent" "537029 2365526 619213 2468573", QGIS run correctly.
Best regard,
Y.
--
Yves Jacolin
---
http://softlibre.gloobe.org
More information about the Qgis-user
mailing list