/** Compares the specified object with this map projection for equality. */ @Override public boolean equals(final Object object) { if (object == this) { // Slight optimization return true; } if (super.equals(object)) { final LambertConformal that = (LambertConformal) object; return (this.belgium == that.belgium) && equals(this.n, that.n) && equals(this.F, that.F) && equals(this.rho0, that.rho0) && equals(this.phi1, that.phi1) && equals(this.phi2, that.phi2); } return false; } }
/** {@inheritDoc} */ @Override public ParameterValueGroup getParameterValues() { final ParameterValueGroup values = super.getParameterValues(); final Collection<GeneralParameterDescriptor> expected = getParameterDescriptors().descriptors(); set(expected, AbstractProvider.STANDARD_PARALLEL_1, values, phi1); set(expected, AbstractProvider.STANDARD_PARALLEL_2, values, phi2); return values; }
getParameterDescriptors().descriptors(); final boolean sp2 = expected.contains(AbstractProvider.STANDARD_PARALLEL_2); this.belgium = belgium; if (sp2) { double phi2; phi1 = doubleValue(expected, AbstractProvider.STANDARD_PARALLEL_1, parameters); ensureLatitudeInRange(AbstractProvider.STANDARD_PARALLEL_1, phi1, true); phi2 = doubleValue(expected, AbstractProvider.STANDARD_PARALLEL_2, parameters); if (Double.isNaN(phi2)) { phi2 = phi1; ensureLatitudeInRange(AbstractProvider.STANDARD_PARALLEL_2, phi2, true); } else { if (belgium) { final double m1 = msfn(sinphi1, cosphi1); final double t1 = tsfn(phi1, sinphi1); if (secant) { final double sinphi2 = sin(phi2); final double m2 = msfn(sinphi2, cos(phi2)); final double t2 = tsfn(phi2, sinphi2); n = log(m1 / m2) / log(t1 / t2); } else { rho0 = F * pow(tsfn(latitudeOfOrigin, sin(latitudeOfOrigin)), n); } else { rho0 = 0.0;
y = 2.0 * atan(pow(F / rho, 1.0 / n)) - PI / 2; } else { y = cphi2(pow(rho / F, 1.0 / n));
rho = F * pow(tan(PI / 4 + 0.5 * y), -n); } else { rho = F * pow(tsfn(y, sin(y)), n);