I have some arbitrary flight data in ECEF. For example it might be “Santa flies away from the north pole, he starts at (0,0,1) then (0,0.00000001,1) then (0,0.00000002,1) …” or it might be "Santa lands near Ghana, … (0,1, 0.00000002) then (0,1, 0.00000001) then (0,1,0).
I want to have a zoomed in flat area where Santa flies that path. I can look up by hand that ESRI:102035 is good for the north pole and EPSG:4168 is good for Ghana, but is there a function that takes an arbitrary ECEF coordinate and finds a good projectedCRS?
also is “geoReferencingSystem->ProjectedCRS = “EPSG:4168”;” the right way to change the georeference at runtime, or should I destroy it and create a new one?
Generally you don’t. The landscape system doesn’t allow changes at runtime.
So setting an esri value becomes utterly pointless.
For the purpose of creating a system that would act similar in theory to google earth, you’d just go with a regular spheric approximation - or which is more correct, you use Lambert’s equation (or another one, depends on how accurate you want things) to serve up near accurate distances while completely ignoring any distortion or graphic.
In any way shape or form, if you take any DTM create it with the correct distortion, and measure the distance on the map between 2 corners, the distance will always be off.
With the largest map possible as a single tile being 8km^2, the margin of error on that distance is nearly a kilometer.
Usually, this is because you are measuring a straight distance that cuts across the globe.
Using the correct approximated formula, you return measures that are about 100m off at most.
Unfortunately everything is always off visually since maps and even Lidar in 1:1 carry a huge amount of distortion.
The esri idea is to reduce that distortion quite a bit by assigning specific curvature to specific tiles that matches more closely to the shape of the earth. However its all still a wild approximation - particularly when calculating distances for scientific purposes… the engine doesn’t help any being primarily a flat earther designed tool…
Different tiles at different esri values will lead to the distortion being so much that mountains and places do not line up between tiles.