필터 지우기
필터 지우기

How to create a chloropleth map from a given raster array and Lat Lon meshgrid arrays?

조회 수: 1 (최근 30일)
I have a raster array (R), a shapefile (District_Boundaries.zip), and lat lon meshgrid arrays (LatGrid.mat and LonGrid.mat). How to create a chloropleth map out of the mean for the given sub regions of the shapefile? I have attached all the files with this question.
The raster array is:
R=rand([604 584]);
Kindly help me with it.

답변 (1개)

Shubham
Shubham 2023년 9월 20일
I understand that you want to plot a Choropleth map out of the dataset that you have provided.
I was not able to use readgeotable function for reading the shapefile as used in the documentation for plotting the chloropleth map. The dataset does not have geopolyshape present. However, the list of coordinates provided can be used to plot.
Please refer to the following code snippet:
% Read the shapefile
districts = shaperead('District_Boundaries.shp');
% Plot the districts
for i = 1:length(districts)
geoplot(districts(i).Y,districts(i).X,'-*')
hold on
end
The code produced the following output:
The subregions provided in the dataset are plotted as shown in the figure.
You may also try converting the shape into geopolyshape in the dataset.
Please refer to the following as well:
Hope this helps!!

카테고리

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

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by