Plot 3d points in a map

63 ビュー (過去 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 Center および File ExchangeGeographic Plots についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by