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!