[geos-devel] Re: [GEOS] #253: Unexpected "Self-intersection at or
near point"
GEOS
geos-trac at osgeo.org
Tue May 19 12:18:21 EDT 2009
#253: Unexpected "Self-intersection at or near point"
-------------------------------+--------------------------------------------
Reporter: wvereeck | Owner: geos-devel at lists.osgeo.org
Type: defect | Status: new
Priority: minor | Milestone: 3.1.1
Component: Core | Version: 3.1.0
Severity: Unassigned | Resolution:
Keywords: self-intersection |
-------------------------------+--------------------------------------------
Old description:
> Hi All,
>
> I'm very new to GEOS (< 1 day), but I'm puzzled by what I think is a
> strange bug.
> Being particularly interested in the GEOSUnionCascaded() function to
> merge large sets (>50,000) of overlapping polygons, altering my dataset
> manually to avoid this bug(?) is not an option.
>
> I have narrowed down the problem to the following multipolygon, which
> represents a rectangle inside an octagon (see
> http://homes.esat.kuleuven.be/~wvereeck/rect_inside_oct.png)
>
> MULTIPOLYGON(((12.26 18.46, 11.76 18.46, 11.54 18.24, 11.54 17.34, 11.76
> 17.12, 12.26 17.12, 12.48 17.34, 12.48 18.24, 12.26 18.46)),((12.37
> 18.35, 11.65 18.35, 11.65 17.23, 12.37 17.23, 12.37 18.35)))
>
> I am using the c-interface. Running the GEOSisValid() test on this
> polygon set results in:
> NOTICE: Self-intersection at or near point 12.37 18.35
> Also, GEOSUnionCascaded() accordingly fails with:
> ERROR: TopologyException: found non-noded intersection between 11.65
> etc...
>
> However, when I slightly offset the x-position (+1e-8) of the two top
> vertices of the rectangle, everything works like a charm (i.e.
> GEOSisValid returns 'true' and GEOSUnionCascaded produces the correct
> output polygon):
>
> MULTIPOLYGON(((12.26 18.46, 11.76 18.46, 11.54 18.24, 11.54 17.34, 11.76
> 17.12, 12.26 17.12, 12.48 17.34, 12.48 18.24, 12.26 18.46)),
> ((12.37000001 18.35, 11.65000001 18.35, 11.65 17.23, 12.37 17.23,
> 12.37000001 18.35)))
>
> I apologize if I'm too much in a hurry here and should start to learn
> more about geos before submitting a complaint :) At least I hope this is
> the right place for this problem.
>
> Kind Regards,
> Wim Vereecken
>
> FWIW, I'm using geos-3.1.0.tar.bz2 (2009/03/17), libgeos-3.1.0 and Ubuntu
> 8.04.2 (x86-64) with a 2.6.24-23-generic kernel.
New description:
Hi All,
I'm very new to GEOS (< 1 day), but I'm puzzled by what I think is a
strange bug.
Being particularly interested in the GEOSUnionCascaded() function to merge
large sets (>50,000) of overlapping polygons, altering my dataset manually
to avoid this bug(?) is not an option.
I have narrowed down the problem to the following multipolygon, which
represents a rectangle inside an octagon (see
http://homes.esat.kuleuven.be/~wvereeck/rect_inside_oct.png)
{{{
MULTIPOLYGON(((12.26 18.46, 11.76 18.46, 11.54 18.24, 11.54 17.34, 11.76
17.12, 12.26 17.12, 12.48 17.34, 12.48 18.24, 12.26 18.46)),((12.37 18.35,
11.65 18.35, 11.65 17.23, 12.37 17.23, 12.37 18.35)))
}}}
I am using the c-interface. Running the GEOSisValid() test on this polygon
set results in:
{{{
NOTICE: Self-intersection at or near point 12.37 18.35
}}}
Also, GEOSUnionCascaded() accordingly fails with:
{{{
ERROR: TopologyException: found non-noded intersection between 11.65
}}}
etc.
However, when I slightly offset the x-position (+1e-8) of the two top
vertices of the rectangle, everything works like a charm (i.e. GEOSisValid
returns 'true' and GEOSUnionCascaded produces the correct output polygon):
{{{
MULTIPOLYGON(((12.26 18.46, 11.76 18.46, 11.54 18.24, 11.54 17.34, 11.76
17.12, 12.26 17.12, 12.48 17.34, 12.48 18.24, 12.26 18.46)), ((12.37000001
18.35, 11.65000001 18.35, 11.65 17.23, 12.37 17.23, 12.37000001 18.35)))
}}}
I apologize if I'm too much in a hurry here and should start to learn more
about geos before submitting a complaint :) At least I hope this is the
right place for this problem.
Kind Regards,
Wim Vereecken
FWIW, I'm using geos-3.1.0.tar.bz2 (2009/03/17), libgeos-3.1.0 and Ubuntu
8.04.2 (x86-64) with a 2.6.24-23-generic kernel.
--
Ticket URL: <http://trac.osgeo.org/geos/ticket/253#comment:1>
GEOS <http://geos.refractions.net/>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
More information about the geos-devel
mailing list