On 29-01-2021 15:03, Christian Mayer wrote:
Hi list,

I have the following setup: A geometry table in a PostGIS DB with points
having the projection EPSG:31468 [1]. I am publishing the points as WFS
FeatureType and query them in EPSG:3857 [2] by setting srsName=EPSG:3857
in the WFS GetFeature request. The returned WFS points have a coordinate
shift (1-2 meters) compared to the points transformed directly in
PostGIS or with GDAL.

Here is an example:

Native point in EPSG:31468 --> 4355155.403, 5512583.018

Transformed point with GDAL or ST_Transform of PostGIS    -->
1112006.22028666, 6400063.79411048

Transformed point as output of the GeoServer WFS request -->
1112005.8998, 6400065.9514

Has anyone an idea what is going wrong here?

There appear to be several well known transformation methods available listed at http://epsg.io/31468, GeoServer may be using a less accurate version than other products by default.

Do the SRS definitions in
GeoServer differ from those in PostGIS or GDAL?

debug logging may show which transformation method is used, it's not my expertise but it looks like NTv2 should be used to get results within 1m accuracy, so you may need to add a Grid Shift file to get better results

see also: https://docs.geoserver.org/stable/en/user/configuration/crshandling/coordtransforms.html

-M


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to