Package chunmap.model.coord

Examples of chunmap.model.coord.CPoint


  }

  @Test
  public void testContain() {
    Envelope envelop1 = new Envelope(10, 16, 20, 22);
    CPoint p = new Coordinate2D(11, 17);

    boolean b1 = envelop1.contain(p);
    assertTrue(b1);
  }
View Full Code Here


  }

  @Test
  public void testContain2() {
    Envelope envelop1 = new Envelope(10, 16, 10, 16);
    CPoint p = new Coordinate2D(10, 16);

    boolean b1 = envelop1.contain(p);
    assertTrue(b1);
  }
View Full Code Here

    assertTrue(b1);
  }

  @Test
  public void testContain3() {
    CPoint p = new Coordinate2D(10, 16);
    Envelope envelop1 = new GeoPoint(p).getEnvelop();
    boolean b1 = envelop1.contain(p);
    assertTrue(b1);
  }
View Full Code Here

  private GeometryFactory factory=new GeometryFactory();

  @Test
  public void testToString() {
    List<CPoint> points = new ArrayList<CPoint>();
    CPoint p1 = new Coordinate2D(10, 20);
    CPoint p2 = new Coordinate2D(30, 40);
    points.add(p1);
    points.add(p2);
    LineString ls = new LineString(points);

    String exp = "LINESTRING(10.0 20.0,30.0 40.0)";
View Full Code Here

  }

  @Test
  public void testInsertPoint() {
    List<CPoint> points = new ArrayList<CPoint>();
    CPoint p1 = new Coordinate2D(10, 20);
    CPoint p2 = new Coordinate2D(30, 60);
    CPoint p3 = new Coordinate2D(20, 40);
    CPoint p4 = new Coordinate2D(40, 80);
    points.add(p1);
    points.add(p2);
    points.add(p4);
    LineString ls = new LineString(points);
   
View Full Code Here

  }

  @Test
  public void testBreakLine() {
    List<CPoint> points = new ArrayList<CPoint>();
    CPoint p1 = new Coordinate2D(10, 20);
    CPoint p2 = new Coordinate2D(30, 60);
    CPoint p3 = new Coordinate2D(20, 40);
    CPoint p4 = new Coordinate2D(40, 80);
    CPoint p5 = new Coordinate2D(4, 80);
    points.add(p1);
    points.add(p2);
    points.add(p4);
    LineString ls = new LineString(points);
    List<CoordinateSeq> ls2 = LinearReference.splitLine(ls.getPoints(), p3);
View Full Code Here

  }

  @Test
  public void testContainLineString() {
    List<CPoint> points = new ArrayList<CPoint>();
    CPoint p1 = new Coordinate2D(10, 20);
    CPoint p2 = new Coordinate2D(20, 40);
    CPoint p3 = new Coordinate2D(30, 60);
    CPoint p4 = new Coordinate2D(40, 80);
    CPoint p5 = new Coordinate2D(50, 100);
    points.add(p1);
    points.add(p3);
    points.add(p5);
    LineString ls = new LineString(points);
View Full Code Here

  }

  @Test
  public void testSubLineString() {
    List<CPoint> points = new ArrayList<CPoint>();
    CPoint p1 = new Coordinate2D(1, 1);
    CPoint p2 = new Coordinate2D(1, 2);
    CPoint p3 = new Coordinate2D(4, 2);
    points.add(p1);
    points.add(p2);
    points.add(p3);
    LineString ls = new LineString(points);
    LineString sub = new LineString(
View Full Code Here

  }

  @Test
  public void testGetLength() {
    List<CPoint> points = new ArrayList<CPoint>();
    CPoint p1 = new Coordinate2D(1, 1);
    CPoint p2 = new Coordinate2D(1, 2);
    CPoint p3 = new Coordinate2D(4, 2);
    points.add(p1);
    points.add(p2);
    points.add(p3);
    LineString ls = new LineString(points);
View Full Code Here

  }

  @Test
  public void testIsSimple() {
    List<CPoint> points = new ArrayList<CPoint>();
    CPoint p1 = new Coordinate2D(10, 20);
    CPoint p3 = new Coordinate2D(30, 60);
    CPoint p5 = new Coordinate2D(50, 100);
    points.add(p1);
    points.add(p3);
    points.add(p5);
    LineString ls = new LineString(points);
    assertTrue(ls.isValid());
View Full Code Here

TOP

Related Classes of chunmap.model.coord.CPoint

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.