bbonenfant / dted Goto Github PK
View Code? Open in Web Editor NEWPython parser for DTED data.
License: MIT License
Python parser for DTED data.
License: MIT License
I receive drastically different elevation values for the same location when using DTED levels 0, 1, and 2. An area that I know to be approximately 735m MSL reports the following:
~/Desktop/dted/w117$ dted n34.dt0 --location 34.353932 -116.295523
1035.0 meters
~/Desktop/dted/w117$ dted n34.dt1 --location 34.353932 -116.295523
2557.0 meters
~/Desktop/dted/w117$ dted n34.dt2 --location 34.353932 -116.295523
733.0 meters
In looking at the source code, I believe the calculations for the latitude and longitude indices in the DTED data are wrong:
I believe this:
lat_interval, lon_interval = self.dsi.latitude_interval, self.dsi.longitude_interval
latitude_index = round(
(latlon.latitude - origin_latitude) * (latitude_count - 1) / lat_interval
)
longitude_index = round(
(latlon.longitude - origin_longitude) * (longitude_count - 1) / lon_interval
)
Should be this:
latitude_index = round(
(latlon.latitude - origin_latitude) * (latitude_count - 1)
)
longitude_index = round(
(latlon.longitude - origin_longitude) * (longitude_count - 1)
)
I am getting an error when importing Tile from dted. I am using a fresh Conda environment but cannot seem to get around this error. I can see the Tile class in dted/dted/tile.py but the import does not work. Error shown below:
ImportError: cannot import name 'Tile' from partially initialized module 'dted' (most likely due to a circular import) (/<PATH TO FILE>/dted.py)
Python Version: Python 3.9.12
Thanks for your help in advance!
Hello,
I am trying to use the Tile(dted_file) on SRTM 1arc DTED files.
The publicly available SRTM 1arc data is actually not 1arc by 1arc but 2arc by 1arc, as soon as you are working with areas above 50° Latitude.
This causes the Tile() method to fail with the error:
dted.errors.InvalidFileError: Checksum failed for data block
When I try to ignore the checksum with load_data(perform_checksum=False), it fails with the error:
dted.errors.InvalidFileError: All data blocks within a DTED file must begin with 170. Found: 1
Do I just have to do something differently or is this something you could fix?
It works great otherwise!
Thank you for the help.
It'd be very useful to have a directory full of dted files, and be able to query the pool of tiles instead of checking each individual one. It could get fancy with loading tiles as needed, tracking frequency of use to free up older ones, etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.