-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add srsname to wfs200.py getfeature GET request #945
Add srsname to wfs200.py getfeature GET request #945
Conversation
@lpartington - would you be able to add a test for this? Some basic tests of |
No problem. I will look at it tomorrow.
…On Mon, 7 Oct 2024 at 15:48, Seth G ***@***.***> wrote:
@lpartington <https://github.com/lpartington> - would you be able to add
a test for this? Some basic tests of getGETGetFeatureRequest with srsName
should be fine.
—
Reply to this email directly, view it on GitHub
<#945 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZUOOIBV3W2I26GZAXXIC3Z2I4D3AVCNFSM6AAAAABPCSW4Z6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJWGE3TANZTHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I added test case test_srsname_wfs_200 in test_wfs_generic.py, using the same approach as the wfs_100 and wfs_110 cases. However, I noted these issues:
The WMS services are also not working (but returning a slightly different ExceptionReport).
All of the 'online' cases in test_wfs_generic.py were marked with xfail. I've removed xfail from all cases that are now passing.
For the wfs_110 case, the service returns 200 OK with an ows:ExceptionReport body. It looks like the intention of openURL is to catch such errors and raise a ServiceException in the possible_errors code, but this doesn't occur because the Content-Type of the response is "application/xml;charset=utf-8" rather than "application/xml". I wonder if substrings starting with ';' should be removed from the content type prior to the comparison? Note that the wfs_100 and wfs_200 cases DO raise ServiceException for this EPSG. This is because the service returns 400 Bad Request (it doesn't seem right that the service returns different status codes for the different WFS versions, but it does!) and openUrl raising ServiceException as a result.
|
Thanks @lpartington for adding those tests, and taking the time to get the WFS tests working again. +1 from me on merging this in the next week, unless there are any other comments from others. |
…ST request (same behaviour as wfs110.py implementation)
993f0ad
to
d14d447
Compare
CI all passing. Thanks @lpartington ! |
WebFeatureService_2_0_0.getfeature() is missing an srsName argument. This issue has been reported previously in #910, #905, and #682. This prevents features being retrieved with a non-default crs when using WFS 2.0.0. srsName is supported by WebFeatureService_1_1_0.getfeature() and WebFeatureService_1_0_0.getfeature(). This seems to be an oversight as srsname is a valid KVP ('key value pair') parameter - see OGC WFS 2.0.2 specification https://portal.ogc.org/files/?artifact_id=39967 Sections 7.9.2.3 and 7.9.2.4.4.
Changes in this PR:
Note that srsname hasn't been added for POST requests. This is actually consistent with the implementation of getfeature() in wfs110.py, where srsname can be specified for GET requests but not POST requests. It seems this is likely to be unintentional, but fixing up POST requests across all WFS versions is better done in a separate PR.
A suggestion for future improvement would be to support kwargs in getfeature(), so that arbitrary query parameters can be supported without having to explicitly declare them in the function argument list. These parameters would merely be added verbatim to the request's query params. However, this is beyond the scope of the current issue.