cesium-unreal icon indicating copy to clipboard operation
cesium-unreal copied to clipboard

Allow users to choose a custom ellipsoid

Open nithinp7 opened this issue 4 years ago • 4 comments

We should allow users to set a custom ellipsoid on the CesiumGeoreference instead of the default WGS84. I think the cesium-native calculations are agnostic of what ellipsoid is used, so this should be relatively easy.

If someone from the community wants to give this a shot, look for all hard-coded references to CesiumGeospatial::Ellipsoid::WGS84 in CesiumGeoreference.cpp. Each of these needs to be replaced with a reference to a custom CesiumGeospatial::Ellipsoid that should be configurable through a C++ setter. It should still default to using the WGS84 ellipsoid if no other ellipsoid is set. You can have a look at the cesium-native source code ("CesiumGeospatial/Ellipsoid") to determine how to create the custom ellipsoid.

nithinp7 avatar Apr 20 '21 14:04 nithinp7

A crross-reference: This is related to (and, depending on the scope, might eventually be part of) the possible Georeference refactoring

javagl avatar Apr 21 '21 12:04 javagl

Just stumbled over this, and to not overlook this:

look for all hard-coded references to CesiumGeospatial::Ellipsoid::WGS84 in CesiumGeoreference.cpp.

There are also some functions in cesium-native that receive an Ellipsoid as their last parameter, with a default value of WGS84. These functions are currently called from cesium-unreal, omitting the last parameter. This has to be reviewed, to make sure that the configured ellipsoid is passed to these functions as well, to avoid accidentally using WGS84 at some point.

javagl avatar May 31 '21 13:05 javagl

u guys hava any approach to change the ellipsoid size?

aixinxindeyi avatar Nov 24 '23 11:11 aixinxindeyi

@aixinxindeyi no, that is not currently supported, other than by changing the source code yourself.

kring avatar Dec 01 '23 02:12 kring