Nyall Dawson wrote
> uri = QgsDataSourceUri(layer.source())
> table = uri.table()
> user = uri.username()
> restrict_bbox = uri.param("restrictToRequestBBOX")
>
> etc
>
> For non-db layers (eg disk based OGR/GDAL layers, you should use
> QgsProviderRegistry.instance().decodeUri(la
On Thu, 25 Apr 2019 at 21:19, Bo Victor Thomsen
wrote:
>
> Hi all -
>
> I have a python plugin where I iterate through all vectorlayers and get the
> source for each layer using
>
> mySource = myVectorLayer.source()
>
> The result could be something like this: (one line)
>
> restrictToRequestBBOX
I use:
from urllib.parse import parse_qs
d = parse_qs(layer.source())
if 'tileMatrixSet' in d:
useWMTS = True
wmts_url = d['url'][0].replace("request=getcapabilities", "")
wmts_layer = d['layers'][0]
wmts_format = d['format'][0]
wmts_crs = d['crs'][0]
wmts_style = d['style
Hi all -
I have a python plugin where I iterate through all vectorlayers and get the
source for each layer using
mySource = myVectorLayer.source()
The result could be something like this: (one line)
restrictToRequestBBOX='1' srsname='EPSG:25832'
typename='dai:theme-pg-natura2000_omraader_habita