Skip to main content
added 44 characters in body
Source Link
Antonio Falciano
  • 14.5k
  • 2
  • 38
  • 68

AFAIK raster data can be read in three ways:

  • by cell (inefficient);
  • by image (quite efficient);
  • by blocks (the most efficient way).

Without reinventing the wheel, I suggest to read these enlightening slides of Chris Garrard.

So the most efficient method is read data by block, however this would cause a data loss in correspondence of pixels located over the block boundaries while applying the filter. So a safe alternative way consistsshould consist into reading the entire image at once and using the numpy approach.

On the computational side, instead, I should use gdalfilter.py and implicitly the VRT KernelFilteredSource approach in order to apply the needed filters and, above all, avoid heavy calculations.

AFAIK raster data can be read in three ways:

  • by cell (inefficient);
  • by image (quite efficient);
  • by blocks (the most efficient way).

Without reinventing the wheel, I suggest to read these enlightening slides of Chris Garrard.

So the most efficient method is read data by block, however this would cause a data loss in correspondence of pixels located over the block boundaries while applying the filter. So a safe alternative way consists into reading the entire image at once.

On the computational side, I should use gdalfilter.py and implicitly the VRT KernelFilteredSource approach in order to apply the needed filters and, above all, avoid heavy calculations.

AFAIK raster data can be read in three ways:

  • by cell (inefficient);
  • by image (quite efficient);
  • by blocks (the most efficient way).

Without reinventing the wheel, I suggest to read these enlightening slides of Chris Garrard.

So the most efficient method is read data by block, however this would cause a data loss in correspondence of pixels located over the block boundaries while applying the filter. So a safe alternative way should consist into reading the entire image at once and using the numpy approach.

On the computational side, instead, I should use gdalfilter.py and implicitly the VRT KernelFilteredSource approach in order to apply the needed filters and, above all, avoid heavy calculations.

Source Link
Antonio Falciano
  • 14.5k
  • 2
  • 38
  • 68

AFAIK raster data can be read in three ways:

  • by cell (inefficient);
  • by image (quite efficient);
  • by blocks (the most efficient way).

Without reinventing the wheel, I suggest to read these enlightening slides of Chris Garrard.

So the most efficient method is read data by block, however this would cause a data loss in correspondence of pixels located over the block boundaries while applying the filter. So a safe alternative way consists into reading the entire image at once.

On the computational side, I should use gdalfilter.py and implicitly the VRT KernelFilteredSource approach in order to apply the needed filters and, above all, avoid heavy calculations.

Post Made Community Wiki by Antonio Falciano