[postgis-users] Invalid Geometry Error

Christian Schwartze Christian.Schwartze at uni-jena.de
Wed Nov 28 06:42:58 PST 2007


You have to put your polygon geometry in double brackets because of having a
single polygon. Something like

..GeometryFromText('POLYGON((455700 5609025, 462650 5609025,
462650...))',26911.... works.


Christian.



Zitat von Gerry James <gerry.james at carteryx.com>:

> 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
>
>




----------------------------------------------------------------
This mail was sent through http://webmail.uni-jena.de



More information about the postgis-users mailing list