108 using namespace MSP::CCS;
116 const double PI = 3.14159265358979323e0;
131 Neys::Neys(
double ellipsoidSemiMajorAxis,
double ellipsoidFlattening,
double centralMeridian,
double originLatitude,
double standardParallel,
double falseEasting,
double falseNorthing ) :
133 lambertConformalConic2( 0 ),
135 Neys_Std_Parallel_2(
MAX_LAT ),
136 Neys_Origin_Long( 0.0 ),
138 Neys_False_Easting( 0.0 ),
139 Neys_False_Northing( 0.0 ),
140 Neys_Delta_Easting( 400000000.0 ),
141 Neys_Delta_Northing( 400000000.0 )
158 double epsilon = 1.0e-10;
159 double inv_f = 1 / ellipsoidFlattening;
161 if (ellipsoidSemiMajorAxis <= 0.0)
165 if ((inv_f < 250) || (inv_f > 350))
178 if ((centralMeridian < -
PI) || (centralMeridian >
TWO_PI))
186 Neys_Origin_Lat = originLatitude;
187 if (Neys_Origin_Lat >= 0)
189 Neys_Std_Parallel_1 = standardParallel;
194 Neys_Std_Parallel_1 = -standardParallel;
195 Neys_Std_Parallel_2 = -
MAX_LAT;
198 if (centralMeridian >
PI)
199 centralMeridian -=
TWO_PI;
200 Neys_Origin_Long = centralMeridian;
201 Neys_False_Easting = falseEasting;
202 Neys_False_Northing = falseNorthing;
205 Neys_Std_Parallel_1, Neys_Std_Parallel_2,
206 Neys_False_Easting, Neys_False_Northing );
215 Neys_Std_Parallel_1 = n.Neys_Std_Parallel_1;
216 Neys_Std_Parallel_2 = n.Neys_Std_Parallel_2;
217 Neys_Origin_Long = n.Neys_Origin_Long;
218 Neys_Origin_Lat = n.Neys_Origin_Lat;
219 Neys_False_Easting = n.Neys_False_Easting;
220 Neys_False_Northing = n.Neys_False_Northing;
221 Neys_Delta_Easting = n.Neys_Delta_Easting;
222 Neys_Delta_Northing = n.Neys_Delta_Northing;
228 delete lambertConformalConic2;
229 lambertConformalConic2 = 0;
237 lambertConformalConic2->operator=( *n.lambertConformalConic2 );
240 Neys_Std_Parallel_1 = n.Neys_Std_Parallel_1;
241 Neys_Std_Parallel_2 = n.Neys_Std_Parallel_2;
242 Neys_Origin_Long = n.Neys_Origin_Long;
243 Neys_Origin_Lat = n.Neys_Origin_Lat;
244 Neys_False_Easting = n.Neys_False_Easting;
245 Neys_False_Northing = n.Neys_False_Northing;
246 Neys_Delta_Easting = n.Neys_Delta_Easting;
247 Neys_Delta_Northing = n.Neys_Delta_Northing;
288 double longitude = geodeticCoordinates->
longitude();
289 double latitude = geodeticCoordinates->
latitude();
295 if ((longitude < -
PI) || (longitude >
TWO_PI))
302 double easting = mapProjectionCoordinates->
easting();
303 double northing = mapProjectionCoordinates->
northing();
304 delete mapProjectionCoordinates;
326 double easting = mapProjectionCoordinates->
easting();
327 double northing = mapProjectionCoordinates->
northing();
329 if ((easting < (Neys_False_Easting - Neys_Delta_Easting))
330 ||(easting > (Neys_False_Easting + Neys_Delta_Easting)))
334 if ((northing < (Neys_False_Northing - Neys_Delta_Northing))
335 || (northing > (Neys_False_Northing + Neys_Delta_Northing)))
342 double longitude = geodeticCoordinates->
longitude();
343 double latitude = geodeticCoordinates->
latitude();
344 delete geodeticCoordinates;