![]() |
VR-Forces Developer's Guide
|
DtTerrapageHeaderParser parses coordinate system info from TerraPage (.txp) terrain database archives.
The parser first looks for a companion projInfo.txt file in the same directory as the .txp file (this is the standard TerraPage convention). That file contains key=value pairs including a selectorId (EPSG code) and origin offsets. Supported coordinate systems are:

Classes | |
| struct | ProjInfoFields |
| struct | TxpHeaderFields |
Public Member Functions | |
| DtTerrapageHeaderParser (const std::string &filePath) | |
| virtual | ~DtTerrapageHeaderParser () |
| virtual bool | isValid () |
Public Member Functions inherited from makVrv::DtHeaderParser | |
| DtHeaderParser (const std::string &filePath) | |
| virtual | ~DtHeaderParser () |
| virtual const std::string & | terrainCoordinateSystem () |
| virtual const std::string & | terrainCoordinateSystemParameters () |
| virtual const std::string & | filePath () |
| const TerrainPatchRecords & | terrainPatchRecords () const |
| TerrainPatchRecords & | terrainPatchRecords () |
Protected Member Functions | |
| virtual bool | parseTxpHeader (TxpHeaderFields &fields) |
| virtual bool | buildCoordinateSystem (const TxpHeaderFields &fields) |
| virtual std::string | projInfoPath () const |
| virtual bool | parseProjInfoFile (const std::string &path, ProjInfoFields &fields) |
| virtual bool | buildFromProjInfo (const ProjInfoFields &fields) |
Static Protected Member Functions | |
| static int | swapInt32 (int value, bool swap) |
| static double | swapFloat64 (double value, bool swap) |
Additional Inherited Members | |
Public Types inherited from makVrv::DtHeaderParser | |
| typedef std::list < makArchives::DtTerrainPatchRecord > | TerrainPatchRecords |
Protected Attributes inherited from makVrv::DtHeaderParser | |
| std::string | myFilePath |
| std::string | myTerrainCoordinateSystem |
| std::string | myTerrainCoordinateSystemParameters |
| TerrainPatchRecords | myTerrainPatchRecords |
| makVrv::DtTerrapageHeaderParser::DtTerrapageHeaderParser | ( | const std::string & | filePath | ) |
CTOR.
|
virtual |
DTOR.
|
virtual |
Returns true if the file was loaded and produced acceptable coordinate system information and origin information.
Implements makVrv::DtHeaderParser.
|
protectedvirtual |
Open the .txp file and parse the binary TRPGHEADER block. Returns true on success and fills fields.
|
protectedvirtual |
Build a coordinate converter from projInfo.txt if it exists, then fall back to binary header heuristics. Returns true if a supported projection was detected.
|
protectedvirtual |
Return the path to the projInfo.txt companion file for this archive (same directory as the .txp file).
|
protectedvirtual |
Read and parse the projInfo.txt key=value file. Returns true if the file was found and at least one usable field was read.
|
protectedvirtual |
Build the coordinate system from already-parsed ProjInfo fields. Returns true if a supported projection was detected.
Apply byte-swapping to a 4-byte integer if needed.
|
staticprotected |
Apply byte-swapping to an 8-byte double if needed.