Skip to content

Commit 4c39cba

Browse files
committed
docs: update WFS usage docs
1 parent b839d69 commit 4c39cba

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

docs/source/usage.rst

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@ compatible with a `Fiona schema object <https://fiona.readthedocs.io/en/latest/f
115115
>>> wfs11.get_schema('bvv:vg_ex')
116116
>>> {'properties': {'land': 'string', 'modellart': 'string', 'objart': 'string', 'objart_txt': 'string', 'objid': 'string', 'hdu_x': 'short', 'beginn': 'string', 'ende': 'string', 'adm': 'string', 'avg': 'string', 'bez_gem': 'string', 'bez_krs': 'string', 'bez_lan': 'string', 'bez_rbz': 'string', 'sch': 'string'}, 'geometry': '3D MultiPolygon', 'geometry_column': 'geom'}
117117

118-
Download GML using ``typename`` and ``filter``. OWSLib currently only
119-
support filter building for WFS 1.1 (FE.1.1).
118+
Download GML using ``typename`` and ``filter``.
119+
120+
Usage with WFS 1.1 (FE.1.1):
120121

121122
::
122123

@@ -129,6 +130,21 @@ support filter building for WFS 1.1 (FE.1.1).
129130
>>> filterxml = etree.tostring(filter.toXML()).decode("utf-8")
130131
>>> response = wfs11.getfeature(typename='bvv:gmd_ex', filter=filterxml)
131132

133+
Usage with WFS 2.0 (FE.2.0):
134+
135+
::
136+
137+
>>> from owslib.fes2 import *
138+
>>> from owslib.etree import etree
139+
>>> from owslib.wfs import WebFeatureService
140+
>>> wfs11 = WebFeatureService(url='http://geoserv.weichand.de:8080/geoserver/wfs', version='2.0.0')
141+
142+
>>> filter = Filter(
143+
PropertyIsLike(propertyname='bez_gem', literal='Ingolstadt', wildCard='*')
144+
)
145+
>>> filterxml = etree.tostring(filter.toXML()).decode("utf-8")
146+
>>> response = wfs11.getfeature(typename='bvv:gmd_ex', filter=filterxml)
147+
132148
Save response to a file.
133149

134150
::

0 commit comments

Comments
 (0)