double a = getAndStore(p, context, MapProjection.SEMI_MAJOR); double b = getAndStore(p, context, MapProjection.SEMI_MINOR); double λ0 = getAndStore(p, context, LONGITUDE_OF_ORIGIN); double φ0 = getAndStore(p, context, LATITUDE_OF_ORIGIN); double φ1 = getAndStore(p, context, STANDARD_PARALLEL); double fe = getAndStore(p, context, FALSE_EASTING); double fn = getAndStore(p, context, FALSE_NORTHING);
/** * Initializes a simple Equirectangular projection on sphere. This method is different than the * {@code createNormalizedProjection(boolean)} method in all other test classes, because it does * not create an instance of {@link NormalizedProjection}. Instead, it creates an affine transform * for the whole projection (not only the normalized part). */ private void createCompleteProjection() throws FactoryException { final Equirectangular provider = new Equirectangular(); final Parameters parameters = parameters(provider, false); transform = new MathTransformFactoryMock(provider).createParameterizedTransform(parameters); tolerance = Formulas.LINEAR_TOLERANCE; // Not NORMALIZED_TOLERANCE since this is not a NormalizedProjection. validate(); }
/** * Tests conversion of random points. This test is actually of limited interest since the Equirectangular * projection is implemented by an affine transform, which has been tested elsewhere. * * @throws FactoryException if an error occurred while creating the map projection. * @throws TransformException if an error occurred while projecting a point. */ @Test public void testRandomPoints() throws FactoryException, TransformException { createCompleteProjection(new Equirectangular(), WGS84_A, // Semi-major axis length WGS84_B, // Semi-minor axis length 0.5, // Central meridian 0, // Latitude of origin (none) 20, // Standard parallel 1 NaN, // Standard parallel 2 NaN, // Scale factor (none) 200, // False easting 100); // False northing tolerance = Formulas.LINEAR_TOLERANCE; // Not NORMALIZED_TOLERANCE since this is not a NormalizedProjection. derivativeDeltas = new double[] {100, 100}; verifyInDomain(CoordinateDomain.GEOGRAPHIC, 0); } }
double a = getAndStore(p, context, MapProjection.SEMI_MAJOR); double b = getAndStore(p, context, MapProjection.SEMI_MINOR); double λ0 = getAndStore(p, context, LONGITUDE_OF_ORIGIN); double φ0 = getAndStore(p, context, LATITUDE_OF_ORIGIN); double φ1 = getAndStore(p, context, STANDARD_PARALLEL); double fe = getAndStore(p, context, FALSE_EASTING); double fn = getAndStore(p, context, FALSE_NORTHING);