필터 지우기
필터 지우기

Plotting the density of latitude and longitude points as a heat map on geographic data

조회 수: 15 (최근 30일)
Hello, I have tried posting this elsewhere with no luck.
In continuation with my project for plotting lightning over the territory of Poland, I would like to plot the density of latitude and longitude points. So, areas which have more latitude & longitude points over the territory will have a different colour to areas with less latitude & longitude points. Currently I am able to plot latitude and longitude on a map; however, I would like the plots to have different colours depending on their density on this map:
https://imgur.com/a/OqcGq
I have tried many approaches but I have not found anything that works for my case.
I have tried creating a heatmap of points using the hist3 command; whilst this creates a heatmat with respect to density of points. It is a square grid and I cannot transpose this onto my map. I also tried downloading some functions from mathsworks such as this one: https://uk.mathworks.com/matlabcentral/fileexchange/8577-scatplot This is the closest I have gotten to somewhat plotting what I want: https://imgur.com/a/hn9uc using the command: scatplot(perun10_16.longitude, perun10_16.latitude, 'circles') Unfortunately, I do not know of a way to transfer this graph as spatial data onto my map of Poland using command: h = worldmap([48 57], [13 26]) % S = shaperead('POL_adm0.shp', 'UseGeoCoords', true); geoshow(h, S, 'Facecolor',[0.5 0.8 0.7])
% hold on
scatplot(perun10_16.latitude, perun10_16.longitude, 'circles')
% perun10_16.latitude and longitude represents the month of october, 2016.
I am aware that simply slapping on the scatplot function onto my map is not enough to get my idea working. If there was also a way to import a polygon outline of the map of Poland onto the figure I have created, that would also be acceptable; however, I am not sure how to do that either.
I hope this is enough information to know what I am doing. Does anyone have any suggestions as to what I should try now?
  댓글 수: 2
Joel Kuyper
Joel Kuyper 2020년 1월 9일
이동: Dyuman Joshi 2023년 10월 2일
I am curious whether or not you already fixed this.
j.d.kuyper@student.tudelft.nl
Rui
Rui 2022년 9월 9일
Hi,
try surfacem using the output from hist3. It should work just fine!

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

답변 (1개)

Sean de Wolski
Sean de Wolski 2020년 1월 9일
Look at geodensityplot
https://www.mathworks.com/help/releases/R2019b/matlab/ref/geodensityplot.html

카테고리

Help CenterFile Exchange에서 Map Display에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by