PostGIS 3.7.0dev-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 525 of file raster2pgsql.py.

525def collect_pixel_types(ds, band_from, band_to):
526 """Collect pixel types of bands in requested range.
527 Use names of pixel types in format as returned
528 by rt_core function rt_pixtype_name()"""
529
530 pt =[]
531 for i in range(band_from, band_to):
532 band = ds.GetRasterBand(i)
533 pixel_type = gdt2pt(band.DataType)['name'][3:]
534 pt.append(pixel_type)
535
536 return pt
537