Bug report #10634
Updated by Giovanni Manghi about 7 years ago
I have local MapServer-based WMS server which can send data in two SRS: EPSG:4326 and EPSG:3857. When I add layer using SRS EPSG:4326 all works fine, but when I try to add layer using SRS EPSG:3857 I get error message:
<pre>
WMS provider: Cannot calculate extent
Raster layer: Provider is not valid (provider: wms, URI: crs=EPSG:3857&dpiMode=2&featureCount=10&format=image/png&layers=building&styles=&url=http://192.168.250.105/cgi-bin/wms?VERSION%3D1.1.1
</pre>
In QGIS 1.8 this WMS-layer works fine with both SRS.
Example of map-file:
<pre>
MAP
NAME "Vega WMS Server"
SYMBOLSET "symbols/symbols.sym"
FONTSET "fonts/fonts.list"
OUTPUTFORMAT
NAME "png"
EXTENSION "png"
MIMETYPE "image/png"
DRIVER AGG/PNG
IMAGEMODE RGBA
FORMATOPTION "INTERLACE=OFF"
END
PROJECTION
"init=epsg:3857"
END
WEB
METADATA
"wms_title" "WMS Demo Server for MapServer"
"wms_onlineresource" "http://10.22.0.9/cgi-bin/mapserv?map=/home/rykovd/wms/wms.map&"
"wms_srs" "EPSG:4326 EPSG:3857"
"wms_abstract" "Saint Petersburg demo WMS"
"wms_enable_request" "*"
"wms_encoding" "utf-8"
END
END
LAYER
NAME "building"
METADATA
"wms_title" "Building"
"gml_include_items" "all"
"wms_enable_request" "*"
"wms_extent" "3277518.64189396 8321348.77352887 3420433.60980062 8453918.88750861"
END
TEMPLATE dummy.html
TYPE POLYGON
CONNECTIONTYPE postgis
CONNECTION "user=pguser password=topsecret dbname=dbvega host=localhost"
DATA "webmercator from building_polygon"
CLASS
STYLE
COLOR 206 154 156
OUTLINECOLOR 106 106 106
END
END
END
END
</pre>
<pre>
WMS provider: Cannot calculate extent
Raster layer: Provider is not valid (provider: wms, URI: crs=EPSG:3857&dpiMode=2&featureCount=10&format=image/png&layers=building&styles=&url=http://192.168.250.105/cgi-bin/wms?VERSION%3D1.1.1
</pre>
In QGIS 1.8 this WMS-layer works fine with both SRS.
Example of map-file:
<pre>
MAP
NAME "Vega WMS Server"
SYMBOLSET "symbols/symbols.sym"
FONTSET "fonts/fonts.list"
OUTPUTFORMAT
NAME "png"
EXTENSION "png"
MIMETYPE "image/png"
DRIVER AGG/PNG
IMAGEMODE RGBA
FORMATOPTION "INTERLACE=OFF"
END
PROJECTION
"init=epsg:3857"
END
WEB
METADATA
"wms_title" "WMS Demo Server for MapServer"
"wms_onlineresource" "http://10.22.0.9/cgi-bin/mapserv?map=/home/rykovd/wms/wms.map&"
"wms_srs" "EPSG:4326 EPSG:3857"
"wms_abstract" "Saint Petersburg demo WMS"
"wms_enable_request" "*"
"wms_encoding" "utf-8"
END
END
LAYER
NAME "building"
METADATA
"wms_title" "Building"
"gml_include_items" "all"
"wms_enable_request" "*"
"wms_extent" "3277518.64189396 8321348.77352887 3420433.60980062 8453918.88750861"
END
TEMPLATE dummy.html
TYPE POLYGON
CONNECTIONTYPE postgis
CONNECTION "user=pguser password=topsecret dbname=dbvega host=localhost"
DATA "webmercator from building_polygon"
CLASS
STYLE
COLOR 206 154 156
OUTLINECOLOR 106 106 106
END
END
END
END
</pre>