[postgis-users] multipoint geometry >> multiple resultset

Markus Schaber schabi at logix-tt.com
Thu Apr 20 04:08:19 PDT 2006


Hi, Christo,

Christo Du Preez wrote:

> Is there a way to return multiple records querying a single record with
> a multipoint geometry? In other words, I'd like to return a row for each
> point in the multipoint geometry.

Yes, there is. Try something like:

SELECT GeometryN(the_geom,generate_series(1,numGeometries(the_geom)))
FROM table;

HTH,
Markus
-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org



More information about the postgis-users mailing list