Esempio n. 1
0
        public void testQuickPolygonUnion()
        {
            var a                 = reader.Read("POLYGON((0 0, 100 0, 100 100, 0 100, 0 0))");
            var b                 = reader.Read("POLYGON((50 50, 150 50, 150 150, 50 150, 50 50))");
            var polygons          = new [] { a, b };
            var polygonCollection = new GeometryFactory().CreateGeometryCollection(polygons);
            var union             = polygonCollection.Buffer(0);

            Console.WriteLine(union.AsText());
            Assert.AreEqual("POLYGON ((0 0, 0 100, 50 100, 50 150, 150 150, 150 50, 100 50, 100 0, 0 0))", union.AsText());
        }