Tabnine Logo
Geometry.intersects
Code IndexAdd Tabnine to your IDE (free)

How to use
intersects
method
in
com.vividsolutions.jts.geom.Geometry

Best Java code snippets using com.vividsolutions.jts.geom.Geometry.intersects (Showing top 20 results out of 351)

origin: com.vividsolutions/jts

/**
 * Default implementation.
 */
public boolean intersects(Geometry g)
{
 return baseGeom.intersects(g);
}
 
origin: com.vividsolutions/jts

/**
 * Tests whether this geometry is disjoint from the argument geometry.
 * <p>
 * The <code>disjoint</code> predicate has the following equivalent definitions:
 * <ul>
 * <li>The two geometries have no point in common
 * <li>The DE-9IM Intersection Matrix for the two geometries matches 
 * <code>[FF*FF****]</code>
 * <li><code>! g.intersects(this) = true</code>
 * <br>(<code>disjoint</code> is the inverse of <code>intersects</code>)
 * </ul>
 *
 *@param  g  the <code>Geometry</code> with which to compare this <code>Geometry</code>
 *@return        <code>true</code> if the two <code>Geometry</code>s are
 *      disjoint
 *
 * @see Geometry#intersects
 */
public boolean disjoint(Geometry g) {
 return ! intersects(g);
}
origin: opentripplanner/OpenTripPlanner

for (NamedArea area : intersects) {
  Geometry polygon = area.getPolygon();
  if (!polygon.intersects(startPoint))
    continue;
  Geometry lineParts = line.intersection(polygon);
origin: com.vividsolutions/jts

 static List findIntersecting(Collection targetGeoms, Geometry queryGeom)
 {
    List result = new ArrayList();
    for (Iterator it = targetGeoms.iterator(); it.hasNext(); ) {
      Geometry test = (Geometry) it.next();
      if (test.intersects(queryGeom)) {
        result.add(test);
      }
    }
   return result;
 }
}
origin: opentripplanner/OpenTripPlanner

MultiPolygon polygon = area.toJTSMultiPolygon();
if (!(polygon.intersects(startPoint) || polygon.getBoundary()
    .intersects(startPoint)))
  continue;
Geometry lineParts = line.intersection(polygon);
origin: org.geotools/gt-main

static public boolean intersects(Geometry arg0,Geometry arg1)
{
   if (arg0 == null || arg1 == null) return false;
   Geometry _this = arg0;
   return _this.intersects(arg1);
}
origin: com.vividsolutions/jts-core

/**
 * Default implementation.
 */
public boolean intersects(Geometry g)
{
 return baseGeom.intersects(g);
}
 
origin: DataSystemsLab/GeoSpark

  public boolean match(Geometry spatialObject, Geometry queryWindow)
  {
    if (considerBoundaryIntersection) {
      if (queryWindow.intersects(spatialObject)) { return true; }
    }
    else {
      if (queryWindow.covers(spatialObject)) { return true; }
    }
    return false;
  }
}
origin: DataSystemsLab/GeoSpark

  private boolean geoMatch(Geometry left, Geometry right)
  {
    //log.warn("Check "+left.toText()+" with "+right.toText());
    return considerBoundaryIntersection ? left.intersects(right) : left.covers(right);
  }
}
origin: org.datasyslab/geospark

  private boolean geoMatch(Geometry left, Geometry right)
  {
    //log.warn("Check "+left.toText()+" with "+right.toText());
    return considerBoundaryIntersection ? left.intersects(right) : left.covers(right);
  }
}
origin: org.datasyslab/geospark

  public boolean match(Geometry spatialObject, Geometry queryWindow)
  {
    if (considerBoundaryIntersection) {
      if (queryWindow.intersects(spatialObject)) { return true; }
    }
    else {
      if (queryWindow.covers(spatialObject)) { return true; }
    }
    return false;
  }
}
origin: org.geotools/gt-coverage

/**
 * Helper method for {@link #intersects(Geometry, Geometry) intersects(Geometry, Geometry)}
 */
private static boolean intersects(GeometryCollection gc, Geometry g) {
  final int size=gc.getNumGeometries();
  for (int i = 0; i < size; i++) {
    Geometry g1 = (Geometry)gc.getGeometryN(i);
    if( g1.intersects(g) )
      return true;
  }
  return false;
}
origin: org.jboss.teiid/teiid-engine

