Package com.vividsolutions.jts.geom

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


       
        LineString originalSplitLine = splitLineBuilder.getOriginalSplitLine();
        // Get the boundary
        Geometry boundary = geometryToSplit.getBoundary();
        // check if the line is contained inside the geometry to be split.
        if (geometryToSplit.contains(originalSplitLine) && !boundary.intersects(originalSplitLine)) {

            // here we could have the sample of closed lines.
            return SplitUtil.isClosedLine(originalSplitLine);
        }
View Full Code Here


          Geometry bboxGeom = new GeometryFactory().toGeometry(bbox);

          Geometry geom = (Geometry) feature.getAttribute(geomDescriptor.getName());

          try{
              return geom.intersects(bboxGeom);
          }catch (Exception e) {
              // ok so exception happened during intersection.  This usually means geometry is a little crazy
              // what to do?...
              EditPlugin.log("Can't do intersection so I'm assuming they intersect", e); //$NON-NLS-1$
              return false;
View Full Code Here

                            double maxSize = -1;
                            int numGeoms = geom.getNumGeometries();
                            for (int i = 0; i < numGeoms; i++) {
                                Polygon poly = (Polygon) geom.getGeometryN(i);
                                if (poly.getArea() > maxSize) {
                                    if (displayGeom.intersects(poly)) {
                                        geom = poly;
                                        maxSize = poly.getArea();
                                    }
                                }
                            }
View Full Code Here

   
    long startTime;
    long endTime;

    System.out.println();
    System.out.println( "Where intersects of simple polygon is: " + boundingBox.intersects( this.simplePolygon ) + " ..." );
   
    startTime = System.currentTimeMillis();
    for (int i=0; i<REPEAT_COUNT; i++)
    {
      this.simplePolygon.intersects( boundingBox );
View Full Code Here

    System.out.println( "Intersects on polygon: " + (endTime - startTime) + " ms" );
   
    startTime = System.currentTimeMillis();
    for (int i=0; i<REPEAT_COUNT; i++)
    {
      boundingBox.intersects( this.simplePolygon );
    }
    endTime = System.currentTimeMillis();
    System.out.println( "Intersects on bounding box: " + (endTime - startTime) + " ms" );
  }
 
View Full Code Here

   
    long startTime;
    long endTime;

    System.out.println();
    System.out.println( "Where intersects of simple polygon is: " + boundingBox.intersects( this.simplePolygon ) + " ..." );
   
    startTime = System.currentTimeMillis();
    for (int i=0; i<REPEAT_COUNT; i++)
    {
      this.simplePolygon.intersects( boundingBox );
View Full Code Here

    System.out.println( "Intersects on polygon: " + (endTime - startTime) + " ms" );
   
    startTime = System.currentTimeMillis();
    for (int i=0; i<REPEAT_COUNT; i++)
    {
      boundingBox.intersects( this.simplePolygon );
    }
    endTime = System.currentTimeMillis();
    System.out.println( "Intersects on bounding box: " + (endTime - startTime) + " ms" );
  }
 
View Full Code Here

   
    long startTime;
    long endTime;

    System.out.println();
    System.out.println( "Where intersects of complex polygon is: " + boundingBox.intersects( this.complexPolygon ) + " ..." );
   
    startTime = System.currentTimeMillis();
    for (int i=0; i<REPEAT_COUNT; i++)
    {
      this.complexPolygon.intersects( boundingBox );
View Full Code Here

    System.out.println( "Intersects on polygon: " + (endTime - startTime) + " ms" );
   
    startTime = System.currentTimeMillis();
    for (int i=0; i<REPEAT_COUNT; i++)
    {
      boundingBox.intersects( this.complexPolygon );
    }
    endTime = System.currentTimeMillis();
    System.out.println( "Intersects on bounding box: " + (endTime - startTime) + " ms" );
  }
 
View Full Code Here

   
    long startTime;
    long endTime;

    System.out.println();
    System.out.println( "Where intersects of complex polygon is: " + boundingBox.intersects( this.complexPolygon ) + " ..." );
   
    startTime = System.currentTimeMillis();
    for (int i=0; i<REPEAT_COUNT; i++)
    {
      this.complexPolygon.intersects( boundingBox );
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.