[QGIS-Developer] QGIS Server 3.4.7 and WFS Filtering PropertyIsLike
Luca Manganelli
luca.manganelli at comune.trento.it
Tue Jun 11 05:18:22 PDT 2019
Hello,
I'm trying to make this python 3 code with OwsLib working.
In particular, I'm searching a road with the name starting by "VIA F.", but
QGIS Server returns me a road named VIA MATTEOTTI...
Does QGIS Server support PropertyIsLike in WFS?
#!/usr/bim/python3
from owslib.wfs import WebFeatureService
from owslib.etree import etree
from owslib.fes import PropertyIsEqualTo, PropertyIsLike, BBox
wfs = WebFeatureService(url='https://cartografia.comunelavis.it/wms/cbase')
filt = PropertyIsLike(propertyname='nome_via', literal='VIA F.%',
wildCard='%', matchCase=False)
filterxml = etree.tostring(filt.toXML()).decode("utf-8")
feature = wfs.getfeature(typename=['Civici'], maxfeatures=1,
filter=filterxml)
gml = etree.parse(feature)
print(etree.tostring(gml))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20190611/5b728d8c/attachment.html>
More information about the QGIS-Developer
mailing list