use of org.apache.sis.internal.referencing.provider.Equirectangular in project sis by apache.
the class EquirectangularTest method testRandomPoints.
/**
* 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(), // Semi-major axis length
WGS84_A, // Semi-minor axis length
WGS84_B, // Central meridian
0.5, // Latitude of origin (none)
0, // Standard parallel 1
20, // Standard parallel 2
NaN, // Scale factor (none)
NaN, // False easting
200, // False northing
100);
// Not NORMALIZED_TOLERANCE since this is not a NormalizedProjection.
tolerance = Formulas.LINEAR_TOLERANCE;
derivativeDeltas = new double[] { 100, 100 };
verifyInDomain(CoordinateDomain.GEOGRAPHIC, 0);
}
use of org.apache.sis.internal.referencing.provider.Equirectangular in project sis by apache.
the class EquirectangularTest method createCompleteProjection.
/**
* 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);
// Not NORMALIZED_TOLERANCE since this is not a NormalizedProjection.
tolerance = Formulas.LINEAR_TOLERANCE;
validate();
}
Aggregations