OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Private Attributes | List of all members
ossimUtmpt Class Reference

#include <ossimUtmpt.h>

Public Member Functions

 ossimUtmpt (const ossimGpt &aPt)
 
 ossimUtmpt (const ossimEcefPoint &aPt)
 
 ossimUtmpt (long zone, char hemisphere, double easting, double northing, const ossimDatum *datum)
 
ossim_int32 zone () const
 Return the zone for this utm point. More...
 
char hemisphere () const
 Return the hemisphere ( Northern or Southern). More...
 
double easting () const
 return the easting value in meters. More...
 
double northing () const
 return the northing value in meters. More...
 
const ossimDatumdatum () const
 return the reference datum for this point. More...
 
void convertFromGround (const ossimGpt &aPt)
 Initializes this point to utm coordinates for the ground point. More...
 
void convertToGround (ossimGpt &aPt)
 Initializes the ground point from the utm coordinates of this point. More...
 

Private Attributes

long theZone
 
char theHemisphere
 
double theEasting
 
double theNorthing
 
const ossimDatumtheDatum
 

Detailed Description

Definition at line 26 of file ossimUtmpt.h.

Constructor & Destructor Documentation

◆ ossimUtmpt() [1/3]

ossimUtmpt::ossimUtmpt ( const ossimGpt aPt)

Definition at line 24 of file ossimUtmpt.cpp.

References convertFromGround().

25 {
26  convertFromGround(aPt);
27 }
void convertFromGround(const ossimGpt &aPt)
Initializes this point to utm coordinates for the ground point.
Definition: ossimUtmpt.cpp:47

◆ ossimUtmpt() [2/3]

ossimUtmpt::ossimUtmpt ( const ossimEcefPoint aPt)

Definition at line 29 of file ossimUtmpt.cpp.

References convertFromGround().

30 {
32 }
void convertFromGround(const ossimGpt &aPt)
Initializes this point to utm coordinates for the ground point.
Definition: ossimUtmpt.cpp:47

◆ ossimUtmpt() [3/3]

ossimUtmpt::ossimUtmpt ( long  zone,
char  hemisphere,
double  easting,
double  northing,
const ossimDatum datum 
)

Definition at line 34 of file ossimUtmpt.cpp.

39  :
40  theZone (zone),
44  theDatum (datum)
45 {}
const ossimDatum * datum() const
return the reference datum for this point.
Definition: ossimUtmpt.h:65
const ossimDatum * theDatum
Definition: ossimUtmpt.h:86
double theEasting
Definition: ossimUtmpt.h:84
double theNorthing
Definition: ossimUtmpt.h:85
ossim_int32 zone() const
Return the zone for this utm point.
Definition: ossimUtmpt.h:42
char theHemisphere
Definition: ossimUtmpt.h:83
long theZone
Definition: ossimUtmpt.h:82
double northing() const
return the northing value in meters.
Definition: ossimUtmpt.h:60
double easting() const
return the easting value in meters.
Definition: ossimUtmpt.h:55
char hemisphere() const
Return the hemisphere ( Northern or Southern).
Definition: ossimUtmpt.h:50

Member Function Documentation

◆ convertFromGround()

void ossimUtmpt::convertFromGround ( const ossimGpt aPt)

Initializes this point to utm coordinates for the ground point.

Parameters
aPtGround point to initialize from.

Definition at line 47 of file ossimUtmpt.cpp.

References ossimEllipsoid::a(), Convert_Geodetic_To_UTM(), ossimGpt::datum(), ossimDatum::ellipsoid(), ossimEllipsoid::flattening(), ossimGpt::latr(), ossimGpt::lonr(), Set_UTM_Parameters(), theDatum, theEasting, theHemisphere, theNorthing, and theZone.

Referenced by ossimUtmpt().

48 {
49  const ossimDatum *aDatum = aPt.datum();
50 
51  if(aDatum)
52  {
53  //call Geotrans init code
54  Set_UTM_Parameters(aDatum->ellipsoid()->a(), aDatum->ellipsoid()->flattening(), 0);
56  aPt.lonr(),
57  &theZone,
59  &theEasting,
60  &theNorthing);
61  theDatum = aDatum;
62  }
63  else
64  {
65  //ERROR: Should never happen
66  }
67 }
const ossimDatum * theDatum
Definition: ossimUtmpt.h:86
double flattening() const
long OSSIM_DLL Set_UTM_Parameters(double a, double f, long override)
double theEasting
Definition: ossimUtmpt.h:84
double theNorthing
Definition: ossimUtmpt.h:85
const ossimDatum * datum() const
datum().
Definition: ossimGpt.h:196
const double & a() const
double lonr() const
Returns the longitude in radian measure.
Definition: ossimGpt.h:76
virtual const ossimEllipsoid * ellipsoid() const
Definition: ossimDatum.h:60
char theHemisphere
Definition: ossimUtmpt.h:83
long theZone
Definition: ossimUtmpt.h:82
double latr() const
latr().
Definition: ossimGpt.h:66
long OSSIM_DLL Convert_Geodetic_To_UTM(double Latitude, double Longitude, long *Zone, char *Hemisphere, double *Easting, double *Northing)

