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!