From 69b6aa6aca2503e426edb587c3754f055413cb50 Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Wed, 24 Feb 2016 13:59:25 -0500 Subject: [PATCH] cdb_union_adjacent documentation --- pg/doc/05_cdb_union_adjacent.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pg/doc/05_cdb_union_adjacent.md diff --git a/pg/doc/05_cdb_union_adjacent.md b/pg/doc/05_cdb_union_adjacent.md new file mode 100644 index 0000000..d471de0 --- /dev/null +++ b/pg/doc/05_cdb_union_adjacent.md @@ -0,0 +1,25 @@ +### Union Adjacent + +This is an aggregate function that will take a set of polygons and return a geometry array +of regions where the polygons are continuous. Basically it combines polygons +which are touching in to single polygons. + +It takes a single value: + +* `geometry` a list of geometries to be clustered and joined + +and returns + +* `geometry[]` an array of the joined geometries. + +An example usage would be something like: + +```postgresql + with joined_polygons as ( + select cdb_union_adjacent(the_geom) regions from some_table + ) + select unnest(region) the_geom from joined_polygons +``` + +which will produce a table with regions of continuous polygons from the original +table.