PostGIS 3.0.6dev-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 517 of file raster2pgsql.py.

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