[postgis-users] postgis on fedora ...

Sandeep Kumar Jakkaraju sandeepkumar.jakkaraju at gmail.com
Sun Nov 26 09:51:03 PST 2006


Hi Mike

Thanx for your reply ...but my geometry has 5 points ..
please see the attached file ..
I get all the polygons for isvalid() and also for NOT isvalid() ...

Thanks
Sandeep


On 11/26/06, Michael Fuhr <mike at fuhr.org> wrote:
>
> On Sun, Nov 26, 2006 at 06:52:13PM +0530, Sandeep Kumar Jakkaraju wrote:
> > when i am runnig this query
> >
> > select name from tiles where contains(tilebounds,GEOMFROMTEXT('POINT(0
> > 0)'));
> >
> > I get this error :
> >
> > NOTICE:  IllegalArgumentException: point array must contain 0 or >1
> elements
> > ERROR:  POSTGIS2GEOS conversion failed
>
> I'd guess that you have at least one bad geometry, e.g., a POLYGON
> with a ring that has exactly one point.  The following example
> replicates the above error:
>
> CREATE TABLE tiles (name text);
> SELECT AddGeometryColumn('tiles', 'tilebounds', -1, 'GEOMETRY', 2);
> INSERT INTO tiles (name, tilebounds) VALUES ('test',
> '0103000000010000000100000000000000000000000000000000000000');
>
> SELECT name, AsText(tilebounds) FROM tiles;
> name |     astext
> ------+----------------
> test | POLYGON((0 0))
> (1 row)
>
> SELECT name FROM tiles WHERE Contains(tilebounds, GeomFromText('POINT(0
> 0)'));
> NOTICE:  IllegalArgumentException: point array must contain 0 or >1
> elements
>
> ERROR:  POSTGIS2GEOS conversion failed
>
> You might be able to find the bad geometry with isvalid() or
> npoints():
>
> SELECT name, AsText(tilebounds) FROM tiles WHERE NOT isvalid(tilebounds);
> SELECT name, AsText(tilebounds) FROM tiles WHERE npoints(tilebounds) = 1;
>
> --
> Michael Fuhr
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



-- 
Sandeep Kumar Jakkaraju
WeBlog:
http://jakkarajus.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061126/b57f3b36/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: results
Type: application/octet-stream
Size: 5766 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061126/b57f3b36/attachment.obj>


More information about the postgis-users mailing list