/ Published in: SQL

**Important: this snipplet has moved to Github.**
- [Bounding box of a MULTIPOLYGON column in PostGIS](https://gist.github.com/1973043)
- [Bounding box of a MULTIPOLYGON column in PostGIS](https://gist.github.com/1973043)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
-- If `polygons` is a column containing multipolygons, this returns one row per polygon. SELECT id AS id, ST_Box2D((ST_Dump(polygons)).geom) AS bbox FROM mytable WHERE polygons IS NOT NULL;
Comments
