[postgis-users] Re: Aggregate?
Laurence Rowe
l at lrowe.co.uk
Thu Mar 1 12:28:45 PST 2007
Something like:
SELECT name, collect(the_geom)) AS the_geom,
FROM constituencies
GROUP BY constituencies.name;
Works for me. Use collect(geometryn(the_geom, 1)) id your data is
specified as singular multigeometries.
Laurence
Stephen Crawford wrote:
> All,
>
> I have a postGIS feature data set of the ranges of species, with many
> separate records for each species name. I would like to aggregate these
> into a table with one multi-poly feauture for each species. Should I use
> Collect() for this task? And could somebody give me quick example?
>
> Thanks,
> Steve
>
> Stephen Crawford
> Center for Environmental Informatics
> GeoVISTA Center
> The Pennsylvania State University
> 814.865.9905
> src176 at psu.edu
More information about the postgis-users
mailing list