-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Labels
Description
Is your feature request related to a problem? Please describe.
I want to convert an ECEF to a Lat, Long Coordinate with Eager Loading Off without overriding the Global Settings.
Describe the solution you'd like
I'm currently using this code to do the conversion, however the static ECEFToLatLong
method uses the GlobalSettings.Default_EagerLoad
when constructing the Coordinate.
Coordinate c = ECEF.ECEFToLatLong(1333.97, -4653.936, 4138.431);
I'd like a way to pass in the EagerLoad settings I want to use in the ECEFToLatLong
method.
Coordinate c = ECEF.ECEFToLatLong(1333.97, -4653.936, 4138.431, new EagerLoad(false));
Describe alternatives you've considered
Something like this would allow the user to optionally specify the EagerLoad settings to use when converting ECEF to Lat Long
public static Coordinate ECEFToLatLong(double x, double y, double z, EagerLoad? eagerLoad = null)
{
ECEF ecef = new ECEF(x, y, z);
double[] latLong = ecef.ECEF_To_LatLong(x, y, z);
ecef.geodetic_height = new Distance(latLong[2]);
return new Coordinate(latLong[0], latLong[1], eagerLoad ?? GlobalSettings.Default_EagerLoad)
{
ECEF = ecef
};
}