public void TestSimpleLineUnion() { var a = Read("LINESTRING (1 1, 9 1)"); var b = Read("POINT (5 1)"); var expected = Read("LINESTRING (1 1, 9 1)"); CheckEqual(expected, OverlayNGTest.Union(a, b, 1)); }
public void TestTriangleFillingHoleUnionPrec10() { var a = Read("POLYGON ((0 0, 4 0, 4 4, 0 4, 0 0), (1 1, 1 2, 2 1, 1 1), (1 2, 1 3, 2 3, 1 2), (2 3, 3 3, 3 2, 2 3))"); var b = Read("POLYGON ((2 1, 3 1, 3 2, 2 1))"); var expected = Read("POLYGON ((0 0, 0 4, 4 4, 4 0, 0 0), (1 2, 1 1, 2 1, 1 2), (2 3, 1 3, 1 2, 2 3), (3 2, 3 3, 2 3, 3 2))"); CheckEqual(expected, OverlayNGTest.Union(a, b, 10)); }
public void TestBoxHoleCollapseAlongBEdgeUnion() { var a = Read("POLYGON ((0 3, 3 3, 3 0, 0 0, 0 3), (1 1.2, 1 1.1, 2.3 1.1, 1 1.2))"); var b = Read("POLYGON ((1 1, 2 1, 2 0, 1 0, 1 1))"); var expected = Read("POLYGON ((0 0, 0 3, 3 3, 3 0, 2 0, 1 0, 0 0))"); CheckEqual(expected, OverlayNGTest.Union(b, a, 1)); }
public void TestCollapseBoxTriangleUnion() { var a = Read("POLYGON ((10 10, 100 10, 10 11, 10 10))"); var b = Read("POLYGON ((90 0, 200 0, 200 200, 90 200, 90 0))"); var expected = Read("MULTIPOLYGON (((90 10, 10 10, 10 11, 90 10)), ((90 10, 90 200, 200 200, 200 0, 90 0, 90 10)))"); CheckEqual(expected, OverlayNGTest.Union(a, b, 1)); }
public void TestLinestringEmptyPointUnion() { var a = Read("LINESTRING (10 10, 20 20)"); var b = Read("POINT EMPTY"); var expected = Read("LINESTRING (10 10, 20 20)"); var actual = OverlayNGTest.Union(a, b, 1); CheckEqual(expected, actual); }
public void TestEmptyInputUUnion() { var a = Read("MULTIPOINT ((1 1), (3 1))"); var b = Read("POINT EMPTY"); var expected = Read("MULTIPOINT ((1 1), (3 1))"); CheckEqual(expected, OverlayNGTest.Union(a, b, 1)); }
public void TestSimpleFloatUnion() { var a = Read("MULTIPOINT ((1 1), (1.5 1.1), (2 1), (2.1 1.1))"); var b = Read("MULTIPOINT ((1.5 1.1), (2 1), (2 1.2))"); var expected = Read("MULTIPOINT ((1 1), (1.5 1.1), (2 1), (2 1.2), (2.1 1.1))"); CheckEqual(expected, OverlayNGTest.Union(a, b)); }
public void TestSimpleUnion() { var a = Read("MULTIPOINT ((1 1), (2 1))"); var b = Read("POINT (2 1)"); var expected = Read("MULTIPOINT ((1 1), (2 1))"); CheckEqual(expected, OverlayNGTest.Union(a, b, 1)); }
public static Geometry Union(Geometry a, Geometry b, double scaleFactor) { return(OverlayNGTest.Union(a, b, scaleFactor)); }