1
Vote

Polygonizer StackOverflowException

description

I am trying to use the Polyzonizer class. I keep getting the following exception:
 
An unhandled exception of type 'System.StackOverflowException' occurred in DotSpatial.Topology.dll
 
Here is my sample method. The coordinates are in lat/lon. I get the same error if I convert the points to UTM.
 
static void PolygonizerTest3()
    {
        DotSpatial.Topology.Operation.Polygonize.Polygonizer p = new DotSpatial.Topology.Operation.Polygonize.Polygonizer();
 
        Coordinate c1 = new Coordinate(-90.697857, 41.658643);
        Coordinate c2 = new Coordinate(-90.698077, 41.658648);
        Coordinate c3 = new Coordinate(-90.698071, 41.658812);
        Coordinate c4 = new Coordinate(-90.697852, 41.658808);
        Coordinate c5 = new Coordinate(-90.697857, 41.658643);

        CoordinateList cl = new CoordinateList();

        cl.Add(c1);
        cl.Add(c2);
        cl.Add(c3);
        cl.Add(c4);
        cl.Add(c5);
 
        LinearRing lr = new LinearRing(cl);
 
        p.Add(lr);
 
        Trace.WriteLine(p.Polygons.Count);
        Trace.WriteLine(p.CutEdges.Count.ToString());
        Trace.WriteLine(p.Dangles.Count.ToString());
        Trace.WriteLine(p.InvalidRingLines.Count.ToString());
 
   }

comments