[postgis-users] RE: postgis-users Digest, Vol 61, Issue 29

Gerry James gerry.james at carteryx.com
Wed Nov 28 13:26:59 PST 2007


Kevin, I added the extra brackets and it worked like a charm.  Thanks
-Gerry-

------------------------------

Message: 4
Date: Tue, 27 Nov 2007 14:53:26 -0800
From: Kevin Neufeld <kneufeld at refractions.net>
Subject: Re: [postgis-users] Invalid Geometry Error
To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
Message-ID: <474C9FE6.10102 at refractions.net>
Content-Type: text/plain; charset=windows-1252; format=flowed

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