00052 {
00053
00054
00055
00056
00057
00058 double a = 1;
00059 double b = 1;
00060 double origMer = -90.0*RAD_PER_DEG;
00061 double falseEast = 0.0;
00062 double falseNorth = 0.0;
00063
00064
00065
00066 Eckert6Projection aProjection(a, b, origMer, falseEast, falseNorth);
00067
00068
00069 dpt aPt = aProjection.toEastingNorthing(gpt(-50*RAD_PER_DEG,
00070 -75*RAD_PER_DEG, 0));
00071
00072 cout << "If the projection worked: given a S. lat = 50% and"<<endl;
00073 cout << "a W. lon of = 75% the output should be: "<<endl;
00074 cout << "Easting: 0.1693623 meters and Northing: -0.9570223 meters "
00075 << endl << endl;
00076 cout << "Output:\n" << setiosflags(ios::fixed) << setprecision(15)
00077 << "Easting: " << aPt.x << " Northing: " << aPt.y<< endl;
00078
00079
00080 gpt aGpt = aProjection.toLatLon(aPt);
00081
00082 cout << "We should get the original degrees back out:" <<endl;
00083 cout << "lat: " << (aGpt.x*DEG_PER_RAD) << " lon:" << (aGpt.y*DEG_PER_RAD)
00084 << endl;
00085 }