<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
<br>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.<br><br>Thanks again Sandro, you were very helpful,<br><br>Cheers,<br><br>Gery<br><div> </div><br><br><div>> Date: Thu, 20 Oct 2011 11:53:27 +0200<br>> From: strk@keybit.net<br>> To: gamejihou@hotmail.com<br>> CC: postgis-users@postgis.refractions.net<br>> Subject: Re: [postgis-users] FW: Support in ST_ConvexHull syntax<br>> <br>> On Thu, Oct 20, 2011 at 09:26:48AM +0000, Gery . wrote:<br>> <br>> > mop=# \d unaprueba<br>> > Table "public.unaprueba"<br>> > Column | Type | Modifiers <br>> > --------+----------+-----------<br>> > id | smallint | <br>> > geom | geometry | <br>> > Indexes:<br>> > "unaprueba_geom" gist (geom)<br>> > Check constraints:<br>> > "enforce_dims_geom" CHECK (st_ndims(geom) = 2)<br>> > "enforce_geotype_geom" CHECK (geometrytype(geom) = 'POLYGON'::text OR geom IS NULL)<br>> > "enforce_srid_geom" CHECK (st_srid(geom) = 4326)<br>> <br>> ...<br>> <br>> > mop=# insert into unaprueba (geom) SELECT st_convexhull(st_collect(geom)) as geom FROM splitbeam_point ;<br>> > ERROR: new row for relation "unaprueba" violates check constraint "enforce_dims_geom"<br>> > <br>> > where could be the problem?<br>> <br>> << The new row violates check constraint "enforce_dims_geom" >><br>> <br>> Compare the above message with the output of \d above:<br>> <br>> > Check constraints:<br>> > "enforce_dims_geom" CHECK (st_ndims(geom) = 2)<br>> ^^^^^^^^^^^^^^^^^^^<br>> > "enforce_geotype_geom" CHECK (geometrytype(geom) = 'POLYGON'::text OR geom IS NULL)<br>> <br>> Check the output of:<br>> <br>> st_ndims(st_convexhull(st_collect(geom)) from splitbeam_point;<br>> <br>> Must be 2 ...<br>> <br>> --strk; <br>> <br>> () Free GIS & Flash consultant/developer<br>> /\ http://strk.keybit.net/services.html<br></div> </div></body>
</html>