PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ calculate_overviews()

def raster2pgsql.calculate_overviews (   ds,
  band_from = None,
  band_to = None 
)

RASTER OPERATIONS.

Definition at line 478 of file raster2pgsql.py.

478 def calculate_overviews(ds, band_from = None, band_to = None):
479  assert ds is not None
480 
481  if band_from is None:
482  band_from = 0
483  if band_to is None:
484  band_to = ds.RasterCount
485 
486  assert band_to <= ds.RasterCount,'Failed checking band_to=%d <= RasterCount=%d' % (band_to,ds.RasterCount)
487  assert band_from <= band_to
488 
489  nov = 0
490  for i in range(band_from, band_to + 1):
491  n = ds.GetRasterBand(i).GetOverviewCount()
492  if 0 == nov:
493  nov = n
494  assert n == nov, 'Number of raster overviews is not the same for all bands'
495 
496  return nov
497 
def calculate_overviews(ds, band_from=None, band_to=None)
RASTER OPERATIONS.