Skip to content

Commit 4d70a4e

Browse files
committed
[Server] Add unit test for WFS GetFeature with BBOX param without EPSG
1 parent efc7e87 commit 4d70a4e

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

tests/src/python/test_qgsserver_wfs.py

+7
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,13 @@ def test_getfeature_post(self):
374374
def test_getFeatureBBOX(self):
375375
"""Test with (1.1.0) and without (1.0.0) CRS"""
376376

377+
# Tests without CRS
378+
self.wfs_request_compare(
379+
"GetFeature", '1.0.0', "TYPENAME=testlayer&RESULTTYPE=hits&BBOX=8.20347,44.901471,8.2035354,44.901493", 'wfs_getFeature_1_0_0_bbox_1_feature')
380+
self.wfs_request_compare(
381+
"GetFeature", '1.0.0', "TYPENAME=testlayer&RESULTTYPE=hits&BBOX=8.203127,44.9012765,8.204138,44.901632", 'wfs_getFeature_1_0_0_bbox_3_feature')
382+
383+
# Tests with CRS
377384
self.wfs_request_compare(
378385
"GetFeature", '1.0.0', "SRSNAME=EPSG:4326&TYPENAME=testlayer&RESULTTYPE=hits&BBOX=8.20347,44.901471,8.2035354,44.901493,EPSG:4326", 'wfs_getFeature_1_0_0_epsgbbox_1_feature')
379386
self.wfs_request_compare(
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Content-Type: text/xml; subtype=gml/2.1.2; charset=utf-8
2+
3+
<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:ows="http://www.opengis.net/ows" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qgs="http://www.qgis.org/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd http://www.qgis.org/gml ?MAP=/home/ale/dev/QGIS/tests/testdata/qgis_server/test_project_wfs.qgs&amp;SRSNAME=EPSG:4326&amp;RESULTTYPE=hits&amp;SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=testlayer&amp;OUTPUTFORMAT=XMLSCHEMA"
4+
timeStamp="2019-01-23T12:09:05"
5+
numberOfFeatures="1">
6+
</wfs:FeatureCollection>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Content-Type: text/xml; subtype=gml/2.1.2; charset=utf-8
2+
3+
<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:ows="http://www.opengis.net/ows" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:qgs="http://www.qgis.org/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd http://www.qgis.org/gml ?MAP=/home/ale/dev/QGIS/tests/testdata/qgis_server/test_project_wfs.qgs&amp;SRSNAME=EPSG:4326&amp;RESULTTYPE=hits&amp;SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=testlayer&amp;OUTPUTFORMAT=XMLSCHEMA"
4+
timeStamp="2019-01-23T12:09:05"
5+
numberOfFeatures="3">
6+
</wfs:FeatureCollection>

0 commit comments

Comments
 (0)