How can I iterate a layer group with owslib in QGIS in a script? If is not possible, are there alternatives?
Here is a sample code of what I'm trying to achieve:
2,5,8
has 1
as parent.
from owslib.wms import WebMapService
wms = WebMapService('https://neo.sci.gsfc.nasa.gov/wms/wms', version='1.1.1')
list(wms.contents)) #prints wms layers,not the groups also [['MOD14A1_M_FIRE', 'MOD14A1_E_FIRE'...]
# the above is listing only the children not the parents
# I want to iterate also the parent with 0->1->[2,5,8] within a script
img = wms.getmap(layers=['1'], #this is not working bcs a parent obviously
srs='EPSG:6343',
bbox=(708542, 460329, 731172, 493289),
size=(100, 100),
format='image/tiff')