[postgis-devel] isvalid() error

Carl Anderson carl.anderson at co.fulton.ga.us
Fri Jan 14 07:40:44 PST 2005


strk at refractions.net wrote:

>PostGIS always allowed polygon rings with 3 points.
>In this case it disagrees with GEOS about this.
>Also, PostGIS does not allow 0 points.
>
>Should we enforce GEOS constraints or just have isvalid
>return FALSE in these cases ?
>
>  
>
a LINESTRING with 3 points is not simple (passes though the same point 
in space twice) and cannot be a LINEARRING. Hence it cannot be part of a 
valid POLYOGN

C.

>--strk;
>
>On Thu, Jan 13, 2005 at 05:07:59PM -0500, Carl Anderson wrote:
>  
>
>>need to test for ring counts prior to sending to GEOS
>>
>>select  isvalid(geometry('POLYGON((0 0,0 1,0 0))'));
>>NOTICE:   IllegalArgumentException: Number of points must be 0 or >3
>>ERROR:      POSTGIS2GEOS conversion failed
>>
>>
>>-- 
>>Carl Anderson
>>GIS Manager Fulton County, Georgia
>>carl.anderson at co.fulton.ga.us
>>404.730.8026
>>
>>
>>-----------------------------------------------------
>>This message has been scanned for viruses and
>>dangerous content for Fulton County by DefendMail, and is
>>believed to be clean.
>>
>>_______________________________________________
>>postgis-devel mailing list
>>postgis-devel at postgis.refractions.net
>>http://postgis.refractions.net/mailman/listinfo/postgis-devel
>>    
>>
>
>  
>


-- 
Carl Anderson
GIS Manager Fulton County, Georgia
carl.anderson at co.fulton.ga.us
404.730.8026


-----------------------------------------------------
This message has been scanned for viruses and
dangerous content for Fulton County by DefendMail, and is
believed to be clean.




More information about the postgis-devel mailing list