Arrange data according to geographic regions I have set

조회 수: 1 (최근 30일)
Arielle Patapanian
Arielle Patapanian 2020년 6월 15일
댓글: Arielle Patapanian 2020년 6월 26일
Hi everyone,
I have rainfall data across Australia which I am trying to organise into geographic regions.
I have defined the geographic regions on QGIS and have created a shapefile. I then have an array on MATLAB where the rows/columns represent latitude and longitude and the values represents the precipitation data.
I am unsure how to use the shapefile to separate this precipitation data into the regions I created on the shapefile.
Any help would be greatly appreciated thank you!

채택된 답변

KSSV
KSSV 2020년 6월 15일
  1. You can load/ read the shapefile using shaperead.
  2. You can seperate the required region from a grid using inpolygon.
  3. You can plot the surface using pcolor/ surf.
  4. You can use inteprolation using interp2.
Refer this if you want to seperate different regions of shape file from given arrays.
  댓글 수: 5
KSSV
KSSV 2020년 6월 26일
S = shaperead(shapefile) ;
N = length(S);
for i = 1:N
R = [S(i).X S(i).Y] ; % this is ith polygon
end
Arielle Patapanian
Arielle Patapanian 2020년 6월 26일
Thank you so much!!! Absolute life saver :D

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geographic Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by