Examples of GeometryLocation


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

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

      }
      // 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

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

          // 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

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

          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

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

    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

Examples of com.vividsolutions.jtstest.testbuilder.geom.GeometryLocation

      Geometry geom = lyr.getGeometry();
      if (geom == null) continue;
      ComponentLocater locater = new ComponentLocater(geom);
      List locs = locater.getComponents(pt, tolerance);
      if (locs.size() > 0) {
        GeometryLocation loc = (GeometryLocation) locs.get(0);
        return loc.getComponent();
      }
    }
    return null;
  }
View Full Code Here

Examples of com.vividsolutions.jtstest.testbuilder.geom.GeometryLocation

      Geometry geom = lyr.getGeometry();
      if (geom == null) continue;
      ComponentLocater locater = new ComponentLocater(geom);
      List locs = locater.getComponents(aoi);
      if (locs.size() > 0) {
        GeometryLocation loc = (GeometryLocation) locs.get(0);
        comp[i] = loc.getComponent();
      }
    }
    return comp;
  }
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.