OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimWgs84Datum.cpp
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Garrett Potts (gpotts@imagelinks.com)
6 //
7 // Description:
8 //
9 // Wgs84Datum. Special hardcoded datum. It will create a static
10 // instance of a Wgs84Ellipsoid and set the initial defaults for
11 // that are specific to a Wgs84Datum
12 //*******************************************************************
13 // $Id: ossimWgs84Datum.cpp 22321 2013-07-22 11:40:45Z gpotts $
14 
19 
20 
22 
24  :ossimThreeParamDatum("WGE",
25  "World Geodetic System 1984",
26  ossimEllipsoidFactory::instance()->wgs84(),
27  0.0, 0.0, 0.0,
28  -180.0,180.0,-90.0,90.0,
29  0.0, 0.0, 0.0)
30 {
31  if(!ellipsoid())
32  {
33  //ERROR
34  }
35 }
36 
37 
39 {
40  const ossimDatum *aDatum = aPt.datum();
41 
42  if( aPt.datum()->code() == code())
43  {
44  return ossimGpt(aPt.latd(), aPt.lond(), aPt.height(), this);
45  }
46 
47  if(aDatum)
48  {
49  return aDatum->shiftToWgs84(aPt);
50  }
51 
52  return aPt;
53 }
54 
56 {
57  return ossimGpt(aPt.latd(),
58  aPt.lond(),
59  aPt.height(),
61 }
62 
64 {
65  return aPt;
66 }
virtual ossimGpt shiftToWgs84(const ossimGpt &aPt) const =0
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
virtual const ossimString & code() const
Definition: ossimDatum.h:57
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
const ossimDatum * datum() const
datum().
Definition: ossimGpt.h:196
virtual ossimGpt shiftToWgs84(const ossimGpt &aPt) const
virtual const ossimEllipsoid * ellipsoid() const
Definition: ossimDatum.h:60
double height() const
Definition: ossimGpt.h:107
static ossimDatumFactory * instance()
virtual ossimGpt shiftFromWgs84(const ossimGpt &aPt) const
virtual ossimGpt shift(const ossimGpt &aPt) const
RTTI_DEF1(ossimWgs84Datum, "ossimWgs84Datum", ossimThreeParamDatum)
const ossimDatum * wgs84() const