I am trying to import WMS from geoserver link to QGIS 2.8.4 & the latest 2.12.1: http://geoportal.asig.gov.al/Services/host/host.ashx?url=http://localhost:8080/geoserver/asig/wms&
QGIS get the request and show the layers of the workspace, and also the get info. My problem is that the layer is not visible in the view.
It works fine with version 2.2:
Answer
As far as I can tell this appears to be an error with QGIS stripping the host name off the url; so I get errors in the console like:
Map request failed [error:Protocol "" is unknown url:/Services/host/host.ashx?url=http://localhost:8080/geoserver/asig/ows&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=345119.95276619656942785,4499106.68403259478509426,503972.04766661184839904,4603200.33713638130575418&CRS=EPSG:32634&WIDTH=640&HEIGHT=419&LAYERS=cz_division&STYLES=&FORMAT=image/png&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE&AspxAutoDetectCookieSupport=1]
I checked the value of the URL stored in the registry something like:
HKEY_CURRENT_USER\SOFTWARE\QGIS\QGIS2\Qgis\connections-wms\your-service-name
And that seems correct
I created a GDAL WMS mini driver (see http://www.gdal.org/frmt_wms.html for all the options) as below
http://geoportal.asig.gov.al/Services/host/host.ashx?url=http://localhost:8080/geoserver/asig/wms
image/png
cz_division
xyXY
EPSG:32634
EPSG:32634
TRUE
359060.34375
4719675.5
505375.90625
4387020.0
1024
1024
GDAL WMS driver (http://www.gdal.org/frmt_wms.html)
Then I add this through the add raster layer tool, and I get the map.
So you can use one or more mini drivers to get the maps showing in QGIS, but really you should probably report the issue to QGIS to get a proper fix:
http://hub.qgis.org/projects/quantum-gis/issues
If you look at the layer properties > layer source of a WMS layer that works, for example :
contextualWMSLegend=0&crs=EPSG:4326&dpiMode=2&featureCount=10&format=image/png&layers=BMNG&styles=&url=http://mapsref.brgm.fr/wxs/1GG /monde1GG?
You can see that it chops the request up into several pieces including an url parameter. I think the QGIS issue with the ASIG service is that the ASIG service itself defines an URL parameter.
No comments:
Post a Comment