Package com.vividsolutions.jts.geom

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


      segmentCoordinates[0] = boundaryCoordinates[i];
      segmentCoordinates[1] = boundaryCoordinates[i + 1];
      LineString segment = fc.createLineString(segmentCoordinates);
      // if intersect, this is the vertex we need to add, so add it to the
      // result coordinates list.
      if (segment.intersects(line)) {

        Geometry point = segment.intersection(line);

        Geometry[] sorted = sortPoints(point, segment);
        // add all the points.
View Full Code Here


       
        if (!(lineString instanceof LineString)){
      throw new IllegalArgumentException("LineString is spected"); //$NON-NLS-1$
            }
        LineString splitLine = getSplitLine().getOriginalSplitLine();
            return splitLine.intersects(lineString) ;
    }

  } // end LineStringSplitter class

  /**
 
View Full Code Here

        if (!(multiLine instanceof MultiLineString)){
      throw new IllegalArgumentException("LineString is spected"); //$NON-NLS-1$
            }
            // lines doesn't needed to be checked.
        LineString splitLine = getSplitLine().getOriginalSplitLine();
            return splitLine.intersects(multiLine) ;
    }
  }

  /**
   * Class responsible for doing split of MultiPolygon geometries.
View Full Code Here

    Coordinate p1 = new Coordinate(-123456789, -40);
    Coordinate p2 = new Coordinate(381039468754763d, 123456789);
    Coordinate q  = new Coordinate(0, 0);
    LineString l = new GeometryFactory().createLineString(new Coordinate[] {p1, p2});
    Point p = new GeometryFactory().createPoint(q);
    assertEquals(false, l.intersects(p));
    assertEquals(false, CGAlgorithms.isOnLine(q, new Coordinate[] {p1, p2}));
    assertEquals(-1, CGAlgorithms.computeOrientation(p1, p2, q));
  }

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