or should be 3 in my table! Bingo! after running: "select st_ndims(st_convexhull(st_collect(geom)) from splitbeam_point;" I got 3 instead of 2, so I put this3 into my table and ready! that did the trick. Now I'm wondering why this has to be 3, I mean, this is a 2D polygon, I think I'll realize that after keeping reading.
Thanks again Sandro, you were very helpful, Cheers, Gery > Date: Thu, 20 Oct 2011 11:53:27 +0200 > From: s...@keybit.net > To: gameji...@hotmail.com > CC: postgis-users@postgis.refractions.net > Subject: Re: [postgis-users] FW: Support in ST_ConvexHull syntax > > On Thu, Oct 20, 2011 at 09:26:48AM +0000, Gery . wrote: > > > mop=# \d unaprueba > > Table "public.unaprueba" > > Column | Type | Modifiers > > --------+----------+----------- > > id | smallint | > > geom | geometry | > > Indexes: > > "unaprueba_geom" gist (geom) > > Check constraints: > > "enforce_dims_geom" CHECK (st_ndims(geom) = 2) > > "enforce_geotype_geom" CHECK (geometrytype(geom) = 'POLYGON'::text OR > > geom IS NULL) > > "enforce_srid_geom" CHECK (st_srid(geom) = 4326) > > ... > > > mop=# insert into unaprueba (geom) SELECT st_convexhull(st_collect(geom)) > > as geom FROM splitbeam_point ; > > ERROR: new row for relation "unaprueba" violates check constraint > > "enforce_dims_geom" > > > > where could be the problem? > > << The new row violates check constraint "enforce_dims_geom" >> > > Compare the above message with the output of \d above: > > > Check constraints: > > "enforce_dims_geom" CHECK (st_ndims(geom) = 2) > ^^^^^^^^^^^^^^^^^^^ > > "enforce_geotype_geom" CHECK (geometrytype(geom) = 'POLYGON'::text OR > > geom IS NULL) > > Check the output of: > > st_ndims(st_convexhull(st_collect(geom)) from splitbeam_point; > > Must be 2 ... > > --strk; > > () Free GIS & Flash consultant/developer > /\ http://strk.keybit.net/services.html
_______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users