Skip to content

Commit c3a41bc

Browse files
committedOct 15, 2018
Add unit test for polygon tolerance
1 parent edeefc9 commit c3a41bc

File tree

5 files changed

+44
-0
lines changed

5 files changed

+44
-0
lines changed
 

‎tests/src/python/test_qgsserver_wms_getfeatureinfo.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,34 @@ def testGetFeatureInfoTolerance(self):
379379
'wms_getfeatureinfo_line_tolerance_20_text_xml',
380380
'test_project_values.qgz')
381381

382+
self.wms_request_compare('GetFeatureInfo',
383+
'&layers=p2d&styles=&' +
384+
'VERSION=1.3.0&' +
385+
'info_format=text%2Fxml&' +
386+
'width=400&height=200' +
387+
'&bbox=-135832.0,-66482.4,240321.9,167300.4' +
388+
'&CRS=EPSG:3857' +
389+
'&FEATURE_COUNT=10' +
390+
'&WITH_GEOMETRY=False' +
391+
'&QUERY_LAYERS=p2d&I=206&J=144' +
392+
'&FI_POLYGON_TOLERANCE=0',
393+
'wms_getfeatureinfo_polygon_tolerance_0_text_xml',
394+
'test_project_values.qgz')
395+
396+
self.wms_request_compare('GetFeatureInfo',
397+
'&layers=p2d&styles=&' +
398+
'VERSION=1.3.0&' +
399+
'info_format=text%2Fxml&' +
400+
'width=400&height=200' +
401+
'&bbox=-135832.0,-66482.4,240321.9,167300.4' +
402+
'&CRS=EPSG:3857' +
403+
'&FEATURE_COUNT=10' +
404+
'&WITH_GEOMETRY=False' +
405+
'&QUERY_LAYERS=p2d&I=206&J=144' +
406+
'&FI_POLYGON_TOLERANCE=20',
407+
'wms_getfeatureinfo_polygon_tolerance_20_text_xml',
408+
'test_project_values.qgz')
409+
382410

383411
if __name__ == '__main__':
384412
unittest.main()

‎tests/testdata/qgis_server/db.gpkg

0 Bytes
Binary file not shown.
282 Bytes
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*****
2+
Content-Type: text/xml; charset=utf-8
3+
4+
<GetFeatureInfoResponse>
5+
<Layer name="p2d">
6+
</GetFeatureInfoResponse>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*****
2+
Content-Type: text/xml; charset=utf-8
3+
4+
<GetFeatureInfoResponse>
5+
<Layer name="p2d">
6+
<Feature id="1">
7+
<Attribute value="1" name="id"/>
8+
</Feature>
9+
</Layer>
10+
</GetFeatureInfoResponse>

0 commit comments

Comments
 (0)
Please sign in to comment.