mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Add unit test for WFS Post GetFeature Within for EPSG 4326.
This commit is contained in:
parent
1a2e30e913
commit
d92564a5d0
@ -257,6 +257,34 @@ class TestQgsServerWFS(QgsServerTestBase):
|
||||
"""
|
||||
tests.append(('srsname_post', srsTemplate.format("")))
|
||||
|
||||
# Issue https://github.com/qgis/QGIS/issues/36398
|
||||
# Check get feature within linear ring with srsName=EPSG:4326
|
||||
withinFilterTemplate = """<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<wfs:Query typeName="testlayer" srsName="EPSG:4326" xmlns:feature="http://www.qgis.org/gml">
|
||||
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
|
||||
<Within>
|
||||
<PropertyName>geometry</PropertyName>
|
||||
<Polygon xmlns="http://www.opengis.net/gml" srsName="EPSG:4326">
|
||||
<exterior>
|
||||
<LinearRing srsName="EPSG:4326">
|
||||
<posList srsDimension="2">
|
||||
8 44
|
||||
9 44
|
||||
9 45
|
||||
8 45
|
||||
8 44
|
||||
</posList>
|
||||
</LinearRing>
|
||||
</exterior>
|
||||
</Polygon>
|
||||
</Within>
|
||||
</ogc:Filter>
|
||||
</wfs:Query>
|
||||
</wfs:GetFeature>
|
||||
"""
|
||||
tests.append(('withinFilterTemplate_post', withinFilterTemplate.format("")))
|
||||
|
||||
srsTwoLayersTemplate = """<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<wfs:Query typeName="testlayer" srsName="EPSG:3857" xmlns:feature="http://www.qgis.org/gml">
|
||||
|
60
tests/testdata/qgis_server/wfs_getfeature_withinFilterTemplate_post.txt
vendored
Normal file
60
tests/testdata/qgis_server/wfs_getfeature_withinFilterTemplate_post.txt
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
Content-Type: text/xml; subtype=gml/2.1.2; charset=utf-8
|
||||
|
||||
<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&SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=testlayer&OUTPUTFORMAT=XMLSCHEMA">
|
||||
<gml:boundedBy>
|
||||
<gml:Box srsName="EPSG:4326">
|
||||
<gml:coordinates cs="," ts=" ">8.20345931,44.90139484 8.20354699,44.90148253</gml:coordinates>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
<gml:featureMember>
|
||||
<qgs:testlayer fid="testlayer.0">
|
||||
<gml:boundedBy>
|
||||
<gml:Box srsName="EPSG:4326">
|
||||
<gml:coordinates cs="," ts=" ">8.20349634,44.90148253 8.20349634,44.90148253</gml:coordinates>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
<qgs:geometry>
|
||||
<Point xmlns="http://www.opengis.net/gml" srsName="EPSG:4326">
|
||||
<coordinates xmlns="http://www.opengis.net/gml" cs="," ts=" ">8.20349634,44.90148253</coordinates>
|
||||
</Point>
|
||||
</qgs:geometry>
|
||||
<qgs:id>1</qgs:id>
|
||||
<qgs:name>one</qgs:name>
|
||||
<qgs:utf8nameè>one èé</qgs:utf8nameè>
|
||||
</qgs:testlayer>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<qgs:testlayer fid="testlayer.1">
|
||||
<gml:boundedBy>
|
||||
<gml:Box srsName="EPSG:4326">
|
||||
<gml:coordinates cs="," ts=" ">8.20354699,44.90143568 8.20354699,44.90143568</gml:coordinates>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
<qgs:geometry>
|
||||
<Point xmlns="http://www.opengis.net/gml" srsName="EPSG:4326">
|
||||
<coordinates xmlns="http://www.opengis.net/gml" cs="," ts=" ">8.20354699,44.90143568</coordinates>
|
||||
</Point>
|
||||
</qgs:geometry>
|
||||
<qgs:id>2</qgs:id>
|
||||
<qgs:name>two</qgs:name>
|
||||
<qgs:utf8nameè>two àò</qgs:utf8nameè>
|
||||
</qgs:testlayer>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<qgs:testlayer fid="testlayer.2">
|
||||
<gml:boundedBy>
|
||||
<gml:Box srsName="EPSG:4326">
|
||||
<gml:coordinates cs="," ts=" ">8.20345931,44.90139484 8.20345931,44.90139484</gml:coordinates>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
<qgs:geometry>
|
||||
<Point xmlns="http://www.opengis.net/gml" srsName="EPSG:4326">
|
||||
<coordinates xmlns="http://www.opengis.net/gml" cs="," ts=" ">8.20345931,44.90139484</coordinates>
|
||||
</Point>
|
||||
</qgs:geometry>
|
||||
<qgs:id>3</qgs:id>
|
||||
<qgs:name>three</qgs:name>
|
||||
<qgs:utf8nameè>three èé↓</qgs:utf8nameè>
|
||||
</qgs:testlayer>
|
||||
</gml:featureMember>
|
||||
</wfs:FeatureCollection>
|
Loading…
x
Reference in New Issue
Block a user