VR-Forces Developer's Guide
 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) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #ifndef DtUtmCoordinateConverter_H_
10 #define DtUtmCoordinateConverter_H_
11 
13 #include <limits>
14 
15 namespace makVrv
16 {
17 
22 {
23 public:
24 
27 
29  virtual ~DtUtmCoordinateConverter();
30 
32  virtual DtCoordinateConverter* clone() const override;
33 
40  virtual void init(double lat, double lon, long zone = 0, int useStandardOffsets = 0, char hemisphere = 'N', double falseNorthingCrossover = std::numeric_limits<double>::max());
41 
46  virtual void init(double lat, double lon, double z, long zone = 0, int useStandardOffsets = 0, char hemisphere = 'N', double falseNorthingCrossover = std::numeric_limits<double>::max());
47 
51  virtual void init(const DtGeodeticCoord& origin, long zone = 0, int useStandardOffsets = 0, double falseNorthingCrossover = std::numeric_limits<double>::max());
52 
56  virtual void init(const DtDegMinSec& lat, const DtDegMinSec& lon, long zone = 0, int useStandardOffsets = 0, double falseNorthingCrossover = std::numeric_limits<double>::max());
57 
61  virtual void init(const DtDegMinSec& lat, const DtDegMinSec& lon, double z, long zone = 0, int useStandardOffsets = 0, double falseNorthingCrossover = std::numeric_limits<double>::max());
62 
66  virtual void init(long zone, char hemisphere = 'N', bool useMpiDefaultOrigin = true, double falseNorthingCrossover = std::numeric_limits<double>::max());
67 
71  virtual void init(double falseOriginX, double falseOriginY, double falseOriginZ,
72  long zone, char hemisphere = 'N', bool useMpiDefaultOrigin = true, double falseNorthingCrossover = std::numeric_limits<double>::max());
73 
79  virtual bool init(const std::string& originstring) override;
80 
82  virtual std::string stringRep() override;
83 
86  virtual const DtGeodeticCoord& origin() const;
87 
89  virtual bool useStandardOffsets() const;
90 
92  virtual long zone() const;
93  virtual void setZone(long zone);
94 
96  virtual DtDegMinSec latRef() const;
97  virtual DtDegMinSec longRef() const;
98 
99  /********************* Conversions *****************************/
101  virtual void geocToCig(const DtVector& geoc, DtVector& out) const override;
102 
104  virtual void cigToGeoc(const DtVector& in, DtVector& geoc) const override;
105 
106  virtual void setupTopoFrame(const DtVector& truth) override;
107 
108  virtual DtUtmReferencePoint* referencePoint() const;
109 
110 protected:
111 
115  std::string parseUtm( const DtDegMinSec& lat, const DtDegMinSec& lng, bool bUseStandardOffsets, long zone);
116 
117 public:
118 
119  static DtCoordinateConverter* create();
120  static double calculateUtmLongitudeOrigin(double zone, bool useMpiDefaultOrigin = true);
121 
122  static void calculateUtmLatLonOrigin(double zone, double falseOriginX, double falseOriginY,
123  double& latitude, double& longitude, bool useMpiDefaultOrigin = true);
124 
125  static int utmGridZoneFromLatLon( double latitudeInDegrees, double longitudeInDegrees );
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 private:
136 
139 
141  DtUtmCoordinateConverter& operator=(const DtUtmCoordinateConverter& orig) = delete;
142 
143 protected:
144 
145  mutable DtUtmReferencePoint myReferencePoint;
146 
148 };
149 
150 }
151 
152 #endif
Instances of DtUtmCoordSystem provide transformations and utilities for converting between network an...
Definition: DtUtmCoordinateConverter.h:21
DT_DLL_EXAMPLESCENEROOTPLUGIN void init(DtDe &anIG)
#define DT_DLL_VRVUTIL
Definition: vrvUtil.h:34
DtCoordinateConverter is the base class for &#39;local (cig) to geocentric&#39; converters.
Definition: DtCoordinateConverter.h:25
voidpf uLong int origin
Definition: ioapi.h:42
DtUtmReferencePoint myReferencePoint
Definition: DtUtmCoordinateConverter.h:145
bool myUseStandardOffsets
Definition: DtUtmCoordinateConverter.h:147

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)