/** * 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. */ @Override protected MathTransform createMathTransform(final ParameterValueGroup parameters) throws ParameterNotFoundException { final Collection<GeneralParameterDescriptor> descriptors = PARAMETERS.descriptors(); return new HotineObliqueMercator(parameters, descriptors, 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. */ @Override protected MathTransform createMathTransform(final ParameterValueGroup parameters) throws ParameterNotFoundException { final Collection<GeneralParameterDescriptor> descriptors = PARAMETERS.descriptors(); return new HotineObliqueMercator(parameters, descriptors, true); } }
/** Some tests for the Oblique Mercator Projection. */ @Test public void testObliqueMercator() throws FactoryException, TransformException { if (VERBOSE) { printParameters("Oblique Mercator"); } MathTransform transform; ParameterValueGroup params; params = mtFactory.getDefaultParameters("Oblique Mercator"); setObliqueMercatorParameter(params); transform = mtFactory.createParameterizedTransform(params); assertEquals(transform.getClass(), ObliqueMercator.class); assertEquals(transform, new ObliqueMercator(params)); ParameterDescriptorGroup descriptor = ((MapProjection) transform).getParameterDescriptors(); assertTrue(AbstractIdentifiedObject.nameMatches(descriptor, "Oblique Mercator")); assertFalse(AbstractIdentifiedObject.nameMatches(descriptor, "Hotine Oblique Mercator")); final MathTransform standard = transform; params = mtFactory.getDefaultParameters("Hotine Oblique Mercator"); setObliqueMercatorParameter(params); transform = mtFactory.createParameterizedTransform(params); assertEquals(transform.getClass(), HotineObliqueMercator.class); assertEquals(transform, new HotineObliqueMercator(params)); descriptor = ((MapProjection) transform).getParameterDescriptors(); assertFalse(AbstractIdentifiedObject.nameMatches(descriptor, "Oblique Mercator")); assertTrue(AbstractIdentifiedObject.nameMatches(descriptor, "Hotine Oblique Mercator")); assertFalse(transform.equals(standard)); }