Package chunmap.model.elem

Examples of chunmap.model.elem.Line


  public Polygon singleLineNoCapBuffer(LineSegment sl, double distance) {
    if (distance <= 0) {
      throw new IllegalArgumentException(
          "very little distance in singleLineNoCapBuffer");
    }
    Line l = sl.toLine();
    double a = Math.atan(l.getVerticalK());// 角度
    double dx = distance * Math.cos(a);
    double dy = distance * Math.sin(a);

    CPoint p1 = new Coordinate2D(sl.getStartPoint().getX() - dx, sl.getStartPoint()
        .getY()
View Full Code Here


        // 共线
        if (me.toVector().get2DCrossProduct(other.toVector()) == 0)
            return joinLinePart(me, other);

        // 转化为直线
        Line line1 = me.toLine();
        Line line2 = other.toLine();

        // 边缘检测,这样精度高
        if (me.onBorder(other.getEndPoint()))
        {
            return other.getEndPoint();
View Full Code Here

TOP

Related Classes of chunmap.model.elem.Line

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.