[jts-devel] Re: [postgis-devel] Possible Bug in isvalid()

strk at refractions.net strk at refractions.net
Thu Apr 7 11:41:27 PDT 2005


On Thu, Apr 07, 2005 at 10:37:10AM -0700, Martin Davis wrote:
> This bug is now fixed in CVS.

Fixed in GEOS CVS also. Thanks.
--strk;

> 
> Fix is in IsValidOp#checkHolesInShell to replace line
> 
>       Assert.isTrue(holePt != null, "Unable to find a hole point not a
> vertex of the shell");
> 
> With
> 
>       if (holePt == null) return;
> 
> 
> Martin Davis, Senior Technical Architect
> Vivid Solutions Inc.      www.vividsolutions.com
> Suite #1A-2328 Government Street Victoria, B.C. V8T 5G5
> Phone: (250) 385 6040 - Local 308 Fax: (250) 385 6046
> 
> 
> > -----Original Message-----
> > From: strk at refractions.net [mailto:strk at refractions.net] 
> > Sent: April 7, 2005 3:10 AM
> > To: PostGIS Development Discussion; JTS Topology Suite Development
> > Subject: Re: [jts-devel] Re: [postgis-devel] Possible Bug in isvalid()
> > 
> > 
> > Maybe the "inner" classes facing these kind of errors should 
> > throw a ValidityException instead so that the IsValid class 
> > could catch them ...
> > 
> > --strk;
> > 
> > On Thu, Apr 07, 2005 at 11:57:30AM +0200, Markus Schaber wrote:
> > > Hi,
> > > 
> > > (Added X-Post to JTS Developers list.)
> > > 
> > > Markus Schaber schrieb:
> > > > I just tried to apply my isvalid constraint to our raw 
> > data tables, 
> > > > and got the following error message on one of them:
> > > > 
> > > > NOTICE:  AssertionFailedException: Unable to find a hole 
> > point not a 
> > > > vertex of the shell
> > > > ERROR:  GEOS isvalid() threw an error!
> > > > 
> > > > This sounds rather strange to me. IMHO, it should not be 
> > possible to 
> > > > make isvalid() throw an error by feeding it an invalid geometry.
> > > >
> > > > I'll try to track down which geometries cause this error 
> > message...
> > > 
> > > I now got a simple example:
> > > 
> > > > gisblau=# select isvalid('MULTIPOLYGON(((0 0, 10 10, 10 
> > 0, 0 0),(5 
> > > > 5, 5 0, 10 5, 5 5)))');
> > > > NOTICE:  AssertionFailedException: Unable to find a hole 
> > point not a vertex of the shell
> > > > ERROR:  GEOS isvalid() threw an error!
> > > 
> > > The attached small java program triggers this error on my machine 
> > > against jts-1.6.jar.
> > > 
> > > HTH,
> > > Markus
> > 
> > 
> > > _______________________________________________
> > > jts-devel mailing list
> > > jts-devel at lists.jump-project.org 
> > > http://lists.refractions.net/mailman/listinfo/jts-devel
> > 
> > _______________________________________________
> > jts-devel mailing list
> > jts-devel at lists.jump-project.org 
> > http://lists.refractions.net/mailman/listinfo/jts-devel
> > 
> _______________________________________________
> jts-devel mailing list
> jts-devel at lists.jump-project.org
> http://lists.refractions.net/mailman/listinfo/jts-devel



More information about the postgis-devel mailing list