[postgis-users] X() function working for POINTs and MULTIPOINTs

Markus Schaber schabi at logix-tt.com
Fri Mar 24 06:45:25 PST 2006

Hi, Bernhard,

Bernhard Reimar Hoefle wrote:

> The PostGIS x() function does not support MULTIPOINTs and the geometryN() does
> not support POINTs.
> select x('MULTIPOINT(1 1 1,2 2 2)'::GEOMETRY);
> ERROR:  Argument to X() must be a point
> ERROR:  Argument to X() must be a point

You might want to write your own set returning plpgsql function. This
way, it is even possible that select your_x('MULTIPOINT(...)') returns
two rows, 1 and 2.


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