This Repository is a stripped down version of the Python DTED Module, originally by Ben Bonenfant, translated into GDScript for the use within the Godot-Game-Engine by me.
DTED means Digital Terrain Elevation Data and can appear in *.dt1, *.dt2 and *.dt3 format.
Map services and data available from U.S. Geological Survey, National Geospatial Program.
If you want to use this module just copy geo_data.gd anywhere into your project.
Everything is documented inline, viewing the demo project is advised.
Example for reading a DTED file and querying elevation:
var geo_data : GeoData = GeoData.new()
var error : int = geo_data.load_from_dted(path)
if error == OK:
var elevation = geo_data.get_elevation(latitude, longitude)
The example project is in geo-data-demo/ and geo data you can use for this demo is in geo-data-test-files/.
You are advised to view the short demo for detailed information on how to use this module and how it works.
The intend behind this repository is to give you a headstart when starting out with DTED in Godot.
It is not 100% matured for sure but among other things capable of reading DTED files according to the DTED specification, which can save you a lot of initial workload.
You can download DTED files from the United States Geological Survey's Earth Explorer. Since the process for downloading DTED files from the Earth Explorer might not be straight forward for some, here is a small guide:
-
This is the initial view you will see when visiting the website.
-
Set points on the map in order to restrict the search for geo data to this area.
-
Under "Data Sets" select SRTM void filled and or non-void filled.
-
Select the disk icon to prompt download options and pick "DTED" (requires you to be logged in)
A big thank you to Ben Bonenfant for authoring the original Python DTED module.