[postgis-users] MULTIPOINT" to "POINT"
Kevin Neufeld
kneufeld at refractions.net
Wed Nov 17 11:05:33 PST 2010
http://postgis.refractions.net/docs/ST_Dump.html
CREATE TABLE multipoint_table (the_geom geometry);
INSERT INTO multipoint_table VALUES ('MULTIPOINT((0 0), (1 1))');
INSERT INTO multipoint_table VALUES ('MULTIPOINT((2 2))');
CREATE TABLE point_table AS
SELECT (ST_Dump(the_geom)).geom AS the_geom
FROM multipoint_table;
ALTER TABLE point_table ADD id serial;
SELECT id, astext(the_geom)
FROM point_table;
id | astext
----+------------
1 | POINT(0 0)
2 | POINT(1 1)
3 | POINT(2 2)
(3 rows)
-- Kevin
On 11/17/2010 10:36 AM, ahmet temiz wrote:
> hello
>
> how can I convert "MULTIPOINT" to "POINT" with distinct id ?
>
> regards
>
More information about the postgis-users
mailing list