Coder Social home page Coder Social logo

dted's People

Contributors

amclauth avatar bbonenfant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dted's Issues

Error in calculating latitude and longitude indices

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)
        )

Areas above 50° or below -50° Latitude

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.

Import Error

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!

Query a DTED Directory instead of a specific File

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.