Skip to main content

to_pgraster

Convert a GDALRaster into PostGIS Raster format.

def to_pgraster(
rast: GDALRaster
) - > bytes

Convert a GDALRaster into PostGIS Raster format.

Parameters

NameTypeDescription
rastGDALRasterThe GDALRaster object to be converted into a PostGIS-compatible byte stream.

Returns

TypeDescription
bytesA binary string representing the raster in PostGIS WKB format, including the header, band headers, and pixel data.