Conversion of a vector file into raster

조회 수: 3 (최근 30일)
Álvaro Pardo
Álvaro Pardo 2020년 5월 27일
댓글: KSSV 2020년 5월 28일
Hello,
I have a 3 column matrix containing respectively the X, Y and Z coordinates of a riverbed topography. The coordinates are in the CH1903/LV03 geographic coordinate system. I wish to convert this data set into a raster of a 0.5x0.5m cell. The location of the points defining the rivebed is irregular, so I will need to go from this to a square grid in order to be able to map the Z values within the referencing matrix. Can anyone help me on this? Thanks!
Álvaro

채택된 답변

KSSV
KSSV 2020년 5월 27일
Let x,y,z be your column data.
xi = min(x):0.5:max(x) ;
yi = min(y):0.5:max(y) ;
[X,Y] = meshgrid(xi,yi) ;
Z = griddata(x,y,z,X,Y) ;
pcolor(X,Y,Z) ;
shading interp ;
colorbar
  댓글 수: 6
Álvaro Pardo
Álvaro Pardo 2020년 5월 28일
But it doesn't work to clip a polygon. You can't select only those pixels within an specified polygon. So it isn't targeted for my problem.
KSSV
KSSV 2020년 5월 28일
It canbe very much done..show me what have you tried so far.

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by