SQL Server / EF Core / NetTopologySuite / ProjNet different Distance results #776
-
|
Not sure if I need to ask on https://github.com/dotnet/efcore or here. Database with table Record and Location column. Location is of type geography (srid 4326): Gives me for distance (server-evaluated):
when transforming these locations (client-side) to EPSG:3812 and recalculating distance again I get:
As you see, my original query has indeed a correct order by, but when doing a measurement in EPSG:3812 I get different order. I guess that the original query measures differently (degrees? srid more inaccurate for region?) and thus might give me incorrect results (?). When I add my points to the database I add them use srid 4326.
Thanks for helping me understand |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
If you want the ordering done on the server side you will have to add a geometry column with transformed locations. Otherwise you'll have to do reprojection and ordering on the client side. |
Beta Was this translation helpful? Give feedback.
It won't suffice to claim that the geometry is in spatial reference system defined by SRID 3812. You will actually have to transform the wgs84 points (like you did in the initial post) and insert these.