dted2

Crates.iodted2
lib.rsdted2
version1.0.0
sourcesrc
created_at2024-05-10 17:09:10.291546
updated_at2024-08-13 17:55:19.688475
descriptionTool for reading DTED files
homepage
repositoryhttps://github.com/arpadav/dted2
max_upload_size
id1236208
size26,076,094
arpad voros (arpadav)

documentation

https://docs.rs/dted2

README

DTED Reader for Rust

LICENSE Crates.io Version Minimum rustc version

dted2 surface

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 and dt0 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 and ACC records are being worked on, and only the standard UHL header is being read alongside the data.
Commit count: 33

cargo fmt