Package chunmap.model.algorithm

Examples of chunmap.model.algorithm.MonotonyChain


    assertTrue(geos.size() == 1);
  }

  @Test
  public void testIntersection11() {
    MonotonyChain chain1 = new MonotonyChain();
    MonotonyChain chain2 = new MonotonyChain();

    CPoint p1 = new Coordinate2D(0, 0);
    CPoint p2 = new Coordinate2D(0, 2);

    chain1.add(p1);
    chain1.add(p2);

    chain2.add(p2);
    chain2.add(p1);

    PointLineBag geos = chain1.intersection(chain2);

    assertTrue(geos.getPointSize() == 0);
    assertTrue(geos.getLineStringSize() == 1);
View Full Code Here


    assertTrue(geos.getLineStringSize() == 1);
  }

  @Test
  public void testIntersection12() {
    MonotonyChain chain1 = new MonotonyChain();
    MonotonyChain chain2 = new MonotonyChain();

    CPoint p1 = new Coordinate2D(0, 0);
    CPoint p2 = new Coordinate2D(1, 0);
    CPoint p3 = new Coordinate2D(2, 0);

    chain1.add(p1);
    chain1.add(p2);

    chain2.add(p2);
    chain2.add(p3);

    PointLineBag geos = chain1.intersection(chain2);

    assertTrue(geos.getPointSize() == 1);
    assertTrue(geos.getLineStringSize() == 0);
View Full Code Here

TOP

Related Classes of chunmap.model.algorithm.MonotonyChain

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.