[geos-devel] [GEOS] #234: Intersection Crashes On Multipolygons With Empty Holes

Martin Davis mbdavis at refractions.net
Tue Mar 3 11:43:18 EST 2009


This is an error in JTS as well.  EMPTY components are generally not 
handled.

The whole idea of having empty components seems pretty pointless to me 
anyway.  I suppose the best thing to do is to simply strip them out in 
geometry operations.

GEOS wrote:
> #234: Intersection Crashes On Multipolygons With Empty Holes
> ------------------------+---------------------------------------------------
>  Reporter:  slambright  |       Owner:  geos-devel at lists.osgeo.org
>      Type:  defect      |      Status:  new                       
>  Priority:  major       |   Milestone:  3.1.0                     
> Component:  Default     |     Version:  3.0.3                     
>  Severity:  Unassigned  |    Keywords:                            
> ------------------------+---------------------------------------------------
>  When doing operations to complicated multipolygons, I ran across this.
>  When I had a multipolygon of the form:
>  MULTIPOLYGON (((1.0000000000000000 1.0000000000000000, 1.0000000000000000
>  5.0000000000000000, 5.0000000000000000 5.0000000000000000,
>  5.0000000000000000 1.0000000000000000, 1.0000000000000000
>  1.0000000000000000), EMPTY))
>  (empty, but existing, holes polygon)
>
>  and I tried to intersect it with another polygon, say
>  MULTIPOLYGON (((3.0000000000000000 3.0000000000000000, 3.0000000000000000
>  4.0000000000000000, 4.0000000000000000 4.0000000000000000,
>  4.0000000000000000 3.0000000000000000, 3.0000000000000000
>  3.0000000000000000)))
>
>  I get the error:
>  CoordinateArraySequence.cpp:105: virtual const geos::geom::Coordinate&
>  geos::geom::CoordinateArraySequence::getAt(size_t) const: Assertion
>  `pos<vect->size()' failed.
>  Abort
>
>  However, if there isn't an empty hole polygon it works fine.
>
>  This happens in both geos3.0.0 and geos3.1.0rc2. I'm running SUSE LINUX
>  10.1 (X86-64).
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel

-- 
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022



More information about the geos-devel mailing list