VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtUtmCoordinateConverter.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2007 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #ifndef DtUtmCoordinateConverter_H_
10 #define DtUtmCoordinateConverter_H_
11 
13 
14 namespace makVrv
15 {
16 
21 {
22 public:
23 
26 
28  virtual ~DtUtmCoordinateConverter();
29 
31  virtual DtCoordinateConverter* clone() const;
32 
37  virtual void init(double lat, double lon, long zone = 0, int useStandardOffsets = 0);
38 
43  virtual void init(double lat, double lon, double z, long zone = 0, int useStandardOffsets = 0);
44 
48  virtual void init(const DtGeodeticCoord& origin, long zone = 0, int useStandardOffsets = 0);
49 
53  virtual void init(const DtDegMinSec& lat, const DtDegMinSec& lon, long zone = 0, int useStandardOffsets = 0);
54 
58  virtual void init(const DtDegMinSec& lat, const DtDegMinSec& lon, double z, long zone = 0, int useStandardOffsets = 0);
59 
63  virtual void init(long zone, char hemisphere = 'N', bool useMpiDefaultOrigin = true);
64 
68  virtual void init(double falseOriginX, double falseOriginY, double falseOriginZ,
69  long zone, char hemisphere = 'N', bool useMpiDefaultOrigin = true);
70 
76  virtual bool init(const std::string& originstring);
77 
79  virtual std::string stringRep();
80 
83  virtual const DtGeodeticCoord& origin() const;
84 
86  virtual bool useStandardOffsets() const;
87 
89  virtual long zone() const;
90  virtual void setZone(long zone);
91 
93  virtual DtDegMinSec latRef() const;
94  virtual DtDegMinSec longRef() const;
95 
96  /********************* Conversions *****************************/
98  virtual void geocToCig(const DtVector& geoc, DtVector& out) const;
99 
100  virtual DtUtmReferencePoint* referencePoint() const;
101 
103  virtual void cigToGeoc(const DtVector& in, DtVector& geoc) const;
104 
105  virtual void setupTopoFrame(const DtVector& truth);
106 
107 protected:
108 
111  std::string parseUtm( const DtDegMinSec& lat, const DtDegMinSec& lng, bool bUseStandardOffsets, long zone );
112 
113 public:
114 
115  static DtCoordinateConverter* create();
116  static double calculateUtmLongitudeOrigin(double zone, bool useMpiDefaultOrigin = true);
117 
118  static void calculateUtmLatLonOrigin(double zone, double falseOriginX, double falseOriginY,
119  double& latitude, double& longitude, bool useMpiDefaultOrigin = true);
120 
121  static int utmGridZoneFromLatLon( double latitudeInDegrees, double longitudeInDegrees );
122 
123  // Useful functions for dealing with vrlink Utm Ref Point routines that use DtDegMinSec
124  static void setLatDtDegMinSecFromDegrees(DtDegMinSec& dmslat, double deg);
125  static void setLonDtDegMinSecFromDegrees(DtDegMinSec& dmslon, double deg);
126 
127  // Get a utm reference point initialized to the zone center and equator for specified
128  // geodetic coordinates.
129  static void initUtmReferencePointForZone( double longitude, bool standardOffsets,
130  const DtMapDatum& datum, DtUtmReferencePoint& refToInitialized );
131 
132  // returns the zone's central meridian, in degrees
133  static double utmZoneToCentralMeridian( int zone );
134 
135 protected:
136 
137  // Used by setLatDtDegMinSecFromDegrees and setLonDtDegMinSecFromDegrees
138  static void setDtDegMinSecFromDegrees(DtDegMinSec& dms, double deg);
139 
140 
141 private:
142 
145 
147  DtUtmCoordinateConverter& operator=(const DtUtmCoordinateConverter& orig);
148 
149 protected:
150 
151  mutable DtUtmReferencePoint myReferencePoint;
152 
154 };
155 
156 }
157 
158 #endif
Instances of DtUtmCoordSystem provide transformations and utilities for converting between network an...
Definition: DtUtmCoordinateConverter.h:20
DT_DLL_EXAMPLESCENEROOTPLUGIN void init(DtDe &anIG)
#define DT_DLL_VRVUTIL
Definition: vrvUtil.h:34
DtCoordinateConverter is the base class for 'local (cig) to geocentric' converters.
Definition: DtCoordinateConverter.h:25
voidpf uLong int origin
Definition: ioapi.h:42
DT_DLL_terrainCS void setLonDtDegMinSecFromDegrees(DtDegMinSec &dms, double deg)
DtUtmReferencePoint myReferencePoint
Definition: DtUtmCoordinateConverter.h:151
DT_DLL_terrainCS void setDtDegMinSecFromDegrees(DtDegMinSec &dms, double deg)
DT_DLL_terrainCS void setLatDtDegMinSecFromDegrees(DtDegMinSec &dms, double deg)
bool myUseStandardOffsets
Definition: DtUtmCoordinateConverter.h:153

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)