[Qgis-developer] QGIS - WMS and WFS - Pakistan Flood

Richard Duivenvoorde rdmailings at duif.net
Tue Aug 24 16:06:48 EDT 2010


Noli Sicad wrote:
> Hi,
> 
> I am trying out the capabilities of QGIS in opening / rendering WMS
> and WFS servers.
> 
> No QGIS on this page yet, it all Arc.
> 
> http://ags.pdc.org/rest/services/Pakistan/PAKISTAN_FLOOD/MapServer
> 
> Howerver at the bottom, there is WMS and WFS
> 
> "Supported Interfaces:   REST    SOAP    WMS    WFS    WCS"
> 
> Please try opening WMS with QGIS and see the error.
> 
> WFS seems to work but still QGIS complaints :-)
> 
> How can we make QGIS comply with this "Arcgis server"?

Hi Noli,

the WMS is working, though the working URL is a little 'hidden'.
use:
http://agsprod.pdc.org/arcgis/Pakistan/PAKISTAN_FLOOD/MapServer/WMSServer?

Some explanation:

If you click on the WMS-word/link in the Supported Interfaces on the 
page, you get the following url:
http://agsprod.pdc.org/arcgis/Pakistan/PAKISTAN_FLOOD/MapServer/WMSServer?request=GetCapabilities&service=WMS

Qgis actually adds 'SERVICE=WMS&REQUEST=GetCapabilities' to the url for 
retrieving the capabilities, which makes it:
http://agsprod.pdc.org/arcgis/Pakistan/PAKISTAN_FLOOD/MapServer/WMSServer?request=GetCapabilities&service=WMS&SERVICE=WMS&REQUEST=GetCapabilities
apparently the (arcgis?) mapserver behind it chokes on this, giving 
"Can't parse XML request." (try in browser if you want to see the error)

If you use:
http://agsprod.pdc.org/arcgis/Pakistan/PAKISTAN_FLOOD/MapServer/WMSServer?
as wms base url in qgis you get a full list of layers.
BUT it will ask you if the url you gave should be used or the url's from 
the capabilities for the GetMap and GetFeatureInfo request (qgis asks 
this because the 'advertised urls are not the same as the base url). If 
you say 'No' there on both question the checkboxes "Ignore GetMap URL" 
and "Ignore GetFeature URL" will be checked, which makes QGIS use your 
own base url above for all it's url's. In this way it works. You can 
also anwer 'yes' to the questions, and check the checkboxes by hand off 
course.

So I would say: the administrator of the service has some work to do, 
but Qgis can handle this 'Arcgis server' :-)

Good Luck

Richard Duivenvoorde

ps1 I had some troubles first to get some visible layers, but keep trying
ps2 this looks more like a user list question to be honest




More information about the Qgis-developer mailing list