Search Shortcut cmd + k | ctrl + k
s2raster

S2 geography + GeoTIFF raster for DuckDB — cell covering, pixel read, stats, histogram

Maintainer(s): alitrack

Installing and Loading

INSTALL s2raster FROM community;
LOAD s2raster;

Example

-- S2 cell covering from WKT
SELECT * FROM s2_covering('POLYGON((30 10, 40 40, 20 40, 10 20, 30 10))', 10, 15);

-- Read raster pixel value
SELECT rs_value('dem.tif', 1, 100, 200);

About s2raster

s2raster — S2 Geometry + GeoTIFF for DuckDB

Pure Rust, zero system dependencies.

37 Functions:

Category Count Examples
S2 Scalar 11 s2_cell_id, s2_contains, s2_distance_meters, s2_area_m2
S2 Table 4 s2_covering, s2_children, s2_cell_neighbors
CellUnion 4 s2_cell_union_pack, s2_cell_union_contains
Raster Scalar 15 rs_value, rs_pixel_to_world, rs_world_to_pixel, rs_stats
Raster Table 3 rs_metadata, rs_stats, rs_histogram

Platforms: Linux x64, macOS arm64/x64, Windows x64 (MSVC). Install: INSTALL s2raster FROM community;

Added Functions

This extension does not add any functions.

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.