VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTerrapageHeaderParser.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2026 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #ifndef DtTerrapageHeaderParser_H_
11 #define DtTerrapageHeaderParser_H_
12 
13 #include <vrvTerrain/vrvTerrain.h>
14 #include <vrvCore/DtHeaderParser.h>
15 #include <string>
16 
17 namespace makVrv
18 {
34  {
35 
36  public:
37 
39  DtTerrapageHeaderParser(const std::string& filePath);
40 
42  virtual ~DtTerrapageHeaderParser();
43 
46  virtual bool isValid();
47 
48  protected:
49 
52  {
53  double originX;
54  double originY;
55  double originZ;
56  double swX;
57  double swY;
58  double neX;
59  double neY;
60  int tileType;
61  bool swapBytes;
62  };
63 
66  {
67  int selectorId;
68  double originLat;
69  double originLon;
70  double txpOffsetX;
71  double txpOffsetY;
72  double txpOffsetZ;
74  };
75 
78  virtual bool parseTxpHeader(TxpHeaderFields& fields);
79 
83  virtual bool buildCoordinateSystem(const TxpHeaderFields& fields);
84 
87  virtual std::string projInfoPath() const;
88 
92  virtual bool parseProjInfoFile(const std::string& path,
93  ProjInfoFields& fields);
94 
97  virtual bool buildFromProjInfo(const ProjInfoFields& fields);
98 
100  static int swapInt32(int value, bool swap);
101 
103  static double swapFloat64(double value, bool swap);
104 
105  };
106 
110  {
111  public:
112 
115 
118 
120  virtual DtHeaderParser* create(DtDe& de, const std::string& filePath) const;
121 
122  };
123 }
124 
125 #endif
double originLat
flat-earth origin latitude (degrees)
Definition: DtTerrapageHeaderParser.h:68
double neX
Definition: DtTerrapageHeaderParser.h:58
double originX
Definition: DtTerrapageHeaderParser.h:53
Abstact header parser creator class.
Definition: DtHeaderParser.h:66
Contains makVrv::DtHeaderParser class declaration.
bool swapBytes
Definition: DtTerrapageHeaderParser.h:61
double neY
Definition: DtTerrapageHeaderParser.h:59
Abstract header parser class.
Definition: DtHeaderParser.h:23
Contains DLL export macros.
Fields parsed from the projInfo.txt companion file.
Definition: DtTerrapageHeaderParser.h:65
double txpOffsetZ
database origin elevation (metres)
Definition: DtTerrapageHeaderParser.h:72
double swY
Definition: DtTerrapageHeaderParser.h:57
int tileType
0 = DatabaseLocal, 1 = Absolute, 2 = TileLocal
Definition: DtTerrapageHeaderParser.h:60
bool hasOriginLatLon
true when originlat/originlon were found
Definition: DtTerrapageHeaderParser.h:73
DtTerrapageHeaderParser parses coordinate system info from TerraPage (.txp) terrain database archives...
Definition: DtTerrapageHeaderParser.h:33
Creator for DtTerrapageHeaderParser instances.
Definition: DtTerrapageHeaderParser.h:109
double txpOffsetY
database origin northing (metres)
Definition: DtTerrapageHeaderParser.h:71
Raw header fields parsed from the TXP binary.
Definition: DtTerrapageHeaderParser.h:51
double originLon
flat-earth origin longitude (degrees)
Definition: DtTerrapageHeaderParser.h:69
#define DT_DLL_VRVTERRAIN
Definition: vrvTerrain.h:19
double txpOffsetX
database origin easting (metres)
Definition: DtTerrapageHeaderParser.h:70
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
double swX
Definition: DtTerrapageHeaderParser.h:56
double originY
Definition: DtTerrapageHeaderParser.h:54
double originZ
Definition: DtTerrapageHeaderParser.h:55
int selectorId
EPSG code or 0 if absent.
Definition: DtTerrapageHeaderParser.h:67

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)