RS_FromGDALRaster¶
Decodes a GDAL-readable raster (e.g. a GeoTIFF) from binary content into an in-database raster.
Usage¶
raster RS_FromGDALRaster(content: binary)
Arguments¶
- content (binary): Raster file bytes in any format GDAL can read (GeoTIFF, PNG, …). A NULL input yields a NULL raster.
Description¶
RS_FromGDALRaster parses raster file bytes with GDAL and returns an
in-database raster with all band data materialised inline — the inverse
of RS_AsGeoTiff, and the binary counterpart of
RS_FromPath (which references a file on disk as an
out-db raster instead). A NULL input yields a NULL raster.
It is typically applied to a binary column holding encoded rasters — for
example rasters produced by RS_AsGeoTiff, which round-trips back
through RS_FromGDALRaster:
SELECT RS_Width(RS_FromGDALRaster(RS_AsGeoTiff(RS_Example())));
┌─────────────────────────────────────────────────────────┐
│ rs_width(rs_fromgdalraster(rs_asgeotiff(rs_example()))) │
│ int64 │
╞═════════════════════════════════════════════════════════╡
│ 64 │
└─────────────────────────────────────────────────────────┘