params.parameter("false_northing") .setValue( 150000.0);
transform = mtFactory.createParameterizedTransform(params);
if (VERBOSE) {
System.out.println(transform);
}
doTransform(new DirectPosition2D(-76.943683333, 17.932166666),
new DirectPosition2D(255966.58, 142493.51), transform);
//Spherical (me)
params.parameter("semi_major") .setValue(6370997.0);
params.parameter("semi_minor") .setValue(6370997.0);
params.parameter("central_meridian") .setValue( 111.0);
params.parameter("latitude_of_origin").setValue( -55.0);
params.parameter("scale_factor") .setValue( 1.0);
params.parameter("false_easting") .setValue( 500000.0);
params.parameter("false_northing") .setValue(1000000.0);
transform = mtFactory.createParameterizedTransform(params);
if (VERBOSE) {
System.out.println(transform.toString());
}
doTransform(new DirectPosition2D(151.283333333, -33.916666666),
new DirectPosition2D(4232963.1816, 2287639.9866), transform);
///////////////////////////////////////
// Lambert_Conformal_Conic_2SP tests //
///////////////////////////////////////
if (VERBOSE) {
printParameters("Lambert_Conformal_Conic_2SP");
}
//EPSG p. 17
params = mtFactory.getDefaultParameters("Lambert_Conformal_Conic_2SP");
params.parameter("semi_major") .setValue(6378206.4);
params.parameter("semi_minor") .setValue(6356583.8);
params.parameter("central_meridian") .setValue( -99.0);
params.parameter("latitude_of_origin") .setValue( 27.833333333);
params.parameter("standard_parallel_1").setValue( 28.383333333);
params.parameter("standard_parallel_2").setValue( 30.283333333);
params.parameter("false_easting") .setValue( 609601.218); //metres
params.parameter("false_northing") .setValue( 0.0);
transform = mtFactory.createParameterizedTransform(params);
if (VERBOSE) {
System.out.println(transform);
}
doTransform(new DirectPosition2D(-96.0, 28.5),
new DirectPosition2D(903277.7965, 77650.94219), transform);
//Spherical (me)
params.parameter("semi_major") .setValue(6370997.0);
params.parameter("semi_minor") .setValue(6370997.0);
params.parameter("central_meridian") .setValue( -120.0);
params.parameter("latitude_of_origin") .setValue( 0.0);
params.parameter("standard_parallel_1").setValue( 2.0);
params.parameter("standard_parallel_2").setValue( 60.0);
params.parameter("false_easting") .setValue( 0.0);
params.parameter("false_northing") .setValue( 0.0);
transform = mtFactory.createParameterizedTransform(params);
if (VERBOSE) {
System.out.println(transform);
}
doTransform(new DirectPosition2D(139.733333333, 35.6833333333),
new DirectPosition2D(-6789805.6471, 7107623.6859), transform);
//1SP where SP != lat of origin (me)
params.parameter("semi_major") .setValue(6378137.0);
params.parameter("semi_minor") .setValue(6356752.31424518);
params.parameter("central_meridian") .setValue( 0.0);
params.parameter("latitude_of_origin") .setValue( -50.0);
params.parameter("standard_parallel_1").setValue( -40.0);
params.parameter("standard_parallel_2").setValue( -40.0);
params.parameter("false_easting") .setValue( 100000.0);
params.parameter("false_northing") .setValue( 0.0);
transform = mtFactory.createParameterizedTransform(params);
if (VERBOSE) {
System.out.println(transform);
}
doTransform(new DirectPosition2D(18.45, -33.9166666666),
new DirectPosition2D(1803288.3324, 1616657.7846), transform);
///////////////////////////////////////////////
// Lambert_Conformal_Conic_2SP_Belgium test //
///////////////////////////////////////////////
if (VERBOSE) {
printParameters("Lambert_Conformal_Conic_2SP_Belgium");
}
//epsg p. 19
params = mtFactory.getDefaultParameters("Lambert_Conformal_Conic_2SP_Belgium");
params.parameter("semi_major") .setValue(6378388.0);
params.parameter("semi_minor") .setValue(6356911.946);
params.parameter("central_meridian") .setValue( 4.356939722);
params.parameter("latitude_of_origin") .setValue( 90.0);
params.parameter("standard_parallel_1").setValue( 49.833333333);
params.parameter("standard_parallel_2").setValue( 51.166666666);
params.parameter("false_easting") .setValue( 150000.01);
params.parameter("false_northing") .setValue(5400088.44);
transform = mtFactory.createParameterizedTransform(params);
if (VERBOSE) {
System.out.println(transform);
}
doTransform(new DirectPosition2D(5.807370277, 50.6795725),
new DirectPosition2D(251763.20, 153034.13), transform);
}