path elevation profile

조회 수: 17 (최근 30일)
Eric
Eric 2012년 2월 2일
답변: omid zandi 2021년 4월 25일
Hi,
Given two xy coords on an elevation map (xyz format), is there a function to generate the path elevation profile between these two points?
The function would have to interpolate between grid points..it would also be nice to be able to specify spacing betweem elevation points.
Thanks in advance!
eric

답변 (4개)

omid zandi
omid zandi 2021년 4월 25일
Hi
Despite about 8 years delay, it is worth saying that TopoToolbox has provided this feature in demprofile function which works perfect.

Kyle Jones
Kyle Jones 2012년 2월 7일
Eric, Have you found any help with this. I need the exact same thing as you. I have a grid of 1 arcsecond SRTM elevation data. I created an equally spaced grid and I need to find an elevation profile between two points (not necessarily on the grid). I would be happy to team up with you and share anything I find if you will do the same. I'm really stuck on this.....
Thanks, Kyle
  댓글 수: 1
Eric
Eric 2012년 2월 8일
when you say "not necessarily on the grid", you mean outside or inside but between grid points ?
If it's inside between grid points, I figured out a way to do it. Basically you find the equation between your 2 pts (y=ax+b), then you decide of a deltaX, and plug this deltaX in your linear equation, you will find the corresponding Y point. This will be give a series of XY coordinate on the line between your 2 pts, then you use the function griddata() to interpolate your Z (elevation) corresponding to your new XY coords (elevation) from you original data set.
You will end up with XYZ coordinates of the points on your line.

댓글을 달려면 로그인하십시오.


Wolfgang Schwanghart
Wolfgang Schwanghart 2012년 2월 10일
Hi, if you have the image processing toolbox, the function improfile should do what you ask for. http://www.mathworks.de/help/toolbox/images/ref/improfile.html
Best regards, Wolfgang

Rob Comer
Rob Comer 2012년 2월 15일
And there's mapprofile in Mapping Toolbox.
  댓글 수: 1
Albert Gesualdi
Albert Gesualdi 2021년 2월 17일
I have been tring to use mapprofile to generate a elevation profile along a line in a geotiff file i uploaded with readgeoraster and I cannot get it to work any idea why?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by