Expand description
§DTED Reader for Rust
Refactor of dted
, with updated version of nom
, improved functionality, added features, fixes, and optimizations!
§Usage
ⓘ
use dted2::{ DTEDData, DTEDMetadata };
let data = DTEDData::read("dted_file.dt2").unwrap();
let metadata: DTEDMetadata = data.metadata;
// or can read just the header without the rest of the data
let metadata: DTEDMetadata = DTEDData::read_header("dted_file.dt2").unwrap();
// query elevation, returns None if out of bounds
let elevation: f64 = data.get_elevation(50.0, 10.0).unwrap();
§Description
The dted2
crate is a Rust library designed to parse and handle DTED (Digital Terrain Elevation Data) files. DTED files are a standard format used for storing raster elevation data, particularly for military and simulation applications. The data in DTED files is stored in a matrix of elevation points, representing the terrain’s height above a given datum. This format supports several military and simulation applications including line-of-sight analysis, 3D visualization, and mission planning.
DTED data is organized into three levels of resolution:
- Level 0: Approximately 900 meters between data points.
- Level 1: Approximately 90 meters between data points.
- Level 2: Approximately 30 meters between data points. Each level of DTED provides different details suitable for various precision requirements in applications.
§Features
- Data Handling: Efficient handling of large datasets with options to process only required sections of data for memory management.
- Read Functionality: Parse DTED files (
.dt0
,.dt1
,.dt2
) into usable data structures. Currently only.dt2
files have been tested.dt1
anddt0
files should in theory work.
§TODO
- Geographic Processing: Convert DTED raster data into geographic coordinates based on the WGS84 datum.
- Additional DTED Header parsing: Add support for additional header records. Currently both
DSI
andACC
records are being worked on, and only the standardUHL
header is being read alongside the data.
Re-exports§
pub use dted::DTEDData;
pub use dted::DTEDMetadata;
Modules§
- dted
- Contains the primary abstract entities parsed from a DTED file.
- parsers
- Contains nom parsers for various components within a DTED file.
- primitives
- Contains primitive items used through the crate.
Enums§
- Error
- DTED parsing error