Effacer les filtres
Effacer les filtres

How to find all the pixels of a finer grid contained in a pixel of a coarser grid?

1 vue (au cours des 30 derniers jours)
Federico
Federico le 20 Sep 2022
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:
  1. construct longitude and latitude vectors for both datasets using the WorldLimits and the raster size
  2. 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?

Réponses (0)

Catégories

En savoir plus sur Geographic Plots dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by