{"version":"1.0","type":"rich","title":"Gist 1353003","description":"This example demonstrates a spatial SQL query that computes raster statistics for a custom polygon region. It uses PostGIS functions to sum pixel values, count pixels, and calculate the average value across a 10x10 grid of sub-pixels within each raster tile. The query filters raster tiles intersecting the target polygon and then intersects translated grid cells against the same polygon. The code relies on `ST_Value`, `ST_Intersects`, `ST_Translate`, `ST_MakeEnvelope`, and `generate_series` to perform the analysis, extracting data from the `carbon_query_test_s` table.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-1353003?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}