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!