From: Markus Schaber Date: Fri, 24 Mar 2006 15:45:25 +0100 Subject: [postgis-users] X() function working for POINTs and MULTIPOINTs In-Reply-To: <1142871193.441ed4991a425@web-mail2.uibk.ac.at> References: <1142871193.441ed4991a425@web-mail2.uibk.ac.at> Message-ID: <44240605.4020902@logix-tt.com> 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. HTH, Schabi -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org