use of org.apache.sis.internal.referencing.provider.PolarStereographicNorth in project sis by apache.
the class PolarStereographicTest method testSphericalCaseNorth.
/**
* Verifies the consistency between spherical and elliptical formulas in the North pole.
* This is the same formulas than the South case, but with the sign of some coefficients negated.
*
* @throws FactoryException if an error occurred while creating the map projection.
* @throws TransformException if an error occurred while projecting a coordinate.
*/
@Test
@DependsOnMethod("testSphericalCaseSouth")
public void testSphericalCaseNorth() throws FactoryException, TransformException {
createNormalizedProjection(new PolarStereographicNorth());
// Approximatively 100 metres.
final double delta = toRadians(100.0 / 60) / 1852;
derivativeDeltas = new double[] { delta, delta };
verifyInDomain(CoordinateDomain.GEOGRAPHIC_RADIANS_NORTH, 56763886);
}
use of org.apache.sis.internal.referencing.provider.PolarStereographicNorth in project sis by apache.
the class PolarStereographicTest method testPolarStereographicNorth.
/**
* Tests <cite>"Stereographic North Pole"</cite>. The tested point is adapted from
* <a href="http://www.remotesensing.org/geotiff/proj_list/polar_stereographic.html">Polar Stereographic
* on remotesensing.org</a>.
*
* @throws FactoryException if an error occurred while creating the map projection.
* @throws TransformException if an error occurred while projecting a coordinate.
*/
@Test
public void testPolarStereographicNorth() throws FactoryException, TransformException {
final PolarStereographicNorth method = new PolarStereographicNorth();
final Parameters pg = parameters(method, true);
pg.parameter("standard_parallel_1").setValue(71.0);
pg.parameter("central_meridian").setValue(-96.0);
transform = new MathTransformFactoryMock(method).createParameterizedTransform(pg);
tolerance = 0.02;
verifyTransform(new double[] { // 121°20'22.380"W
-121 - (20 + 22.380 / 60) / 60, // 39°06'04.508"N
39 + (6 + 4.508 / 60) / 60 }, new double[] { -2529570, -5341800 });
}
Aggregations