Plot 3d points in a map

조회 수: 59 (최근 30일)
Martin
Martin 2024년 2월 8일
댓글: Mathieu NOE 2024년 2월 8일
Hi,
I have geographical measurements from an aircraft with latitude, longitude and height coordinates. How can I display the measurements on a map as points three dimensionall where the color of the points change according to the measured value, e.g. temperature?
I have tried using geoplot3 which nicely displays the track of the aircraft. However, this function doesn't seem to allow for point plotting and changing the color according to the measured value. Geoscatter looks like an option but this only seems to work for 2D.
Any help is appreciated.

답변 (1개)

Mathieu NOE
Mathieu NOE 2024년 2월 8일
hello
not an user an neither an expert of geoplot and alike , but maybe this helps
x = [47 50 55 61]; % lat
y = [-122 -132 -140 -149]; % lon
z = [0 170 200 50]; % altitude
h = geoplot(x,y,'-*k');
h.ZData = z; % so now altitude also appears when you click on the point
% modify color of line (edge) according to altitude
N = 256; % color levels
caxis([0 N]);
cd = colormap(parula(N+1));
tmp = linspace(min(z),max(z),N+1); % interp z altitude
cd = interp1(tmp,cd,z); % map color to z values
cd = uint8(cd'*255); % need a 4xN uint8 array
cd(4,:) = 255; % last column is transparency
cbv=colorbar('v');
ind = (0:32:N);
set(cbv,'YTick',ind,'TickLabels',cellstr(num2str(tmp(ind+1)')))
drawnow
set(h.Edge,'ColorBinding','interpolated','ColorData',cd)
  댓글 수: 2
Martin
Martin 2024년 2월 8일
편집: Martin 2024년 2월 8일
Thank you, however I am aiming at the 3D view. With geoplot3 I plotted the track in this way:
I wonder if there is a way to replace the line of the track with points that change color according to the measured value?
Mathieu NOE
Mathieu NOE 2024년 2월 8일
I don't have the Map Tbx, so I wont be able to try my idea on geoplot3, but you can probably do it on your side

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

카테고리

Help CenterFile Exchange에서 Geographic Plots에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by