◆ convertToGround()

void ossimUtmpt::convertToGround ( ossimGpt aPt)

Initializes the ground point from the utm coordinates of this point.

Parameters
aPtGround point to initialize.

Definition at line 69 of file ossimUtmpt.cpp.

References ossimEllipsoid::a(), Convert_UTM_To_Geodetic(), ossimGpt::datum(), easting(), ossimDatum::ellipsoid(), ossimEllipsoid::flattening(), hemisphere(), ossimGpt::latr(), ossimGpt::lonr(), northing(), Set_UTM_Parameters(), theDatum, and zone().

70 {
73  0 );
74 
75  double latitude = 0.0;
76  double longitude = 0.0;
77 
79  hemisphere(),
80  easting(),
81  northing(),
82  &latitude,
83  &longitude );
84 
85  aPt.latr(latitude);
86  aPt.lonr(longitude);
87  aPt.datum(theDatum);
88 }
const ossimDatum * theDatum
Definition: ossimUtmpt.h:86
double flattening() const
long OSSIM_DLL Set_UTM_Parameters(double a, double f, long override)
long OSSIM_DLL Convert_UTM_To_Geodetic(long Zone, char Hemisphere, double Easting, double Northing, double *Latitude, double *Longitude)
const ossimDatum * datum() const
datum().
Definition: ossimGpt.h:196
const double & a() const
ossim_int32 zone() const
Return the zone for this utm point.
Definition: ossimUtmpt.h:42
double lonr() const
Returns the longitude in radian measure.
Definition: ossimGpt.h:76
virtual const ossimEllipsoid * ellipsoid() const
Definition: ossimDatum.h:60
double northing() const
return the northing value in meters.
Definition: ossimUtmpt.h:60
double easting() const
return the easting value in meters.
Definition: ossimUtmpt.h:55
char hemisphere() const
Return the hemisphere ( Northern or Southern).
Definition: ossimUtmpt.h:50
double latr() const
latr().
Definition: ossimGpt.h:66

◆ datum()

const ossimDatum* ossimUtmpt::datum ( ) const
inline

return the reference datum for this point.

Definition at line 65 of file ossimUtmpt.h.

65 { return theDatum; }
const ossimDatum * theDatum
Definition: ossimUtmpt.h:86

◆ easting()

double ossimUtmpt::easting ( ) const
inline

return the easting value in meters.

Definition at line 55 of file ossimUtmpt.h.

Referenced by convertToGround().

55 { return theEasting; }
double theEasting
Definition: ossimUtmpt.h:84

◆ hemisphere()

char ossimUtmpt::hemisphere ( ) const
inline

Return the hemisphere ( Northern or Southern).

We store this as a char value N or S. We store it like this because we are interfacing to geotrans and geotrans stores their values in this manner.

Definition at line 50 of file ossimUtmpt.h.

Referenced by convertToGround().

50 { return theHemisphere; }
char theHemisphere
Definition: ossimUtmpt.h:83

◆ northing()

double ossimUtmpt::northing ( ) const
inline

return the northing value in meters.

Definition at line 60 of file ossimUtmpt.h.

Referenced by convertToGround().

60 { return theNorthing; }
double theNorthing
Definition: ossimUtmpt.h:85

◆ zone()

ossim_int32 ossimUtmpt::zone ( ) const
inline

Return the zone for this utm point.

Definition at line 42 of file ossimUtmpt.h.

Referenced by convertToGround().

42 { return theZone; }
long theZone
Definition: ossimUtmpt.h:82

Member Data Documentation

◆ theDatum

const ossimDatum* ossimUtmpt::theDatum
private

Definition at line 86 of file ossimUtmpt.h.

Referenced by convertFromGround(), and convertToGround().

◆ theEasting

double ossimUtmpt::theEasting
private

Definition at line 84 of file ossimUtmpt.h.

Referenced by convertFromGround().

◆ theHemisphere

char ossimUtmpt::theHemisphere
private

Definition at line 83 of file ossimUtmpt.h.

Referenced by convertFromGround().

◆ theNorthing

double ossimUtmpt::theNorthing
private

Definition at line 85 of file ossimUtmpt.h.

Referenced by convertFromGround().

◆ theZone

long ossimUtmpt::theZone
private

Definition at line 82 of file ossimUtmpt.h.

Referenced by convertFromGround().


The documentation for this class was generated from the following files: