Examples of OverLayOp


Examples of chunmap.model.operate.overlay.OverLayOp

  public Polygon lineStringBuffer(LineString ls, double distance) {
    if (distance <= 0) {
      throw new IllegalArgumentException(
          "very little distance in singleLineNoCapBuffer");
    }
    OverLayOp op = new OverLayOp();
    PointBuffer pb = new PointBuffer();
    // 开始点的缓冲
    Polygon pg = pb.createBuffer(ls.firstPoint(), distance);

    for (int i = 0, n = ls.size() - 1; i < n; i++) {
      LineSegment lseg = ls.getLineSegment(i);

      // 线的缓冲区
      Polygon lineBuffer = singleLineNoCapBuffer(lseg, distance);
      CPoint point = ls.getPoint(i + 1);

      // 结尾点的缓冲
      Polygon pointBuffer = pb.createBuffer(point, distance);

      pg = op.computeUnion(lineBuffer, pg).getGeometry(0);

      // debug
      pg.isValid();

      pg = op.computeUnion(pointBuffer, pg).getGeometry(0);

      // debug
      pg.isValid();
    }
View Full Code Here

Examples of chunmap.model.operate.overlay.OverLayOp

    Polygon ls = (Polygon) g;
    Geometry g2 = wkt
        .read("Polygon(-2.639991350383829 -1.7999950537374092,-1.8399918576928131 -1.7999950537374092,-1.8399918576928131 -0.9999955610463935,-2.639991350383829 -0.9999955610463935,-2.639991350383829 -1.7999950537374092)");
    Polygon ls2 = (Polygon) g2;

    OverLayOp op = new OverLayOp();
    Polygon pg = op.computeUnion(ls, ls2).getGeometry(0);
    geoms.add(pg);

    // geoms.add(ls);
    // geoms.add(ls2);
  }
View Full Code Here

Examples of chunmap.model.operate.overlay.OverLayOp

    Polygon ls = (Polygon) g;
    Geometry g2 = wkt
        .read("Polygon(-2.639991350383829 -1.7999950537374092,-1.8399918576928131 -1.7999950537374092,-1.8399918576928131 -0.9999955610463935,-2.639991350383829 -0.9999955610463935,-2.639991350383829 -1.7999950537374092)");
    Polygon ls2 = (Polygon) g2;

    OverLayOp op = new OverLayOp();
    Polygon pg = op.computeIntersect(ls, ls2).getGeometry(0);
    geoms.add(pg);

    // geoms.add(ls);
    // geoms.add(ls2);
  }
View Full Code Here

Examples of chunmap.model.operate.overlay.OverLayOp

      throw new GeometryException();
    if (!g4.isValid())
      throw new GeometryException();

    LineBuffer lb = new LineBuffer();
    OverLayOp op = new OverLayOp();

    // Polygon pg2 = lb.lineStringBuffer((LineString) g2, 0.1);
    Polygon pg3 = lb.lineStringBuffer((LineString) g3, 0.1);
    Polygon pg4 = lb.lineStringBuffer((LineString) g4, 0.1);
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.