Raster analytics on Raquet files with QUADBIN spatial indexing, raster ingestion, and PostGIS-style functions
Maintainer(s):
jatorre
Installing and Loading
INSTALL raquet FROM community;
LOAD raquet;
Example
-- Load extension and query a raster file
LOAD raquet;
-- Read a raquet file and get pixel value at a location
SELECT ST_RasterValue(block, band_1, ST_Point(-73.98, 40.75), metadata) AS elevation
FROM read_raquet_at('dem.parquet', -73.98, 40.75);
-- Tile statistics
SELECT block,
(ST_RasterSummaryStats(band_1, metadata)).mean AS avg_value
FROM read_raquet('dem.parquet')
LIMIT 5;
About raquet
Raquet is a specification by CARTO for storing raster data in Apache Parquet format with QUADBIN spatial indexing. This extension enables DuckDB to query Raquet files directly using SQL.
Features:
- PostGIS-style raster functions (ST_RasterValue, ST_RasterSummaryStats, ST_RegionStats)
- QUADBIN spatial indexing functions (polyfill, kring, parent/children)
- Raster ingestion from GeoTIFF/NetCDF via read_raster() (requires GDAL, optional)
- Band math operations (ST_NormalizedDifference, ST_BandMath)
- Raster clipping (ST_Clip, ST_ClipMask)
- Metadata validation (raquet_validate_metadata)
- Time-series support with CF conventions (NetCDF compatible)
- Cloud-native queries with predicate pushdown (S3/GCS)
- Native DuckDB GEOMETRY type support
Note: The read_raster() function requires GDAL and is only available when built with GDAL support. All other functions work without GDAL.
Links:
Added Functions
| function_name | function_type | description | comment | examples |
|---|---|---|---|---|
| QUADBIN_POLYFILL | scalar | NULL | NULL | |
| ST_Band | scalar | NULL | NULL | |
| ST_BandMath | scalar | NULL | NULL | |
| ST_Clip | scalar | NULL | NULL | |
| ST_ClipMask | scalar | NULL | NULL | |
| ST_Contains | scalar | NULL | NULL | |
| ST_GeomFromQuadbin | scalar | NULL | NULL | |
| ST_Intersects | scalar | NULL | NULL | |
| ST_NormalizedDifference | scalar | NULL | NULL | |
| ST_NormalizedDifferenceStats | scalar | NULL | NULL | |
| ST_Point | scalar | NULL | NULL | |
| ST_Raster | table_macro | NULL | NULL | |
| ST_RasterAt | table_macro | NULL | NULL | |
| ST_RasterSummaryStats | scalar | NULL | NULL | |
| ST_RasterValue | scalar | NULL | NULL | |
| ST_RegionStats | aggregate | NULL | NULL | |
| ST_X | scalar | NULL | NULL | |
| ST_Y | scalar | NULL | NULL | |
| quadbin_from_lonlat | scalar | NULL | NULL | |
| quadbin_from_tile | scalar | NULL | NULL | |
| quadbin_kring | scalar | NULL | NULL | |
| quadbin_pixel_xy | scalar | NULL | NULL | |
| quadbin_resolution | scalar | NULL | NULL | |
| quadbin_sibling | scalar | NULL | NULL | |
| quadbin_to_bbox | scalar | NULL | NULL | |
| quadbin_to_children | scalar | NULL | NULL | |
| quadbin_to_geojson | scalar | NULL | NULL | |
| quadbin_to_lonlat | scalar | NULL | NULL | |
| quadbin_to_parent | scalar | NULL | NULL | |
| quadbin_to_tile | scalar | NULL | NULL | |
| quadbin_to_wkt | scalar | NULL | NULL | |
| raquet_decode_band | scalar | NULL | NULL | |
| raquet_parse_metadata | scalar | NULL | NULL | |
| raquet_pixel | scalar | NULL | NULL | |
| raquet_pixel_interleaved | scalar | NULL | NULL | |
| raquet_validate_metadata | scalar | NULL | NULL | |
| read_raquet | table_macro | NULL | NULL | |
| read_raquet_at | table_macro | NULL | NULL | |
| read_raquet_metadata | table_macro | NULL | NULL | |
| read_raster | table | NULL | NULL |
Overloaded Functions
This extension does not add any function overloads.
Added Types
This extension does not add any types.
Added Settings
This extension does not add any settings.