LuciadCPillar 2023.1.02
luciad::DtedModelDecoder Class Referencefinal

This class can be used to create an IRasterModel implementation that can read DTED (Digital Terrain Elevation Data). More...

#include <luciad/formats/dted/DtedModelDecoder.h>

Classes

class  Options
 Options for decoding DTED. More...
 

Public Member Functions

 DtedModelDecoder ()=delete
 
 ~DtedModelDecoder ()=delete
 

Static Public Member Functions

static luciad::expected< std::shared_ptr< IRasterModel >, ErrorInfodecode (const std::string &source)
 This method decodes: More...
 
static luciad::expected< std::shared_ptr< IRasterModel >, ErrorInfodecode (const std::string &source, const Options &options)
 This method decodes: More...
 

Detailed Description

This class can be used to create an IRasterModel implementation that can read DTED (Digital Terrain Elevation Data).

See DtedModelDecoder::decode for more details.

Since
2023.0

Constructor & Destructor Documentation

◆ DtedModelDecoder()

luciad::DtedModelDecoder::DtedModelDecoder ( )
delete

◆ ~DtedModelDecoder()

luciad::DtedModelDecoder::~DtedModelDecoder ( )
delete

Member Function Documentation

◆ decode() [1/2]

static luciad::expected< std::shared_ptr< IRasterModel >, ErrorInfo > luciad::DtedModelDecoder::decode ( const std::string &  source)
static

This method decodes:

  • individual DTED (Digital Terrain Elevation Data) files.
  • directories containing DTED files.
  • DMED (Digital Mean Elevation Data) files and any available corresponding DTED files.
Parameters
sourceThe absolute path to the file or directory.
Returns
either the new model or error information. The possible error codes are :
  • FileNotFound: when the file does not exist.
  • Unsupported: when a file is decoded that we don't support yet.
  • RuntimeError: if an error is encountered while decoding the file.
The error information contains a textual description that gives more information about the issue.
See also
decode(const std::string&, const Options&)

◆ decode() [2/2]

static luciad::expected< std::shared_ptr< IRasterModel >, ErrorInfo > luciad::DtedModelDecoder::decode ( const std::string &  source,
const Options options 
)
static

This method decodes:

  • individual DTED (Digital Terrain Elevation Data) files.
  • directories containing DTED files.
  • DMED (Digital Mean Elevation Data) files and any available corresponding DTED files.
Input files

When decoding individual DTED files:

File Entry point Description
*.dt[012] x DTED file corresponding to a single cell of 1 degree by 1 degree.

When decoding directories containing DTED files:

File Entry point Description
dted/[we]???/[sn]??.dt[012] x DTED directory containing DTED files.

When decoding DMED files and any available corresponding DTED files.

File Entry point Description
dmed x DMED file referring to DTED files.
dted/[we]???/[sn]??.dt[012] x DTED directory containing DTED files.
Model reference
  • All models returned by this model decoder have a geodetic reference system.
  • The geodetic datum of this reference is WGS72 or WGS84.
Supported versions and specifications

MIL-D-89020B, Digital Terrain Elevation Data (DTED), NIMA, 23 May 2000

Limitations
  • The geoid datum EGM96 is not currently supported. When visualized, elevation data are interpreted as ellipsoidal heights.
  • DMED files are only used to retrieve the MBR (minimum bounding rectangle) encompassing the DTED cells contained in the DTED directory. No DMED raster is produced by decoding DMED files.
Example usage:
std::string source = "Alps/dted/e008/n43.dt0";
luciad::expected<std::shared_ptr<IRasterModel>, ErrorInfo> dtedModelExpected = DtedModelDecoder::decode(source);
if (dtedModelExpected.has_value()) {
// ...
} else {
ErrorInfo errorInfo = dtedModelExpected.error();
std::cout << "Failed to decode source '" << source << "' : " << errorInfo.getMessage();
}
std::cout << std::endl;
static luciad::expected< std::shared_ptr< IRasterModel >, ErrorInfo > decode(const std::string &source, const Options &options)
This method decodes:
This class exposes details for a failed method call.
Definition: ErrorInfo.h:33
const std::string & getMessage() const
Definition: ErrorInfo.h:58
Parameters
sourceThe absolute path to the file or directory.
optionsOptions for decoding DTED.
Returns
either the new model or error information. The possible error codes are :
  • FileNotFound: when the file does not exist.
  • Unsupported: when a file is decoded that we don't support yet.
  • RuntimeError: if an error is encountered while decoding the file.
The error information contains a textual description that gives more information about the issue.