Opened 13 years ago
Closed 13 years ago
#3853 closed bug (fixed)
Problems with some WMS services (from toronto.ca/open)
Reported by: | mgleahy | Owned by: | nobody |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | Version 1.7.0 |
Component: | Build/Install | Version: | 1.6.0 |
Keywords: | Cc: | ||
Must Fix for Release: | No | Platform: | All |
Platform Version: | Awaiting user input: | no |
Description
I've notice a problem when I try to load layers from the WMS services listed at http://toronto.ca/open (follow the big "Get the Data" link, then scroll to the bottom of the page). When I connect to these directly within QGIS, I can see the list of layers, projection info, etc. But when I try to add them to the map the layers just appear blank (and do not have default extents that I can zoom to). You can try it yourself by adding a WMS server in QGIS with the 'CONNECTION' url in the sample mapfile below, then try adding one or more layers from it...the layers will appear in the layer control in QGIS, but no data will appear in the map. Using the sample mapfile below, I was able to use MapServer as a local proxy for the WMS service. By connecting QGIS to the wms_onlineresource metadata parameter below, I am able to get the Ortho Imagery displayed from the Toronto WMS service.
Based on this, MapServer clearly doesn't have a problem requesting data from the Toronto WMS service. QGIS in turn is able to use MapServer. However, although this can serve as a workaround, it isn't an ideal solution. It appears that this is a problem with the ability of QGIS to interoperate directly with the Toronto WMS service. I checked with the users list first, and it was recommended that this be reported here.
/path/to/wms.map:
MAP NAME "Toronto OrthoImagery (proxy)" STATUS ON SIZE 1024 1024 EXTENT 292998.8237 4824999.2385 336000.8237 4858001.2385 UNITS meters PROJECTION "init=epsg:2019" END IMAGECOLOR 255 255 255 TRANSPARENT ON WEB METADATA 'wms_title' 'Toronto OrthoImagery (proxy)' 'wms_onlineresource' 'http://localhost/cgi-bin/mapserv?map=/path/to/wms.map&' 'wms_srs' 'EPSG:2019' 'ows_enable_request' '*' END END LAYER NAME "Ortho Imagery 50cm 2005" STATUS ON TYPE RASTER CONNECTION "http://map.toronto.ca:80/servlet/com.esri.wms.Esrimap/OrthoImagery?" CONNECTIONTYPE WMS METADATA "wms_srs" "EPSG:2019" "wms_name" "Ortho Imagery 50cm 2005" "wms_server_version" "1.1.1" "wms_format" "image/png" "wms_title" "Ortho Imagery 50cm 2005" END PROJECTION "init=epsg:2019" END END END
Seems the extents are reported in some string way:
The coordinates need to be in latlon and there isn't supposed to be a SRS attribute.
The commit a002e13f14c4ba9ff75de3bc47125128aa543037 implements some workarounds to support that WMS.