Martin Raie created an issue |
Issue Type: |
Bug |
---|---|
Assignee: |
Unassigned |
Created: |
27/Mar/23 6:04 PM |
Priority: |
Medium |
Reporter: |
If remote WFS service has features which define OtherSRS and if such layer CRS is configured as “Reproject native to declared” in Geoserver then Geoserver does reprojection twice when making getFeature request. To reproduce the issue, add following url as Web Feature Server (NG) store: https://teenus.maaamet.ee/ows/gpa?service=WFS and configure layer “ms_kohalik_vork”, setting native SRS: EPSG:3301, declared SRS: EPSG:3857, SRS handling: “Reproject native to declared”. When making query http://geoserver/geoserver/workspace/wfs?SERVICE=WFS&VERSION=1.3.0&REQUEST=GetFeature&typeName=workspace:ms_kohalik_vork&PROPERTYNAME=msGeometry&FEATUREID=kohalik_vork.33056 the result coordinates are following:
The original coordinates from the service https://teenus.maaamet.ee/ows/gpa?PROPERTYNAME=msGeometry&REQUEST=GetFeature&FEATUREID=kohalik_vork.33056&VERSION=2.0.0&TYPENAMES=ms%3Akohalik_vork&SERVICE=WFS in EPSG:3301 are
When converting 6562201.382000 714182.960000 in EPSG:3301 to EPSG:3857 the expected result should have been
The result 8737543.97761727 578481.77163451 can be achieved when doing EPSG:3301->EPSG:3857 conversion twice. When using some similar WFS service which doesn’t define OtherSRS then results are correct. I believe the problem is using both ReprojectFeatureResults and ReprojectFeatureReader classes. If OtherSRS is not set, following row in code sets coordinateSystem null and everything works correctly: If OtherSRS is set and coordinateSystem is not null then code reaches here: and second reprojection is done with |
Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS |
|
This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100219-sha1:ac3e918) |