OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimEquDistCylProjection.cpp
Go to the documentation of this file.
1 //*******************************************************************
2 // Copyright (C) 2000 ImageLinks Inc.
3 //
4 // License: See top LICENSE.txt file.
5 //
6 // Author: Garrett Potts
7 //
8 // Description:
9 //
10 // Calls Geotrans Equidistant Cylinder projection code.
11 //*******************************************************************
12 // $Id: ossimEquDistCylProjection.cpp 23373 2015-06-13 17:16:38Z okramer $
13 
15 #include <ossim/base/ossimIpt.h>
18 #include <ossim/base/ossimCommon.h>
19 #include <ossim/base/ossimTrace.h>
20 #include <ossim/base/ossimDatum.h>
23 
24 static ossimTrace traceDebug("ossimEquDistCylProjection:debug");
25 
27  "ossimEquDistCylProjection",
29  // ossimLlxyProjection)
30 
31 /***************************************************************************/
32 /*
33  * DEFINES
34  */
35 
36 #ifndef PI_OVER_2
37 # define PI_OVER_2 ( M_PI / 2.0)
38 #endif
39 #ifndef TWO_PI
40 # define TWO_PI (2.0 * M_PI)
41 #endif
42 #define ONE (1.0 * M_PI / 180.0) /* 1 degree in radians*/
43 
44 #define EQCY_NO_ERROR 0x0000
45 #define EQCY_LAT_ERROR 0x0001
46 #define EQCY_LON_ERROR 0x0002
47 #define EQCY_EASTING_ERROR 0x0004
48 #define EQCY_NORTHING_ERROR 0x0008
49 #define EQCY_ORIGIN_LAT_ERROR 0x0010
50 #define EQCY_CENT_MER_ERROR 0x0020
51 #define EQCY_A_ERROR 0x0040
52 #define EQCY_B_ERROR 0x0080
53 #define EQCY_A_LESS_B_ERROR 0x0100
54 
55 
57  const ossimGpt& origin)
58 // :ossimLlxyProjection(ellipsoid, origin)
59  :ossimMapProjection(ellipsoid, origin)
60 {
61  setDefaults();
62  update();
63 }
64 
66  const ossimGpt& origin,
67  double falseEasting,
68  double falseNorthing)
69 // :ossimLlxyProjection(ellipsoid, origin)
70  :ossimMapProjection(ellipsoid, origin)
71 {
72  Eqcy_False_Easting = falseEasting;
73  Eqcy_False_Northing = falseNorthing;
74 
75  Eqcy_Delta_Northing = 10007555.0;
76  Eqcy_Max_Easting = 20015110.0;
77  Eqcy_Min_Easting = -20015110.0;
78 
79  update();
80 }
81 
83 {
86  theOrigin.latr(),
87  theOrigin.lonr(),
90 
93 
94  theMetersPerPixel.makeNan(); // force recompute by base class
95 
97 
98  // For geographic projection, the PCS EPSG code can be derived from the datum in most cases:
99  if ((thePcsCode == 0) && (theDatum != NULL))
100  {
101  ossim_uint32 datum_code = theDatum->epsgCode();
102  if ((datum_code >= 6000) && (datum_code < 7000))
103  thePcsCode = datum_code - 2000;
104  }
105 
106  // Workaround for bug
107 }
108 
110 {
111  ossimMapProjection::setOrigin(origin); // breaks the projection
112  setUlTiePoints(theUlGpt); // needed to reset easting northing
113 
114  // Changing the projection origin from the equator implies a scale change in the longitude
115  // direction to maintain GSD (meters) square at origin:
116  ossimDpt gsd = getMetersPerPixel();
117  gsd.x = gsd.y; // reset X (longitude) direction GSD
118  setMetersPerPixel(gsd);
119 }
120 
122 {
123  Eqcy_False_Easting = falseEasting;
124  update();
125 }
126 
128 {
129  Eqcy_False_Northing = falseNorthing;
130  update();
131 }
132 
134  double falseNorthing)
135 {
136  Eqcy_False_Easting = falseEasting;
137  Eqcy_False_Northing = falseNorthing;
138 
139  update();
140 }
141 
143 {
145  Eqcy_False_Easting = 0.0;
146  Eqcy_False_Northing = 0.0;
147  Eqcy_Delta_Northing = 10007555.0;
148  Eqcy_Max_Easting = 20015110.0;
149  Eqcy_Min_Easting = -20015110.0;
150 }
151 
153  const double& hgtEllipsoid,
154  ossimGpt& gpt)const
155 {
156  //
157  // make sure that the passed in lineSample is good and
158  // check to make sure our easting northing is good so
159  // we can compute the line sample.
160  //
161  //
162  if(lineSample.hasNans())
163  {
164  gpt.makeNan();
165  return;
166  }
168  {
169  ossimMapProjection::lineSampleHeightToWorld(lineSample, hgtEllipsoid, gpt);
170  return;
171  }
172  else
173  {
175  {
176  gpt.makeNan();
177  return;
178  }
179  ossimDpt eastingNorthing;
180 
181  eastingNorthing = (theUlEastingNorthing);
182 
183  eastingNorthing.x += (lineSample.x*theMetersPerPixel.x);
184 
185  //
186  // Note: the Northing is positive up. In image space
187  // the positive axis is down so we must multiply by
188  // -1
189  //
190  eastingNorthing.y += (-lineSample.y*theMetersPerPixel.y);
191 
192  //
193  // now invert the meters into a ground point.
194  //
195  gpt = inverse(eastingNorthing);
196  gpt.datum(theDatum);
197 
198  if(gpt.isLatNan() && gpt.isLonNan())
199  {
200  gpt.makeNan();
201  }
202  else
203  {
204  // Finally assign the specified height:
205  gpt.hgt = hgtEllipsoid;
206  }
207  }
209  {
211  }
212 }
213 
215  ossimDpt& lineSample)const
216 {
218  {
219  ossimMapProjection::worldToLineSample(worldPoint, lineSample);
220  return;
221  }
222 
223  // make sure our tie point is good and world point is good.
224  if(theUlEastingNorthing.isNan() || worldPoint.isLatNan() || worldPoint.isLonNan())
225  {
226  lineSample.makeNan();
227  return;
228  }
229 
230  // see if we have a datum set and if so shift the world to our datum. If not then
231  // find the easting northing value for the world point.
232  ossimDpt gptEastingNorthing;
233  if(theDatum)
234  {
235  ossimGpt gpt = worldPoint;
236  gpt.changeDatum(theDatum);
237  gptEastingNorthing = forward(gpt);
238  }
239  else
240  {
241  gptEastingNorthing = forward(worldPoint);
242  }
243 
244  // check the final result to make sure there were no problems.
245  if(!gptEastingNorthing.isNan())
246  {
247  lineSample.x = ((gptEastingNorthing.x - theUlEastingNorthing.x)/theMetersPerPixel.x);
248 
249  // We must remember that the Northing is negative since the positive
250  // axis for an image is assumed to go down since it's image space.
251  lineSample.y = (-(gptEastingNorthing.y - theUlEastingNorthing.y)/theMetersPerPixel.y);
252  }
253 }
254 
256  const ossimIpt& imageSize,
257  ossimDpt& lineSample ) const
258 {
260  {
261  // Make sure our points are good.
262  if( !theUlEastingNorthing.isNan() && !worldPoint.isLatNan() && !worldPoint.isLonNan() &&
263  !imageSize.isNan() )
264  {
265  ossimGpt gpt = worldPoint;
266 
267  //---
268  // See if we have a datum set and if so shift the world to our datum. If not then
269  // find the easting northing value for the world point.
270  if(theDatum)
271  {
272  gpt.changeDatum(theDatum);
273  }
274 
275  // Convert to easting northing.
276  ossimDpt gptEastingNorthing = forward(gpt);
277 
278  if( !gptEastingNorthing.isNan() )
279  {
280 #if 0
281  if ( imageSize.x > 0.0 )
282  {
283  ossimGpt edge(gpt.lat, -180.0, 0.0);
284  ossimDpt leftProjectionEdge = forward(edge);
285 
286  edge.lon = 180;
287  ossimDpt rightProjectionEdge = forward(edge);
288 
289  // Right edge Easting of image from tie.
291  ossim_float64 rightImageX = leftImageX + (imageSize.x * theMetersPerPixel.x);
292 
293  if ( rightImageX < rightProjectionEdge.x ) // Image edge left of date line.
294  {
295  // Image does not cross the date line.
296  lineSample.x =
297  (gptEastingNorthing.x - theUlEastingNorthing.x) / theMetersPerPixel.x;
298  }
299  else // Crossed date line:
300  {
301  // Normalize the right image point to account for wrap:
302  ossim_float64 normRightX =
303  rightImageX - rightProjectionEdge.x + leftProjectionEdge.x;
304 
305  if ( ( gptEastingNorthing.x >= leftImageX ) &&
306  ( gptEastingNorthing.x <= rightProjectionEdge.x ) )
307  {
308  // Between tie and date line.
309  lineSample.x =
310  (gptEastingNorthing.x - theUlEastingNorthing.x)/theMetersPerPixel.x;
311  }
312  else if ( ( gptEastingNorthing.x >= leftProjectionEdge.x ) &&
313  ( gptEastingNorthing.x <= normRightX ) )
314  {
315  // Between date line and right image point.
316  lineSample.x = ( rightProjectionEdge.x - theUlEastingNorthing.x +
317  gptEastingNorthing.x - leftProjectionEdge.x )/theMetersPerPixel.x;
318  }
319  else
320  {
321  // Point in between normalized right x and tie:
322  ossim_float64 deltaToLeft = theUlEastingNorthing.x - gptEastingNorthing.x;
323  ossim_float64 deltaToRight = gptEastingNorthing.x - normRightX;
324 
325  // Make relative to the closest edge.
326  if ( deltaToRight < deltaToLeft )
327  {
328  lineSample.x = (imageSize.x - 1) + deltaToRight/theMetersPerPixel.x;
329  }
330  else
331  {
332  lineSample.x = -(deltaToLeft/theMetersPerPixel.x );
333  }
334  }
335  }
336 
337  } // Matches: if ( ( imageSize.x > 0.0 ) && ( imageSize.y > 0.0 ) )
338  else
339  {
340  lineSample.x = (gptEastingNorthing.x - theUlEastingNorthing.x)/theMetersPerPixel.x;
341  }
342  #endif
343  lineSample.x = (gptEastingNorthing.x - theUlEastingNorthing.x)/theMetersPerPixel.x;
344  // We must remember that the Northing is negative since the positive
345  // axis for an image is assumed to go down since it's image space.
346  lineSample.y = (theUlEastingNorthing.y - gptEastingNorthing.y) / theMetersPerPixel.y;
347 
348  } // Matches: if( !lineSample.isNan() )
349  }
350  else // Some point we need has nans...
351  {
352  lineSample.makeNan();
353  }
354  } // Matches: if( theModelTransformUnitType == OSSIM_UNIT_UNKNOWN )
355  else
356  {
357  // Has transform:
358  ossimMapProjection::worldToLineSample(worldPoint, lineSample);
359  }
360 
361 } // End: ossimEquDistCylProjection::worldToLineSample(worldPoint, lineSample, imageSize)
362 
364 {
365  double lat = 0.0;
366  double lon = 0.0;
367 
368  Convert_Equidistant_Cyl_To_Geodetic(eastingNorthing.x,
369  eastingNorthing.y,
370  &lat,
371  &lon);
372 
373  return ossimGpt(lat*DEG_PER_RAD, lon*DEG_PER_RAD, 0.0, theDatum);
374 }
375 
377 {
378  double easting = 0.0;
379  double northing = 0.0;
380  ossimGpt gpt = latLon;
381 
382  if (theDatum)
383  {
384  if (theDatum->code() != latLon.datum()->code())
385  {
386  gpt.changeDatum(theDatum); // Shift to our datum.
387  }
388  }
389 
391  gpt.lonr(),
392  &easting,
393  &northing);
394 
395  return ossimDpt(easting, northing);
396 }
397 
398 
399 
400 bool ossimEquDistCylProjection::saveState(ossimKeywordlist& kwl, const char* prefix) const
401 {
402  return ossimMapProjection::saveState(kwl, prefix);
403 }
404 
405 bool ossimEquDistCylProjection::loadState(const ossimKeywordlist& kwl, const char* prefix)
406 {
407  if (traceDebug())
408  {
409  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimEquDistCylProjection::loadState: Input keyword list is \n" << kwl << endl;
410  }
411 
412  // ossimLlxyProjection::loadState(kwl, prefix);
413  ossimMapProjection::loadState(kwl, prefix);
415 
416  // Make sure the origin.lat is defined since it is needed to relate degrees/meter:
418  {
421  theOrigin.lat = 0.0;
422  }
423 
424  // Make sure degrees per pixel is defined:
427 
428  const char* type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
429 
430  setDefaults();
431  // make sure we are of the same type. If we are then the easting
432  // northing values will make since
433  //
435  {
438  }
439  else
440  {
442  }
443  // finalize the initialization.
444  update();
445 
446  return true;
447 }
448 
449 /***************************************************************************/
450 /*
451  * FUNCTIONS
452  */
453 
454 
456  double f,
457  double Std_Parallel,
458  double Central_Meridian,
459  double False_Easting,
460  double False_Northing)
461 { /* Begin Set_Equidistant_Cyl_Parameters */
462 /*
463  * The function Set_Equidistant_Cyl_Parameters receives the ellipsoid parameters and
464  * projection parameters as inputs, and sets the corresponding state
465  * variables. It also calculates the spherical radius of the sphere having
466  * the same area as the ellipsoid. If any errors occur, the error code(s)
467  * are returned by the function, otherwise EQCY_NO_ERROR is returned.
468  *
469  * a : Semi-major axis of ellipsoid, in meters (input)
470  * f : Flattening of ellipsoid (input)
471  * Std_Parallel : Latitude in radians at which the (input)
472  * point scale factor is 1.0
473  * Central_Meridian : Longitude in radians at the center of (input)
474  * the projection
475  * False_Easting : A coordinate value in meters assigned to the
476  * central meridian of the projection. (input)
477  * False_Northing : A coordinate value in meters assigned to the
478  * standard parallel of the projection (input)
479  */
480 
481  double temp;
482 // double inv_f = 1 / f;
483  long Error_Code = EQCY_NO_ERROR;
484 
485 // if (a <= 0.0)
486 // { /* Semi-major axis must be greater than zero */
487 // Error_Code |= EQCY_A_ERROR;
488 // }
489 // if ((inv_f < 250) || (inv_f > 350))
490 // { /* Inverse flattening must be between 250 and 350 */
491 // Error_Code |= EQCY_INV_F_ERROR;
492 // }
493 // if ((Std_Parallel < -PI_OVER_2) || (Std_Parallel > PI_OVER_2))
494 // { /* standard parallel out of range */
495 // Error_Code |= EQCY_STDP_ERROR;
496 // }
497 // if ((Central_Meridian < -PI) || (Central_Meridian > TWO_PI))
498 // { /* origin longitude out of range */
499 // Error_Code |= EQCY_CENT_MER_ERROR;
500 // }
501  if (!Error_Code)
502  { /* no errors */
503  Eqcy_a = a;
504  Eqcy_f = f;
505  es2 = 2 * Eqcy_f - Eqcy_f * Eqcy_f;
506  es4 = es2 * es2;
507  es6 = es4 * es2;
508  /* spherical radius */
509  Ra = Eqcy_a * (1.0 - es2 / 6.0 - 17.0 * es4 / 360.0 - 67.0 * es6 /3024.0);
510  Eqcy_Std_Parallel = Std_Parallel;
513 // if (Central_Meridian > M_PI)
514 // Central_Meridian -= TWO_PI;
515  Eqcy_Origin_Long = Central_Meridian;
516  Eqcy_False_Easting = False_Easting;
517  Eqcy_False_Northing = False_Northing;
518  if (Eqcy_Origin_Long > 0)
519  {
522  }
523  else if (Eqcy_Origin_Long < 0)
524  {
527  }
528  else
529  {
532  }
533  } /* End if(!Error_Code) */
534  return (Error_Code);
535 } /* End Set_Equidistant_Cyl_Parameters */
536 
537 
539  double *f,
540  double *Std_Parallel,
541  double *Central_Meridian,
542  double *False_Easting,
543  double *False_Northing)const
544 { /* Begin Get_Equidistant_Cyl_Parameters */
545 /*
546  * The function Get_Equidistant_Cyl_Parameters returns the current ellipsoid
547  * parameters and Equidistant Cylindrical projection parameters.
548  *
549  * a : Semi-major axis of ellipsoid, in meters (output)
550  * f : Flattening of ellipsoid (output)
551  * Std_Parallel : Latitude in radians at which the (output)
552  * point scale factor is 1.0
553  * Central_Meridian : Longitude in radians at the center of (output)
554  * the projection
555  * False_Easting : A coordinate value in meters assigned to the
556  * central meridian of the projection. (output)
557  * False_Northing : A coordinate value in meters assigned to the
558  * standard parallel of the projection (output)
559  */
560 
561  *a = Eqcy_a;
562  *f = Eqcy_f;
563  *Std_Parallel = Eqcy_Std_Parallel;
564  *Central_Meridian = Eqcy_Origin_Long;
565  *False_Easting = Eqcy_False_Easting;
566  *False_Northing = Eqcy_False_Northing;
567  return;
568 } /* End Get_Equidistant_Cyl_Parameters */
569 
570 
572  double Longitude,
573  double *Easting,
574  double *Northing)const
575 
576 { /* Begin Convert_Geodetic_To_Equidistant_Cyl */
577 /*
578  * The function Convert_Geodetic_To_Equidistant_Cyl converts geodetic (latitude and
579  * longitude) coordinates to Equidistant Cylindrical projection (easting and northing)
580  * coordinates, according to the current ellipsoid, spherical radiius
581  * and Equidistant Cylindrical projection parameters.
582  * If any errors occur, the error code(s) are returned by the
583  * function, otherwise EQCY_NO_ERROR is returned.
584  *
585  * Latitude : Latitude (phi) in radians (input)
586  * Longitude : Longitude (lambda) in radians (input)
587  * Easting : Easting (X) in meters (output)
588  * Northing : Northing (Y) in meters (output)
589  */
590 
591  double dlam; /* Longitude - Central Meridan */
592  long Error_Code = EQCY_NO_ERROR;
593 
594 // if ((Latitude < -PI_OVER_2) || (Latitude > PI_OVER_2))
595 // { /* Latitude out of range */
596 // Error_Code |= EQCY_LAT_ERROR;
597 // }
598 // if ((Longitude < -M_PI) || (Longitude > TWO_PI))
599 // { /* Longitude out of range */
600 // Error_Code|= EQCY_LON_ERROR;
601 // }
602 
603  if (!Error_Code)
604  { /* no errors */
605  dlam = Longitude - Eqcy_Origin_Long;
606  //if (dlam >= TWO_PI)
607  //{
608  // dlam -= TWO_PI;
609  // }
610  // if (dlam <= -TWO_PI)
611  // {
612  // dlam += TWO_PI;
613  // }
614 
615  *Easting = Ra_Cos_Eqcy_Std_Parallel * dlam + Eqcy_False_Easting;
616  *Northing = Ra * Latitude + Eqcy_False_Northing;
617 
618  }
619  return (Error_Code);
620 
621 } /* End Convert_Geodetic_To_Equidistant_Cyl */
622 
623 
625  double Northing,
626  double *Latitude,
627  double *Longitude)const
628 { /* Begin Convert_Equidistant_Cyl_To_Geodetic */
629 /*
630  * The function Convert_Equidistant_Cyl_To_Geodetic converts Equidistant Cylindrical projection
631  * (easting and northing) coordinates to geodetic (latitude and longitude)
632  * coordinates, according to the current ellipsoid, spherical radius
633  * and Equidistant Cylindrical projection coordinates.
634  * If any errors occur, the error code(s) are returned by the
635  * function, otherwise EQCY_NO_ERROR is returned.
636  *
637  * Easting : Easting (X) in meters (input)
638  * Northing : Northing (Y) in meters (input)
639  * Latitude : Latitude (phi) in radians (output)
640  * Longitude : Longitude (lambda) in radians (output)
641  */
642 
643  double dx, dy;
644  long Error_Code = EQCY_NO_ERROR;
645 
646 // if ((Easting < (Eqcy_False_Easting + Eqcy_Min_Easting))
647 // || (Easting > (Eqcy_False_Easting + Eqcy_Max_Easting)))
648 // { /* Easting out of range */
649 // Error_Code |= EQCY_EASTING_ERROR;
650 // }
651 // if ((Northing < (Eqcy_False_Northing - Eqcy_Delta_Northing))
652 // || (Northing > (Eqcy_False_Northing + Eqcy_Delta_Northing)))
653 // { /* Northing out of range */
654 // Error_Code |= EQCY_NORTHING_ERROR;
655 // }
656 
657  if (!Error_Code)
658  {
659  dy = Northing - Eqcy_False_Northing;
660  dx = Easting - Eqcy_False_Easting;
661  *Latitude = dy / Ra;
662 
663  if (Ra_Cos_Eqcy_Std_Parallel == 0)
664  *Longitude = 0;
665  else
666  *Longitude = Eqcy_Origin_Long + dx / Ra_Cos_Eqcy_Std_Parallel;
667 
668 // if (*Latitude > PI_OVER_2) /* force distorted values to 90, -90 degrees */
669 // *Latitude = PI_OVER_2;
670 // else if (*Latitude < -PI_OVER_2)
671 // *Latitude = -PI_OVER_2;
672 
673 // if (*Longitude > PI)
674 // *Longitude -= TWO_PI;
675 // if (*Longitude < -PI)
676 // *Longitude += TWO_PI;
677 
678 // if (*Longitude > PI) /* force distorted values to 180, -180 degrees */
679 // *Longitude = PI;
680 // else if (*Longitude < -PI)
681 // *Longitude = -PI;
682 
683  }
684  return (Error_Code);
685 
686 } /* End Convert_Equidistant_Cyl_To_Geodetic */
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
#define DEG_PER_RAD
Represents serializable keyword/value map.
bool isLonNan() const
Definition: ossimGpt.h:140
const char * find(const char *key) const
#define PI_OVER_2
virtual ossim_uint32 epsgCode() const
Definition: ossimDatum.h:59
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
virtual ossimDpt worldToLineSample(const ossimGpt &worldPoint) const
double y
Definition: ossimDpt.h:165
virtual void setOrigin(const ossimGpt &origin)
Sets theOrigin to origin.
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
virtual void lineSampleHeightToWorld(const ossimDpt &lineSampPt, const double &heightAboveEllipsoid, ossimGpt &worldPt) const
This is the pure virtual that projects the image point to the given elevation above ellipsoid...
virtual const ossimString & code() const
Definition: ossimDatum.h:57
void makeNan()
Definition: ossimGpt.h:130
bool isNan() const
Definition: ossimIpt.h:62
ossim_float64 hgt
Height in meters above the ellipsiod.
Definition: ossimGpt.h:274
RTTI_DEF1(ossimEquDistCylProjection, "ossimEquDistCylProjection", ossimMapProjection)
static ossimElevManager * instance()
METHOD: instance() Implements singelton pattern.
bool isNan() const
Definition: ossimDpt.h:72
ossimGpt theUlGpt
Hold tie point in decimal degrees.
bool isLatNan() const
Definition: ossimGpt.h:139
static const char * TYPE_KW
void changeDatum(const ossimDatum *datum)
This will actually perform a shift.
Definition: ossimGpt.cpp:316
virtual void setMetersPerPixel(const ossimDpt &gsd)
#define STATIC_TYPE_NAME(T)
Definition: ossimRtti.h:325
const ossimDatum * datum() const
datum().
Definition: ossimGpt.h:196
double ossim_float64
long Convert_Geodetic_To_Equidistant_Cyl(double Latitude, double Longitude, double *Easting, double *Northing) const
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
#define M_PI
ossimUnitType theModelTransformUnitType
ossim_float64 lon
Definition: ossimGpt.h:266
virtual double getHeightAboveEllipsoid(const ossimGpt &gpt)
const double & getA() const
virtual ossimGpt origin() const
double lonr() const
Returns the longitude in radian measure.
Definition: ossimGpt.h:76
unsigned int ossim_uint32
virtual ossimDpt forward(const ossimGpt &latLon) const
All map projections will convert the world coordinate to an easting northing (Meters).
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
long Convert_Equidistant_Cyl_To_Geodetic(double Easting, double Northing, double *Latitude, double *Longitude) const
ossimEquDistCylProjection(const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())
long Set_Equidistant_Cyl_Parameters(double a, double f, double Std_Parallel, double Central_Meridian, double False_Easting, double False_Northing)
virtual void setOrigin(const ossimGpt &origin)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
ossimUnitType theProjectionUnits
Linear units of the projection as indicated in the projection&#39;s specification:
bool hasNans() const
Definition: ossimDpt.h:67
void setFalseEastingNorthing(double falseEasting, double falseNorthing)
ossim_uint32 thePcsCode
Projection Coordinate System(PCS) code.
void Get_Equidistant_Cyl_Parameters(double *a, double *f, double *Std_Parallel, double *Central_Meridian, double *False_Easting, double *False_Northing) const
virtual void worldToLineSample(const ossimGpt &worldPoint, ossimDpt &lineSample) const
void setFalseNorthing(double falseNorthing)
ossimDpt theDegreesPerPixel
Hold the decimal degrees per pixel.
double x
Definition: ossimDpt.h:164
double latr() const
latr().
Definition: ossimGpt.h:66
#define EQCY_NO_ERROR
virtual void setUlTiePoints(const ossimGpt &gpt)
ossim_int32 x
Definition: ossimIpt.h:141
const double & getFlattening() const
ossim_float64 lat
Definition: ossimGpt.h:265
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.
ossimDpt theFalseEastingNorthing
Hold the false easting northing.
virtual ossimDpt getMetersPerPixel() const
virtual void computeDegreesPerPixel()
Computes the approximate resolution in degrees/pixel.
virtual void lineSampleHeightToWorld(const ossimDpt &lineSampPt, const double &heightAboveEllipsoid, ossimGpt &worldPt) const
This is the pure virtual that projects the image point to the given elevation above ellipsoid...
void setFalseEasting(double falseEasting)
virtual ossimGpt inverse(const ossimDpt &eastingNorthing) const
Will take a point in meters and convert it to ground.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
void makeNan()
Definition: ossimDpt.h:65
bool isnan(const float &v)
isnan Test for floating point Not A Number (NAN) value.
Definition: ossimCommon.h:91
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.