@@ -190,6 +190,8 @@ def wfs_getfeature_post_compare(self, requestid, request):
190
190
)
191
191
192
192
def test_getfeature_post (self ):
193
+ tests = []
194
+
193
195
template = """<?xml version="1.0" encoding="UTF-8"?>
194
196
<wfs:GetFeature service="WFS" version="1.0.0" {} xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
195
197
<wfs:Query typeName="testlayer" xmlns:feature="http://www.qgis.org/gml">
@@ -205,8 +207,6 @@ def test_getfeature_post(self):
205
207
</wfs:Query>
206
208
</wfs:GetFeature>
207
209
"""
208
-
209
- tests = []
210
210
tests .append (('nobbox_post' , template .format ("" )))
211
211
tests .append (('startindex2_post' , template .format ('startIndex="2"' )))
212
212
tests .append (('limit2_post' , template .format ('maxFeatures="2"' )))
@@ -307,6 +307,41 @@ def test_getfeature_post(self):
307
307
"""
308
308
tests .append (('bbox_inside_and_post' , andBboxTemplate .format ("" )))
309
309
310
+ # With namespace
311
+ template = """<?xml version="1.0" encoding="UTF-8"?>
312
+ <wfs:GetFeature service="WFS" version="1.0.0" {} xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
313
+ <wfs:Query typeName="feature:testlayer" xmlns:feature="http://www.qgis.org/gml">
314
+ <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
315
+ <ogc:BBOX>
316
+ <ogc:PropertyName>geometry</ogc:PropertyName>
317
+ <gml:Envelope xmlns:gml="http://www.opengis.net/gml">
318
+ <gml:lowerCorner>8 44</gml:lowerCorner>
319
+ <gml:upperCorner>9 45</gml:upperCorner>
320
+ </gml:Envelope>
321
+ </ogc:BBOX>
322
+ </ogc:Filter>
323
+ </wfs:Query>
324
+ </wfs:GetFeature>
325
+ """
326
+ tests .append (('nobbox_post' , template .format ("" )))
327
+
328
+ template = """<?xml version="1.0" encoding="UTF-8"?>
329
+ <wfs:GetFeature service="WFS" version="1.0.0" {} xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
330
+ <wfs:Query typeName="testlayer" xmlns="http://www.qgis.org/gml">
331
+ <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
332
+ <ogc:BBOX>
333
+ <ogc:PropertyName>geometry</ogc:PropertyName>
334
+ <gml:Envelope xmlns:gml="http://www.opengis.net/gml">
335
+ <gml:lowerCorner>8 44</gml:lowerCorner>
336
+ <gml:upperCorner>9 45</gml:upperCorner>
337
+ </gml:Envelope>
338
+ </ogc:BBOX>
339
+ </ogc:Filter>
340
+ </wfs:Query>
341
+ </wfs:GetFeature>
342
+ """
343
+ tests .append (('nobbox_post' , template .format ("" )))
344
+
310
345
for id , req in tests :
311
346
self .wfs_getfeature_post_compare (id , req )
312
347
0 commit comments