On 4/19/2011 8:52 AM, Gis Mage wrote:
>* Hello list!*>**>* I've got a table in PostGIS with the_geom field with 2
>dimensions.*>* I wonder how can I add a z dimension and fill it up with values
>from*>* attribute field elev (its type is integer) ?*
Hi,
I think you can start from this query .
It dump a geometry in its points. Force in 3D and and add a random value to
it.
select
id,
ST_Translate(ST_Force_3D(b.geom),0.0,0.0,(mod (ST_X(geom)::integer,
100)::numeric)+(random()*10)) as geom
from (
select
a.id as id,
(ST_DumpPoints(a.geom)).* as geom
from
table_2d as a
)
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users