Extract spatial data using shp file as a mask
이전 댓글 표시
I'm new in matlab
So I tried to extract pixel data from a modis bands image with point as a central for 5x5 box.
So the 5x5 box will be filled with modis image's pixel.

I already did it in qgis, but it failed.
The yellow dot contains lattitude, longitude and target data.
Is there any refrence to do this? I already read some examples, but they are only using the box (shp file) to fill it.
For future works, I want to generate 4D data [n,x,y,t]
n = for band's modis image
x,y = box
t = data target
댓글 수: 6
yanqi liu
2021년 12월 19일
yes,sir,which is the image process target? get the yellow point location?
Image Analyst
2021년 12월 19일
What is qgis, and did you do it there? Or did it fail there?
What/where exactly is "the box"? Is it the rectangular region where the 4 yellow dots define the corners?
I'm not sure what n is. Is this image not gray scale but maybe multispectral with several wavelength bands?
I don't know what t (the "data target") is. Is it the gray level?
I don't know what the 4-D data would be. So, let's say n=1, x=2, y=55, and t = 163. What would the value at your output array output(1, 2, 55, 163) represent? What goes into that location of the 4-D array?
Fadhurrahman
2021년 12월 20일
편집: Fadhurrahman
2021년 12월 20일
Walter Roberson
2021년 12월 20일
Depending on the details of your situation, the code at https://www.mathworks.com/matlabcentral/answers/1608670-how-to-process-nc-file-in-matlab#comment_1890080 might help.
Fadhurrahman
2021년 12월 20일
Fadhurrahman
2021년 12월 23일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Geographic Coordinate Reference Systems에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!