[postgis-users] Invalid Geometry Error

Kevin Neufeld kneufeld at refractions.net
Tue Nov 27 14:53:26 PST 2007


The WKT representation of a POLYGON contains two brackets, not one - an 
outer ring and zero or more interior rings.

-- Kevin

Gerry James wrote:
>
> I am trying to create a polygon for the extents of each of a number of 
> tables and use the geometries to populate an index table. The SQL I 
> have been using is:
>
> INSERT INTO index_survey (tablename,the_geom) VALUES 
> ('survey_20040812' ,GeometryFromText('POLYGON(455700 5609025, 462650 
> 5609025, 462650 5613490, 455700 5613490, 455700 5609025)',26911));
>
> which throws out an ‘invalid geometry’ error. To create the spatial 
> table in the first place I used:
>
> CREATE TABLE index_survey (gid serial PRIMARY KEY, tablename varchar(25));
> SELECT AddGeometryColumn('public','index_survey’,'the_geom','26911','POLYGON',2);
>
> I have tried using this SQL both from pgAdmin and using ASP with no 
> success.
>
> Does anyone have any suggestions?
>
> Thanks Gerry
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>   



More information about the postgis-users mailing list