Examples of toCoordinateSeq()


Examples of chunmap.model.coord.CoordSeqEditor.toCoordinateSeq()

    points.add(p4);
    LineString ls = new LineString(points);
   
    CoordSeqEditor les=new CoordSeqEditor(ls.getPoints());
    les.tryInsertPoint(p3);
    LineString ls2 = new LineString(les.toCoordinateSeq());
   
    CoordSeqEditor les2=new CoordSeqEditor(ls.getPoints());
    les.tryInsertPoint(p2);
    LineString ls3 =new LineString(les2.toCoordinateSeq());
View Full Code Here

Examples of chunmap.model.coord.CoordSeqEditor.toCoordinateSeq()

    les.tryInsertPoint(p3);
    LineString ls2 = new LineString(les.toCoordinateSeq());
   
    CoordSeqEditor les2=new CoordSeqEditor(ls.getPoints());
    les.tryInsertPoint(p2);
    LineString ls3 =new LineString(les2.toCoordinateSeq());

    String exp2 = "LINESTRING(10.0 20.0,20.0 40.0,30.0 60.0,40.0 80.0)";
    assertTrue(exp2.equals(ls2.toString()));
    String exp3 = "LINESTRING(10.0 20.0,30.0 60.0,40.0 80.0)";
    assertTrue(exp3.equals(ls3.toString()));
View Full Code Here

Examples of chunmap.model.coord.CoordSeqEditor.toCoordinateSeq()

    LineString l = (LineString) g;
    LineString l2 = (LineString) g2;

    CoordSeqEditor lineEditor = new CoordSeqEditor(l.getPoints());
    lineEditor.join(l2.getPoints());
    LineString rl2 = new LineString(lineEditor.toCoordinateSeq());
    String s = "LINESTRING(32.0 34.0,334.0 23.0,1230.09 234.0)";
    assertTrue(s.equals(rl2.toString()));
  }

  @Test
View Full Code Here

Examples of chunmap.model.coord.CoordSeqEditor.toCoordinateSeq()

    ls.addPointToLast(p2);
    ls.addPointToLast(p3);
    ls.addPointToLast(p4);
    ls.addPointToLast(p1);

    Polygon pg = new Polygon(new Ring(ls.toCoordinateSeq()));
    return pg;
  }

  public Polygon lineStringBuffer(LineString ls, double distance) {
    if (distance <= 0) {
View Full Code Here

Examples of chunmap.model.coord.CoordSeqEditor.toCoordinateSeq()

      }
    }

    if (tl != null) {
      lines.remove(tl);
      lines.add(new LineString(newLine.toCoordinateSeq()));
    } else {
      lines.add(line);
    }
  }
View Full Code Here

Examples of chunmap.model.coord.CoordSeqEditor.toCoordinateSeq()

    assert line.isClose() : "the ring is not close";

    line.deleteOverPoint();
    line.close();

    return new Ring(line.toCoordinateSeq());
  }

  private void clearFlag(List<Fragment> fragment) {
    for (Fragment fra : fragment) {
      fra.setFlag(false);
View Full Code Here

Examples of chunmap.model.coord.CoordSeqEditor.toCoordinateSeq()

      CPoint pp = new Coordinate2D(p.getX() + dx, p.getY() + dy);
      points.add(pp);
    }
    CoordSeqEditor ls = new CoordSeqEditor(points);
    ls.close();
    Polygon pg = new Polygon(new Ring(ls.toCoordinateSeq()));
    return pg;
  }

  public Polygon createBuffer(CPoint p, double d) {
    return createBuffer(p, d, 20);
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.