HI Mike,

it work very well.

So I reached my scope.

I used this sql:

INSERT INTO public.<table_name multipoint> (id,idrtt,geom) (
    select
        c.id,
        c.idrtt,
        st_union(c.geom)
    from (
                select
                        a.id as id,
                        a.idrtt as idrtt,
                        (ST_DumpPoints(a.geom)).* as geom
                from
                        public.<table_name linestring> as a
    ) as c
    group by
        c.id,
        c.idrtt
);


Regards,

Andrea.

>If you have PostGIS 1.5, then you can use ST_DumpPoints:
>http://postgis.refractions.net/docs/ST_DumpPoints.html 
><http://postgis.refractions.net/docs/ST_DumpPoints.html>
>
>E.g.:
>
>SELECT gid, ST_AsText(ST_Collect(ST_AsText(geom)))
>FROM (
>  SELECT gid, (ST_DumpPoints(g.geom)).*
>  FROM
>    (SELECT 1 as gid, 'LINESTRING (0 0, 0 3, 3 4)'::geometry AS geom
>     UNION ALL
>     SELECT 2 as gid, 'LINESTRING (1 1, 2 6, 7 7)'::geometry AS geom) AS g
>  ) j
>GROUP BY gid;
>
>-Mike



-- 
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to