How to find all the pixels of a finer grid contained in a pixel of a coarser grid?
1 view (last 30 days)
Show older comments
I have two georeferenced datasets, each one represented by a matrix of values (the albedo of a given pixel) and a MapCellsReference Object describing the grid geometry. One of these has a much coarser spatial resolution (on a map each "pixel" in the matrix is 500 m wide and 500 m tall) and the other one a very fine spatial resolution (on a map each "pixel" is 1 m wide and 1 m tall).
Is there a way to find, per each pixel of the coarser matrix, which pixels of the finer matrix fall within the spatial boundaries of the former (i.e.: per each i,j of the coarser matrix find all the k,q of the finer matrix contained within the width and height of the coarse pixel) using the MapCellsReference Object?
At the moment my idea is to:
- construct longitude and latitude vectors for both datasets using the WorldLimits and the raster size
- loop over each coarse pixel and find all the pixels of the finer matrix that are within a spatial radius of 250 m from the coarse pixel centroid using the vectors of point 1.
That's quite inefficient, though, especially for large datasets, so I was wondering if there was something more efficient working directly with the MapCellsReference Objects. Is there?
0 Comments
Answers (0)
See Also
Categories
Find more on Geographic Coordinate Reference Systems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!