public static Boolean intersects(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException {
  Geometry g1 = getGeometry(geom1);
  Geometry g2 = getGeometry(geom2);
  return g1.intersects(g2);
}

origin: org.teiid/teiid-engine

public static Boolean intersects(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException {
  Geometry g1 = getGeometry(geom1);
  Geometry g2 = getGeometry(geom2);
  return g1.intersects(g2);
}

origin: BaseXdb/basex

 @Override
 public Item item(final QueryContext qc, final InputInfo ii) throws QueryException {
  return Bln.get(checkGeo(0, qc).intersects(checkGeo(1, qc)));
 }
}
origin: org.geotools/gt-main

protected final boolean basicEvaluate(Geometry left, Geometry right) {
  Envelope envLeft = left.getEnvelopeInternal();
  Envelope envRight = right.getEnvelopeInternal();
  return envRight.intersects(envLeft) && left.intersects(right);
}
origin: org.geotools/gt-main

protected boolean basicEvaluate(Geometry left, Geometry right) {
  Envelope envLeft = left.getEnvelopeInternal();
  Envelope envRight = right.getEnvelopeInternal();
  if (envRight.intersects(envLeft)) {
    return left.intersects(right);
  } else {
    return false;
  }
  // Note that this is a pretty permissive logic
  // if the type has somehow been mis-set (can't happen externally)
  // then true is returned in all cases
}
origin: org.jboss.teiid/teiid-engine

public static boolean boundingBoxIntersects(
    GeometryType geom1, GeometryType geom2) throws FunctionExecutionException {
  Geometry g1 = getGeometry(geom1);
  Geometry g2 = getGeometry(geom2);
  return g1.getEnvelope().intersects(g2.getEnvelope());
}
origin: org.teiid/teiid-engine

public static boolean boundingBoxIntersects(
    GeometryType geom1, GeometryType geom2) throws FunctionExecutionException {
  Geometry g1 = getGeometry(geom1);
  Geometry g2 = getGeometry(geom2);
  return g1.getEnvelope().intersects(g2.getEnvelope());
}
origin: org.geotools/gt2-main

public boolean evaluate(Object feature) {
  if (feature instanceof Feature && !validate((Feature)feature))
    return false;
  
  Geometry left = getLeftGeometry(feature);
  Geometry right = getRightGeometry(feature);
  
  Envelope envLeft = left.getEnvelopeInternal();
  Envelope envRight = right.getEnvelopeInternal();
  
  if(envRight.intersects(envLeft))
    return left.intersects(right);
  else
    return false;
}

com.vividsolutions.jts.geomGeometryintersects

Javadoc

Tests whether this geometry intersects the argument geometry.

The intersects predicate has the following equivalent definitions:

  • The two geometries have at least one point in common
  • The DE-9IM Intersection Matrix for the two geometries matches at least one of the patterns
    • [T********]
    • [*T*******]
    • [***T*****]
    • [****T****]
  • ! g.disjoint(this) = true
    (intersects is the inverse of disjoint)

Popular methods of Geometry

  • getEnvelopeInternal
    Gets an Envelope containing the minimum and maximum x and y values in this Geometry. If the geometr
  • getCoordinates
    Returns an array containing the values of all the vertices for this geometry. If the geometry is a c
  • isEmpty
    Tests whether the set of points covered by this Geometry is empty.
  • getCentroid
    Computes the centroid of this Geometry. The centroid is equal to the centroid of the set of componen
  • getGeometryN
    Returns an element Geometry from a GeometryCollection(or this, if the geometry is not a collection).
  • toText
    Returns the Well-known Text representation of this Geometry. For a definition of the Well-known Text
  • getNumGeometries
    Returns the number of Geometrys in a GeometryCollection(or 1, if the geometry is not a collection).
  • getFactory
    Gets the factory which contains the context in which this geometry was created.
  • getGeometryType
    Returns the name of this Geometry's actual class.
  • getSRID
    Returns the ID of the Spatial Reference System used by the Geometry. JTS supports Spatial Reference
  • getCoordinate
    Returns a vertex of this Geometry (usually, but not necessarily, the first one). The returned coordi
  • intersection
    Computes a Geometry representing the point-set which is common to both this Geometry and the other
  • getCoordinate,
  • intersection,
  • buffer,
  • contains,
  • getArea,
  • getEnvelope,
  • union,
  • apply,
  • getLength

Popular in Java

  • Reading from database using SQL prepared statement
  • getExternalFilesDir (Context)
  • findViewById (Activity)
  • startActivity (Activity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now