Coder Social home page Coder Social logo

Comments (10)

StefanBregenzer avatar StefanBregenzer commented on July 21, 2024 1

Thank you for the explanation
Guess I just remembered it wrong

from dted.

bbonenfant avatar bbonenfant commented on July 21, 2024

Thanks for the bug report! I was able to reproduce this and hopefully fix it. If you are able, could you test that you are now able to parse these DTED file using the code on branch rectangular_resolution_tiles?

from dted.

StefanBregenzer avatar StefanBregenzer commented on July 21, 2024

It works now!
Thank you so much

from dted.

StefanBregenzer avatar StefanBregenzer commented on July 21, 2024

Just found one more bug now.
If I try get_elevation() with a longitude decimal bigger than .5 it gives me an index out of bounds error.

from dted.

StefanBregenzer avatar StefanBregenzer commented on July 21, 2024

The tile.data.shape is now (1801, 3601). I think it should be (3601, 1801) since its (longitude, latitude) and the latitude only has half the information. Right?

from dted.

bbonenfant avatar bbonenfant commented on July 21, 2024

Ah yes, sorry about that. I tried to get the fix out quickly before going on vacation. I'll spend some more time ironing everything out. I appreciate the patience!

from dted.

bbonenfant avatar bbonenfant commented on July 21, 2024

I believe I've found the root cause of the bug and addressed it. If possible please try the new changes that I pushed to the rectangular_resolution_tiles branch to confirm and then I'll cut a new release

from dted.

StefanBregenzer avatar StefanBregenzer commented on July 21, 2024

Seems to be working now
Thank you

from dted.

StefanBregenzer avatar StefanBregenzer commented on July 21, 2024

I'm sorry to bother you again...
The shape of the data array is still (1801,3601).
This is wrong in my understanding, since the latitude has half the information and the data shape resembles (long,lat).
Am I wrong?

from dted.

bbonenfant avatar bbonenfant commented on July 21, 2024

The documentation at the USGS website is a little ambiguous, but I believe that the longitudinal resolution of these files is 2 arc-seconds. Using this DTED file as an example, the shape of the data is encoded as 1801 longitudinal records containing 3601 data points. Additionally that file specifies the latitudinal and longitudinal resolutions are 1 and 2 arc-seconds, respectively.

You can inspect the file directly to see the resolution with a command like the following:

> hexdump -C -s353 -n8 <dted-file>
00000161  30 30 31 30 30 30 32 30                           |00100020|
00000169

where 0010 is the latitudinal resolution in tenths of an arc-second (1 arc-second) and 0020 is the longitudinal resolution in tenths of an arc-second (2 arc-second).

You can similarly inspect the shape of the DTED data with:

hexdump -C -s361 -n8 <dted-file>
00000169  33 36 30 31 31 38 30 31                           |36011801|
00000171

where the first four digits are the number of latitudinal lines (3601) and the second four digits for longitude (1801). The initial bug you reported was caused by these numbers were being switched within the library.

I do see that the resolution is of the file is incorrectly being reported by the CLI when inspecting a DTED, so I will fix that. Feel free to reach out again with any more question and report any more bugs you find!

from dted.

Related Issues (4)

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.