How create a raster (or DEM) from 3D points?

Hello
I have 3D points from a city contain x,y,z and I want to create a rater from this points. it means I want to use Z as value of my raster. is there any suggestion or code for me to get good result?

回答 (1 件)

KSSV
KSSV 2020 年 4 月 24 日

0 投票

It depends how your data is scattered or gridded. Check the below two ways to plot your data.
%%structured
xi = unique(x) ; yi = unique(y) ;
[X,Y] = meshgrid(xi,yi) ;
Z = reshape(z,size(X)) ;
figure
surf(X,Y,Z)
%%unstructured
dt = delaunayTriangulation(x,y) ;
tri = dt.ConnectivityList ;
figure
trisurf(tri,x,y,z)
Also read about griddata, scatteredinterpolant.

質問済み:

2020 年 4 月 24 日

回答済み:

2020 年 4 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by