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.
0 件のコメント
回答 (1 件)
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!!
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!