How to find the elevation of a line?

I have a line whose x and y coordinates are known. the line is been drawn within the x_constraint = [0,60] and similarly y_constraints = [0,40]. I also have an elevation data in a separate file of size [60 X 40]. Now i want to combine both the files and know the elevation of the line at the simultaneous coordinate. Is there a possible way of achieving it?
Thanks in advance for your replies.

댓글 수: 1

Geoff Hayes
Geoff Hayes 2015년 7월 4일
Sushma - how is the data formatted in the first file? Is it a 60x40 array too?

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

답변 (1개)

Image Analyst
Image Analyst 2015년 7월 4일

0 개 추천

Yes, you can simply use improfile() to extract the elevation along the line.
numSamples = round(sqrt(diff(xi).^2 + diff(yi).^2));
[cx, cy, elevations] = improfile(elevationImage, xi, yi, numSamples)

댓글 수: 1

SUSHMA MB
SUSHMA MB 2015년 7월 6일
elevations represents elevation data, but what is elevationImage?

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

카테고리

도움말 센터File Exchange에서 Geoscience에 대해 자세히 알아보기

태그

질문:

2015년 7월 3일

댓글:

2015년 7월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by