Bug report #3853
Problems with some WMS services (from toronto.ca/open)
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | nobody - | ||
Category: | Build/Install | ||
Affected QGIS version: | Regression?: | No | |
Operating System: | All | Easy fix?: | No |
Pull Request or Patch supplied: | Resolution: | fixed | |
Crashes QGIS or corrupts data: | Copied to github as #: | 13911 |
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
Associated revisions
implement some workaround to support legacy WMS (fixes #3853)
History
#1 Updated by Jürgen Fischer over 13 years ago
- Resolution set to fixed
- Status changed from Open to Closed
Seems the extents are reported in some string way:
<LatLonBoundingBox maxy="4860000" maxx="338000" miny="4824000" minx="291000" SRS="EPSG:2019"/>
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.