Package com.vividsolutions.jts.operation.distance

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


    }
  }

  void computeDistance(Geometry[] pts, Geometry geom)
  {
    IndexedFacetDistance bbd = null;
    if (USE_INDEXED_DIST)
      bbd = new IndexedFacetDistance(geom);
    for (int i = 0; i < pts.length; i++ ) {
      if (USE_INDEXED_DIST) {
        double dist = bbd.getDistance(pts[i]);
//        double dist = bbd.getDistanceWithin(pts[i].getCoordinate(), 100000);
      }
      else {
       double dist = geom.distance(pts[i]);
      }
View Full Code Here


  void computeDistanceToAllPoints(Geometry[] geom)
  {
    Coordinate[] pts = geom[1].getCoordinates();
    double dist = 0.0;
    double dist2 = 0.0;
    IndexedFacetDistance fastDist = new IndexedFacetDistance(geom[0]);
    for (int i = 0; i < pts.length; i++) {
      Coordinate p = pts[i];
     
      // slow N^2 distance
      dist = geom[0].distance(geom[1].getFactory().createPoint(p));
View Full Code Here

TOP

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

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.