<div dir="ltr">It works! The method isn't very convenient, but it gets the right data. Thanks a lot!<div><br></div><div>I found that adding "IgnoreGetMapUrl=1" to the parameters of an addRasterLayer() call makes it possible to do this from the console, it just requires the URL to be extended with the qcl_filter and encoded (basicly just replace the '&' with '%26'). So it might even be possible for me to make the whole process convenient with a bit of scripting. Again thanks.</div>

<div><br></div><div>Best,</div><div>Henning<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 20, 2013 at 11:18 AM, Jukka Rahkonen <span dir="ltr"><<a href="mailto:jukka.rahkonen@mmmtike.fi" target="_blank">jukka.rahkonen@mmmtike.fi</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Henning Jagd <hjagd11@...> writes:<br>
<br>
><br>
><br>
> Hi List,I am using QGIS 2 to view some WMS maps from a Geoserver. I want<br>
<div><div>to filter the data using a CQL_FILTER option in the request, but cannot<br>
figure out how to do this in QGIS? I tried using the python console and<br>
adding the filter as a parameter in a qgis.utils.iface.addRasterLayer()<br>
call, but this didn't seem to work. Any other ideas on how I could get this<br>
to work?<br>
<br>
</div></div>I have not tested, but it might work if you create a new WMS connection and<br>
include the CQL filter part into the WMS base URL. You must check the first<br>
selection box for so that the GetMap that is advertised by the server will<br>
not be used.<br>
<br>
I think that some easy way to add and edit vendor parameters for each WMS<br>
layer would be nice to have. It could be used for CQL filter, SLD, SLD_BODY etc.<br>
<br>
-Jukka Rahkonen-<br>
<br>
<br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div><br></div></div></div>