PostGIS: Bounding box of a MultiPolygon column

/ Published in: SQL
Save to your folder(s)

**Important: this snipplet has moved to Github.**

- [Bounding box of a MULTIPOLYGON column in PostGIS](

Copy this code and paste it in your HTML
  1. -- If `polygons` is a column containing multipolygons, this returns one row per polygon.
  3. SELECT id AS id, ST_Box2D((ST_Dump(polygons)).geom) AS bbox FROM mytable WHERE polygons IS NOT NULL;

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.