[postgis-devel] isvalid() error

strk at refractions.net strk at refractions.net
Fri Jan 14 08:28:06 PST 2005


I personally use 3points polygon in visualizzatio apps, as
collapsed polygons still tell us where the original geometry
was, so they actually carry valid information (extent basicaly).

So, what we could do is have isvalid() handle number of
polygon ring points itself before attempting to convert to GEOS.
If < 4 return FALSE, else continue to GEOS conversion ...

--strk;

On Fri, Jan 14, 2005 at 10:40:44AM -0500, Carl Anderson wrote:
> 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.
> 
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel

-- 

For standing up against patentability of software,

  Thank You, Poland!

Read the intervention:    http://kwiki.ffii.org/ConsPolon041221En
Send your thanks:         thankyoupoland.info
Read/do more:		  http://www.noepatents.org/



More information about the postgis-devel mailing list