Examples of equals2D()


Examples of com.vividsolutions.jts.geom.Coordinate.equals2D()

     * This check catches cases where the ring contains an A-B-A configuration of points.
     * This can happen if the ring does not contain 3 distinct points
     * (including the case where the input array has fewer than 4 elements),
     * or it contains coincident line segments.
     */
    if (prev.equals2D(hiPt) || next.equals2D(hiPt) || prev.equals2D(next))
      return false;

    int disc = computeOrientation(prev, hiPt, next);

    /**
 
View Full Code Here

Examples of com.vividsolutions.jts.geom.Coordinate.equals2D()

    double minDist = Double.MAX_VALUE;
    for (Iterator i = result.iterator(); i.hasNext();) {
      KdNode nextNode = (KdNode) i.next();
      Coordinate testPt = nextNode.getCoordinate();
      // ignore segment endpoints
      if (testPt.equals2D(p) || testPt.equals2D(q))
        continue;

      double testRadius = midPt.distance(testPt);
      if (testRadius < segRadius) {
        // double testDist = seg.distance(testPt);
View Full Code Here

Examples of com.vividsolutions.jts.geom.Coordinate.equals2D()

    double minDist = Double.MAX_VALUE;
    for (Iterator i = result.iterator(); i.hasNext();) {
      KdNode nextNode = (KdNode) i.next();
      Coordinate testPt = nextNode.getCoordinate();
      // ignore segment endpoints
      if (testPt.equals2D(p) || testPt.equals2D(q))
        continue;

      double testRadius = midPt.distance(testPt);
      if (testRadius < segRadius) {
        // double testDist = seg.distance(testPt);
View Full Code Here

Examples of com.vividsolutions.jts.geom.Coordinate.equals2D()

    // compare the last added coordinate in mergedCoordinates with
    // the first coordinate from the part, if they are the same, it
    // means the line is nodded.
    Coordinate lastAddedCoord = mergedCoordinates
      .get(mergedCoordinates.size() - 1);
    if (lastAddedCoord.equals2D(partCoord[0])) {
        // add
        mergedCoordinates = addCoordinates(partCoord,
          mergedCoordinates, 1);
    } else {
        // they are not nodded or the nodding has ended.
View Full Code Here

Examples of com.vividsolutions.jts.geom.Coordinate.equals2D()

    } else {
      throw new IllegalStateException(Messages.TrimGeometryStrategy_difference_unknown_type + difference);
    }

    Coordinate firstLinePoint = getCoordinateBeforePoint(splitLine1, intersectionPoint);
    if (firstLinePoint.equals2D(intersectionPoint)) {
      // same case as the comment for line1, or computeOrientation will
      // return COLLINEAR,
      // and we'll have no way to tell wether the line is at the right or
      // the left
      firstLinePoint = splitLine1.getCoordinateN(1);
View Full Code Here

Examples of com.vividsolutions.jts.geom.Coordinate.equals2D()

      interCoord[0] = inputList[h];
      interCoord[1] = (h == n - 1) ? inputList[0] : inputList[h + 1];
      interSegment = gf.createLineString(interCoord);
      // get the intersection coordinate if it intersects.
      candidateCoord = getIntersectionCoord(subjectLine, interSegment, subjectLineCoord);
      if (candidateCoord != null && candidateCoord.equals2D(intersectionCoord)) {
        break;
      }
      if (h == j) {
        // if it has been checked all the segment and any intersection
        // has been found, get out the loop and return nothing ??
View Full Code Here

Examples of com.vividsolutions.jts.geom.Coordinate.equals2D()

      interCoord[0] = inputList[h];
      interCoord[1] = (h == 0) ? inputList[n - 1] : inputList[h - 1];
      interSegment = gf.createLineString(interCoord);
      // get the intersection coordinate if it intersects.
      candidateCoord = getIntersectionCoord(subjectLine, interSegment, subjectLineCoord);
      if (candidateCoord != null && candidateCoord.equals2D(intersectionCoord)) {
        break;
      }

      h = (h == 0) ? n - 1 : h - 1;
View Full Code Here

Examples of com.vividsolutions.jts.geom.Coordinate.equals2D()

     * This check catches cases where the ring contains an A-B-A configuration of points.
     * This can happen if the ring does not contain 3 distinct points
     * (including the case where the input array has fewer than 4 elements),
     * or it contains coincident line segments.
     */
    if (prev.equals2D(hiPt) || next.equals2D(hiPt) || prev.equals2D(next))
      return false;

    int disc = computeOrientation(prev, hiPt, next);

    /**
 
View Full Code Here

Examples of com.vividsolutions.jts.geom.Coordinate.equals2D()

            int until = data.getUntilPosition();

            // if one of those coordinates equal the actualCoord,
            // that
            // means, this rings is the one to be modified.
            if (actualCoord.equals2D(inputList.get(indexKey)) && !(usedIndexes.contains(indexKey))) {
              try {
                result = improveTheRing(i, indexKey, n, ringCoords, forward, until);
                usedIndexes.add(indexKey);
              } catch (InvalidDistanceException ide) {
                // it has encounters difficulties during the
View Full Code Here

Examples of com.vividsolutions.jts.geom.Coordinate.equals2D()

    final List<DirectedEdge> edges = getEdges();
    final List<DirectedEdge> outgoingEdges = new ArrayList<DirectedEdge>(edges.size());

    for (Iterator<DirectedEdge> it = edges.iterator(); it.hasNext();) {
      DirectedEdge edge = (DirectedEdge) it.next();
      if (!nodeCoord.equals2D(edge.getCoordinate())) {
        edge = edge.getSym();
      }
      assert nodeCoord.equals2D(edge.getCoordinate());
      outgoingEdges.add(edge);
    }
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.