/** * Creates a transform from the specified group of parameter values. * * @param parameters The group of parameter values. * @return The created math transform. * @throws ParameterNotFoundException if a required parameter was not found. */ protected MathTransform createMathTransform(final ParameterValueGroup parameters) throws ParameterNotFoundException { return new WinkelTripel(ProjectionMode.Winkel, PARAMETERS, parameters); } }
/** * Constructs a new map projection from the supplied parameters. * * @param parameters The parameter values in standard units. * @throws ParameterNotFoundException if a mandatory parameter is missing. */ protected WinkelTripel( ProjectionMode mode, final ParameterDescriptorGroup descriptors, final ParameterValueGroup parameters) throws ParameterNotFoundException { super(parameters, descriptors.descriptors()); this.descriptors = descriptors; invertible = false; // Compute constants if (mode == ProjectionMode.Winkel) { final Collection<GeneralParameterDescriptor> expected = getParameterDescriptors().descriptors(); final double phi1 = doubleValue(expected, WinkelProvider.STANDARD_PARALLEL_1, parameters); cosphi1 = cos(phi1); } else { cosphi1 = 0; } this.mode = mode; }
/** 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 WinkelTripel that = (WinkelTripel) object; return equals(this.cosphi1, that.cosphi1); } return false; }
/** * Creates a transform from the specified group of parameter values. * * @param parameters The group of parameter values. * @return The created math transform. * @throws ParameterNotFoundException if a required parameter was not found. */ protected MathTransform createMathTransform(final ParameterValueGroup parameters) throws ParameterNotFoundException { return new WinkelTripel(ProjectionMode.Aitoff, PARAMETERS, parameters); } }