Raster Data Wrapper Reference

Raster HeavyConnect is currently a beta feature. The options and interface are liable to change in future releases to better streamline and optimize the raster representation process.

When creating a HeavyConnect table with the Raster Data Wrapper, the columns must be specified based on the contents of the raster file (if unknown, contents can be obtained using our detection process). If using a non-auto RASTER_POINT_TRANSFORM option, the column types must correspond to the expected transformation result type.

Examples

  1. Create a foreign table from a raster file with one band. Tile size is determined by the raster file.

CREATE FOREIGN TABLE raster_table (x DOUBLE, y DOUBLE, band_1 INTEGER) SERVER default_local_raster WITH (file_path='<path>');
  1. Create a foreign table from a raster file with one band and specify the tile size. This will group the data into 128x128 blocks to better optimize data access.

CREATE FOREIGN TABLE raster_table (x DOUBLE, y DOUBLE, band_1 INTEGER) SERVER default_local_raster WITH (file_path='<path>', raster_tile_width=128, raster_tile_height=128)
  1. Create a foreign table from a raster file with multiple bands.

CREATE FOREIGN TABLE raster_table (x DOUBLE, y DOUBLE, band_1 INTEGER, band_2 FLOAT) SERVER default_local_raster WITH (file_path='<path>')
  1. Create a foreign table from a raster file only selecting band_2 from the file.

CREATE FOREIGN TABLE raster_table (x DOUBLE, y DOUBLE, band FLOAT) SERVER default_local_raster WITH (file_path='<path>', raster_filter_bands='band=band_2')
  1. Create a foreign table from a raster file with no point transform.

CREATE FOREIGN TABLE raster_table (x SMALLINT, y SMALLINT, band FLOAT) SERVER default_local_raster WITH (file_path='<path>', raster_point_transform='none')

Last updated