<div dir="ltr"><div class="gmail_default" style="font-size:small">Yes that is closer but the real goal is to be able to add an SLD to the project file. Ideally as a SLD_BODY parameter for the URL.</div><div class="gmail_default" style="font-size:small">Kurt</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 26, 2021 at 6:30 PM Charles Dixon-Paver <<a href="mailto:charles@kartoza.com">charles@kartoza.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Just to chime in, all these responses seem to be discussing sld and 

wms

server configuration options, but the original question mentioned applying edits to the qgis project file. I would think the simplest solution is to use something like loadSldStyle[1] from pyqgis? Not sure if I'm missing the point of the conversation though.<br><br>[1] <a href="https://qgis.org/pyqgis/master/core/QgsMapLayer.html#qgis.core.QgsMapLayer.loadSldStyle" target="_blank">https://qgis.org/pyqgis/master/core/QgsMapLayer.html#qgis.core.QgsMapLayer.loadSldStyle</a><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 26 Oct 2021 at 14:21, Jorge Gustavo Rocha <<a href="mailto:jgr@di.uminho.pt" target="_blank">jgr@di.uminho.pt</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi René,<br>
<br>
I'm just asking questions to fully understand the use case. Thank you <br>
for your feedback. You mentioned an interesting point.<br>
<br>
As you mentioned, the solution can be based on the server side if the <br>
map server accepts an SLD.<br>
<br>
This approach can not be used against WMS services working behind <br>
caches/tiling services providing only predefined styles.<br>
<br>
Regards,<br>
<br>
Jorge Gustavo<br>
<br>
On 26/10/21 12:43, René-Luc Dhont wrote:<br>
> Hi Jorge,<br>
> <br>
> WMS Server can process SLD  provide in a GetMap Request.<br>
> QGIS Server is able to apply an SLD to a layer and provide the resulting <br>
> image. The SLD can be provided through the SLD_BODY parameter or the  <br>
> SLD parameter for linked file.<br>
> <a href="https://docs.qgis.org/3.16/en/docs/server_manual/services.html#qgisserver-wms-getmap" rel="noreferrer" target="_blank">https://docs.qgis.org/3.16/en/docs/server_manual/services.html#qgisserver-wms-getmap</a><br>
> This capability is mainly exploited by web clients<br>
> <br>
> René-Luc<br>
> <br>
> Le 26/10/2021 à 12:26, Jorge Gustavo Rocha a écrit :<br>
>> Hi Kurt,<br>
>><br>
>> By design, WMS GetMap requests returns images. Those are rendered on <br>
>> the server side, by the map server. Many services just provide those <br>
>> rendered images.<br>
>><br>
>> Are you trying to provide advanced image processing capabilities on <br>
>> the client side to apply an SLD on top those images?<br>
>><br>
>> Or would you like to try other GetMap formats, more friendly to <br>
>> process on the client side? Like svg or kml? Some of these formats are <br>
>> available as vendor options of the map server.<br>
>><br>
>> Regards,<br>
>><br>
>> Jorge Gustavo<br>
>><br>
>><br>
>> On 26/10/21 10:58, Kurt Menke wrote:<br>
>>> Hello,<br>
>>> We have been developing web apps that allow the user to download the <br>
>>> selected extent and data layers as a QGIS project file. Many of the <br>
>>> layers are hosted by the government as WMS services. We are wondering <br>
>>> if anyone has looked into the possibility of applying an SLD style to <br>
>>> a WMS layer in QGIS. We were hoping to be able to edit the *.qgs file <br>
>>> programmatically. We would be interested in sponsoring the effort <br>
>>> depending on the level of effort required, assuming it is even possible.<br>
>>> Best,<br>
>>> Kurt<br>
>>><br>
>>> -- <br>
>>><br>
>>> Kurt Menke<br>
>>><br>
>>> GIS-Consultant<br>
>>> --------------------------<br>
>>> Septima P/S<br>
>>> Frederiksberggade 19, 2nd Floor<br>
>>> 1459 Copenhagen<br>
>>><br>
>>> Tlf: +45 5114 6444<br>
>>><br>
>>> _______________________________________________<br>
>>> QGIS-Developer mailing list<br>
>>> <a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
>>> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
>>> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
>>><br>
>><br>
>> J. Gustavo<br>
> <br>
> <br>
> _______________________________________________<br>
> QGIS-Developer mailing list<br>
> <a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
> <br>
<br>
J. Gustavo<br>
-- <br>
Jorge Gustavo Rocha<br>
Departamento de Informática<br>
Universidade do Minho<br>
4710-057 Braga<br>
Gabinete 3.29 (Piso 3)<br>
Tel: +351 253604480<br>
Fax: +351 253604471<br>
Móvel: +351 910333888<br>
skype: nabocudnosor<br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div>
</blockquote></div>