Package com.vividsolutions.jts.geom

Examples of com.vividsolutions.jts.geom.LineString.distance()


    LineString firstSegment = gf.createLineString(firstOriginalSegment);
    LineString secondSegment = gf.createLineString(secondOriginalSegment);
    Geometry point = gf.createPoint(imaginaryCoord);

    if (totalIntersection == 2
          && (firstSegment.distance(point) < SMALL_DISTANCE || secondSegment.distance(point) < SMALL_DISTANCE)) {
      return true;
    }
    return false;
  }
View Full Code Here


        double lat = Math.toRadians(point.y);
        double cosLat = FastMath.cos(lat);
        double lon = Math.toRadians(point.x) * cosLat;
        Point point2 = GeometryUtils.getGeometryFactory().createPoint(new Coordinate(lon, lat));
        LineString lineString2 = equirectangularProject(lineString, cosLat);
        return lineString2.distance(point2) * RADIUS_OF_EARTH_IN_M;
    }

    @Override
    public final double fastLength(LineString lineString) {
        // Warn: do not use LineString.getCentroid() as it is broken
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.