I followed this article https://learn.microsoft.com/en-us/ef/core/modeling/spatial but is not working.
var seattle = new Point(-122.333056, 47.609722) { SRID = 4326 };
var redmond = new Point(-122.123889, 47.669444) { SRID = 4326 };
var distance = seattle.ProjectTo(2855).Distance(redmond.ProjectTo(2855));
This code is returning distance = 17062 meters
From websites Distance Calculator I'm getting distance = 17.02 kilometers
The distance is approximately the same for the example in the article.
But if I choose this coordinates:
var seattle = new Point(1.230469, 19.973349) { SRID = 4326 };
var redmond = new Point(17.753906, 19.642588) { SRID = 4326 };
var distance = seattle.ProjectTo(2855).Distance(redmond.ProjectTo(2855));
This code is returning distance = 1926891 meters
From websites, distance = 1,728 kilometers
The difference is 200 meters approx. I tested with other locations and the results are worse
In the article there is a comment: // Different data requires a different coordinate system.
What does it mean? Should I use another coordinate system than 2855? Which one?