Skip to content

How to get point elevation #14

Closed
Closed

Description

@corcoranj0

I have some DEM data and I am able to follow the line elevation example however lets say I don't have a line but a single point I am trying to get the elevation for, how would I go about modifying the example to allow me to get elevation for a single point?

Activity

  1. xfischer commented on May 1, 2018

    @xfischer
    Member

    Hi @corcoranj0 ! Thanks for your interest. I’ll see what I can do. Note that if your point falls in between DEM grid, we could have undertermined result depending on the interpolation model.

  2. corcoranj0 commented on May 1, 2018

    @corcoranj0
    Author

    @xfischer Thanks so much for the response. To be honest the reason I need this is because I am trying to convert an old C++ project over to C#. It uses OpenCV to do all the calculations but I have been struggling with converting and finding all the native methods over the last couple weeks.

    Basically, I have a bunch of GeoTiff's. They contain an index file that contains some basic info that is also existent within the GeoTiff metadata. I have a point and I am trying to query the corresponding elevation.

    My Test Point is:
    Lat:39.713092
    Lon: -77.725708

    OpenCV gives me back: 208.937219023705

    I feel like I am really close to finding a good solution to this using what you have just need a little help.

  3. self-assigned this
    on May 1, 2018
  4. added a commit that references this issue on May 1, 2018
  5. xfischer commented on May 1, 2018

    @xfischer
    Member

    Hi again @corcoranj0.
    You can check in the sample app the PointDEMTest method, which gives us a nice elevation of 213.48992919921875 meters.
    Edit : please note that the 30m dataset was used for calculations.

  6. corcoranj0 commented on May 1, 2018

    @corcoranj0
    Author

    Thanks @xfischer I will give it a shot now!

  7. xfischer commented on May 1, 2018

    @xfischer
    Member

    This location is very close to runway threshold of airport http://155.178.201.160/d-tpp/1805/05114AD.PDF.
    Diagram says that elevation is at 703 feet -> 214.274 meters.

  8. corcoranj0 commented on May 1, 2018

    @corcoranj0
    Author

    @xfischer I pulled down the code I am just going to modify it to use the geoTiffs I have on my local machine since at the end of the day that is what the app needs to use.

  9. corcoranj0 commented on May 1, 2018

    @corcoranj0
    Author

    @xfischer I just tried it out and worked spectacularly! Thank you so much for putting that in there for me

  10. xfischer commented on May 1, 2018

    @xfischer
    Member

    Cool ! Good to see it’s useful ! Let me know if you have troubles (could get bad estimation near geotiff edges, but can handle adjacent geotiffs with some more work ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions