Package com.vividsolutions.jts.operation.distance

Examples of com.vividsolutions.jts.operation.distance.GeometryLocation


   
    // first test if line intersects polygon
    Coordinate intPt = intersection(poly, line);
    if (intPt != null) {
      updateDistance(0,
          new GeometryLocation(poly.getPolygon(), 0, intPt),
          new GeometryLocation(line, 0, intPt),
          flip
      );
      return;
    }
   
View Full Code Here


      }
      // point is in interior of polygon
      // distance is distance to polygon plane
      double dist = Math.abs(polyPlane.getPlane().orientedDistance(pt));
      updateDistance(dist,
          new GeometryLocation(polyPlane.getPolygon(), 0, pt),
          new GeometryLocation(point, 0, pt),
          flip
      );
    }
    // point is outside polygon, so compute distance to shell linework
    computeMinDistanceLinePoint(shell, point, flip);
View Full Code Here

          // TODO: compute closest pts in 3D
          LineSegment seg0 = new LineSegment(coord0[i], coord0[i + 1]);
          LineSegment seg1 = new LineSegment(coord1[j], coord1[j + 1]);
          Coordinate[] closestPt = seg0.closestPoints(seg1);
          updateDistance(dist,
              new GeometryLocation(line0, i, closestPt[0]),
              new GeometryLocation(line1, j, closestPt[1]),
              flip
          );
        }
        if (isDonereturn;
      }
View Full Code Here

          lineCoord[i + 1]);
      if (dist < minDistance) {
        LineSegment seg = new LineSegment(lineCoord[i], lineCoord[i + 1]);
        Coordinate segClosestPoint = seg.closestPoint(coord);
        updateDistance(dist,
            new GeometryLocation(line, i, segClosestPoint),
            new GeometryLocation(point, 0, coord),
            flip);
      }
      if (isDonereturn;
    }
  }
View Full Code Here

    double dist = CGAlgorithms3D.distance(
        point0.getCoordinate(),
        point1.getCoordinate());
    if (dist < minDistance) {
      updateDistance(dist,
          new GeometryLocation(point0, 0,  point0.getCoordinate()),
          new GeometryLocation(point1, 0,  point1.getCoordinate()),
          flip);
    }
  }
View Full Code Here

TOP

Related Classes of com.vividsolutions.jts.operation.distance.GeometryLocation

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.