Skip to main content
100%

Rasters to polygons for CartoDB

✓ Published0🌍 Public
Aandrewxhill
Last edited Sep 11, 2012
Created on Sep 11, 2012

A PostGIS workflow converts nightly satellite raster data into vector polygons for display in CartoDB. The SQL first uses `ST_MapAlgebraExpr` to reclassify raster band values into discrete categories, then `ST_DumpAsPolygons` extracts each distinct value region as a geometry, wrapping results with `ST_MakeValid` and `ST_Multi`. The resulting polygons, along with their original raster values, are inserted into a new `light_polygons` table with a `band` column, enabling efficient cartographic rendering of classified light intensity zones.

AI-generated description

Similar vizzes