PostGIS 3.6.2dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ collect_pixel_types()

raster2pgsql.collect_pixel_types (   ds,
  band_from,
  band_to 
)
Collect pixel types of bands in requested range.
   Use names of pixel types in format as returned
   by rt_core function rt_pixtype_name()

Definition at line 518 of file raster2pgsql.py.

518def collect_pixel_types(ds, band_from, band_to):
519 """Collect pixel types of bands in requested range.
520 Use names of pixel types in format as returned
521 by rt_core function rt_pixtype_name()"""
522
523 pt =[]
524 for i in range(band_from, band_to):
525 band = ds.GetRasterBand(i)
526 pixel_type = gdt2pt(band.DataType)['name'][3:]
527 pt.append(pixel_type)
528
529 return pt
530