Hi, <br><br> I want to create a polygon from the given points and clip the area's within the polygon.<br><br>I just tried with the below one to create a polygon,<br><br>\d test_polygon;<br> Table "public.test_polygon"<br>
Column | Type | Modifiers <br>----------+------------------------+------------------------------------------------------------<br> gid | integer | not null default nextval('test_polygon_gid_seq'::regclass)<br>
name | character varying(254) | <br> the_geom | geometry | <br>Indexes:<br> "test_polygon_pkey" PRIMARY KEY, btree (gid)<br>Check constraints:<br> "enforce_dims_the_geom" CHECK (st_ndims(the_geom) = 2)<br>
"enforce_geotype_the_geom" CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL)<br> "enforce_srid_the_geom" CHECK (st_srid(the_geom) = 4326)<br><br><b>INSERT INTO test_polygon VALUES (3,'test',PolyFromText('POLYGON((78.76708 14.04584,81.54662 14.04584,78.78906 11.25531,81.53564 11.25531,78.76708 14.04584))'));<br>
</b><br>i get a message saying,<br><br>INSERT INTO test_polygon VALUES (3,'test',PolyFromText('POLYGON((78.76708 14.04584,81.54662 14.04584,78.78906 11.25531,81.53564 11.25531,78.76708 14.04584))'));<br><b>ERROR: new row for relation "test_polygon" violates check constraint "enforce_geotype_the_geom"</b><br>
<br><b>Can anyone help me how do i form a polygon with these points.</b><br><br>Thank you<br>-Nicholas I<br><br>