Crates.io | dted2 |
lib.rs | dted2 |
version | 1.0.0 |
source | src |
created_at | 2024-05-10 17:09:10.291546 |
updated_at | 2024-08-13 17:55:19.688475 |
description | Tool for reading DTED files |
homepage | |
repository | https://github.com/arpadav/dted2 |
max_upload_size | |
id | 1236208 |
size | 26,076,094 |
Refactor of dted
, with updated version of nom
, improved functionality, added features, fixes, and optimizations!
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();
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:
.dt0
, .dt1
, .dt2
) into usable data structures. Currently only .dt2
files have been tested. dt1
and dt0
files should in theory work.DSI
and ACC
records are being worked on, and only the standard UHL
header is being read alongside the data.