How create a raster (or DEM) from 3D points?
Show older comments
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?
Answers (1)
KSSV
on 24 Apr 2020
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.
Categories
Find more on Map Display in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!