/** * Constructs a gnomonic projection using a spheroid algorithm. * * @param parameters The parameter values in standard units. * @throws ParameterNotFoundException if a mandatory parameter is missing. */ protected Gnomonic(final ParameterValueGroup parameters) throws ParameterNotFoundException { super(parameters); final Collection<GeneralParameterDescriptor> expected = getParameterDescriptors().descriptors(); latitudeOfCentre = doubleValue(expected, Provider.LATITUDE_OF_CENTRE, parameters); centralMeridian = doubleValue(expected, Provider.LONGITUDE_OF_CENTRE, parameters); ensureLatitudeInRange(Provider.LATITUDE_OF_CENTRE, latitudeOfCentre, true); ensureLongitudeInRange(Provider.LONGITUDE_OF_CENTRE, centralMeridian, true); sinPhi0 = sin(latitudeOfCentre); cosPhi0 = cos(latitudeOfCentre); primeVert0 = 1 / sqrt(1.0 - excentricitySquared * sinPhi0 * sinPhi0); projectedCylindricalZ0 = primeVert0 * sinPhi0; }