Package com.vividsolutions.jts.algorithm

Examples of com.vividsolutions.jts.algorithm.PointLocator.locate()


  }

  public void testPointLocatorLinearRingLineString() throws Exception {
    PointLocator pointLocator = new PointLocator();
    Geometry gc = reader.read("GEOMETRYCOLLECTION( LINESTRING(0 0, 10 10), LINEARRING(10 10, 10 20, 20 10, 10 10))");
    assertEquals(Location.BOUNDARY, pointLocator.locate(new Coordinate(10, 10), gc));
  }

  public void testPointLocator() throws Exception {
    PointLocator pointLocator = new PointLocator();
    Geometry polygon = reader.read("POLYGON ((70 340, 430 50, 70 50, 70 340))");
View Full Code Here


  }

  public void testPointLocator() throws Exception {
    PointLocator pointLocator = new PointLocator();
    Geometry polygon = reader.read("POLYGON ((70 340, 430 50, 70 50, 70 340))");
    assertEquals(Location.EXTERIOR, pointLocator.locate(new Coordinate(420, 340), polygon));
    assertEquals(Location.BOUNDARY, pointLocator.locate(new Coordinate(350, 50), polygon));
    assertEquals(Location.BOUNDARY, pointLocator.locate(new Coordinate(410, 50), polygon));
    assertEquals(Location.INTERIOR, pointLocator.locate(new Coordinate(190, 150), polygon));
  }
View Full Code Here

  public void testPointLocator() throws Exception {
    PointLocator pointLocator = new PointLocator();
    Geometry polygon = reader.read("POLYGON ((70 340, 430 50, 70 50, 70 340))");
    assertEquals(Location.EXTERIOR, pointLocator.locate(new Coordinate(420, 340), polygon));
    assertEquals(Location.BOUNDARY, pointLocator.locate(new Coordinate(350, 50), polygon));
    assertEquals(Location.BOUNDARY, pointLocator.locate(new Coordinate(410, 50), polygon));
    assertEquals(Location.INTERIOR, pointLocator.locate(new Coordinate(190, 150), polygon));
  }

  public void test1() throws Exception {
View Full Code Here

  public void testPointLocator() throws Exception {
    PointLocator pointLocator = new PointLocator();
    Geometry polygon = reader.read("POLYGON ((70 340, 430 50, 70 50, 70 340))");
    assertEquals(Location.EXTERIOR, pointLocator.locate(new Coordinate(420, 340), polygon));
    assertEquals(Location.BOUNDARY, pointLocator.locate(new Coordinate(350, 50), polygon));
    assertEquals(Location.BOUNDARY, pointLocator.locate(new Coordinate(410, 50), polygon));
    assertEquals(Location.INTERIOR, pointLocator.locate(new Coordinate(190, 150), polygon));
  }

  public void test1() throws Exception {
    NonRobustCGAlgorithms algorithms = new NonRobustCGAlgorithms();
View Full Code Here

    PointLocator pointLocator = new PointLocator();
    Geometry polygon = reader.read("POLYGON ((70 340, 430 50, 70 50, 70 340))");
    assertEquals(Location.EXTERIOR, pointLocator.locate(new Coordinate(420, 340), polygon));
    assertEquals(Location.BOUNDARY, pointLocator.locate(new Coordinate(350, 50), polygon));
    assertEquals(Location.BOUNDARY, pointLocator.locate(new Coordinate(410, 50), polygon));
    assertEquals(Location.INTERIOR, pointLocator.locate(new Coordinate(190, 150), polygon));
  }

  public void test1() throws Exception {
    NonRobustCGAlgorithms algorithms = new NonRobustCGAlgorithms();
    assertTrue(algorithms.isOnLine(new Coordinate(10,10),
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.