Timeline for How to get legend image from a WMS using PyQgis
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 4, 2018 at 4:57 | history | edited | nmtoken | CC BY-SA 3.0 |
added more detail
|
Mar 4, 2018 at 4:45 | comment | added | nmtoken | Note, GIS.SE, is not a code writing service, my answer is to help you understand you need a GetLegendGraphic request. | |
Mar 4, 2018 at 4:42 | comment | added | nmtoken |
I understand you're trying to do it with Python, I know what PyQGIS is. The it in question though is as I have described, that is what you will need to do programmatically. If your urlWithParams = "url=http://www.geoportaligm.gob.ec/50k/wms&format=image/png&layers=igm:acequia_l&styles=&crs=EPSG:32717" is meant to be the URL that generates the contextual legend then you will need replace that with an appropriate GetLegendGraphic request. You will need to split the contextual and noncontextual components, as the contextual part changes as your zoom/move the map.
|
|
Mar 4, 2018 at 4:07 | comment | added | George | Thanks for taking your time and give such a nice explanation. Nevertheless I am looking for doing it by means of python code. If you try to run the code provided within the python console, you will find that this method loads the data but there is no legend. Could you give me a hand with that? | |
Mar 3, 2018 at 4:16 | history | edited | nmtoken | CC BY-SA 3.0 |
adding detail
|
Mar 3, 2018 at 3:57 | history | edited | nmtoken | CC BY-SA 3.0 |
adding detail to first example and guiding through similar for OPs example
|
Mar 2, 2018 at 17:34 | history | answered | nmtoken | CC BY-SA 3.0 |