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

How to use
intersects
method
in
org.geotools.geometry.jts.ReferencedEnvelope3D

Best Java code snippets using org.geotools.geometry.jts.ReferencedEnvelope3D.intersects (Showing top 10 results out of 315)

origin: geotools/geotools

/**
 * Check if the point <code>p</code> overlaps (lies inside) the region of this <code>Envelope
 * </code>.
 *
 * @param p the <code>Coordinate</code> to be tested
 * @return <code>true</code> if the point overlaps this <code>Envelope</code>
 */
public boolean intersects(Coordinate p) {
  return intersects(p.x, p.y, p.z);
}
origin: geotools/geotools

/**
 * @deprecated Use #intersects instead. In the future, #overlaps may be changed to be a true
 *     overlap check; that is, whether the intersection is two-dimensional.
 */
public boolean overlaps(ReferencedEnvelope3D other) {
  return intersects(other);
}
origin: geotools/geotools

/** @deprecated Use #intersects instead. */
public boolean overlaps(double x, double y, double z) {
  return intersects(x, y, z);
}
origin: geotools/geotools

/** @deprecated Use #intersects instead. */
public boolean overlaps(Coordinate p) {
  return intersects(p);
}
origin: geotools/geotools

/**
 * Check if the point <code>(x, y)</code> overlaps (lies inside) the region of this <code>
 * Envelope</code>.
 *
 * @param x the x-ordinate of the point
 * @param y the y-ordinate of the point
 * @param z the z-ordinate of the point
 * @return <code>true</code> if the point overlaps this <code>Envelope</code>
 */
public boolean intersects(double x, double y, double z) {
  if (isNull()) return false;
  return intersects(x, y) && !(z > maxz || z < minz);
}
origin: geotools/geotools

/** Check if this bounding box intersects the provided bounds. */
public boolean intersects(final BoundingBox3D bbox) {
  ensureCompatibleReferenceSystem(bbox);
  return intersects(getJTSEnvelope(bbox));
}
origin: geotools/geotools

public boolean evaluate(Object feature) {
  Geometry other = Converters.convert(property.evaluate(feature), Geometry.class);
  if (other == null) return false;
  return get3DEnvelope(other).intersects(envelope);
}
origin: geotools/geotools

assertFalse(envelope.intersects(1.0, 2.0, 3.0));
assertTrue(envelope.intersects(x_ave, y_ave, z_ave));
assertTrue(envelope.intersects(x_min, y_min, z_min));
assertTrue(envelope.intersects(x_max, y_max, z_max));
assertFalse(envelope.intersects(-x_ave, -y_ave, -z_ave));
assertFalse(envelope.intersects(x_min - delta, y_ave, z_ave));
assertFalse(envelope.intersects(x_max + delta, y_ave, z_ave));
assertFalse(envelope.intersects(x_ave, y_min - delta, z_ave));
assertFalse(envelope.intersects(x_ave, y_max + delta, z_ave));
assertFalse(envelope.intersects(x_ave, y_ave, z_min - delta));
assertFalse(envelope.intersects(x_ave, y_ave, z_max + delta));
origin: geotools/geotools

/**
 * Computes the distance between this and another <code>Envelope</code>. The distance between
 * overlapping Envelopes is 0. Otherwise, the distance is the Euclidean distance between the
 * closest points.
 */
public double distance(ReferencedEnvelope3D env) {
  if (intersects(env)) return 0;
  double dx = 0.0;
  if (getMaxX() < env.getMinX()) dx = env.getMinX() - getMaxX();
  else if (getMinX() > env.getMaxX()) dx = getMinX() - env.getMaxX();
  double dy = 0.0;
  if (getMaxY() < env.getMinY()) dy = env.getMinY() - getMaxY();
  else if (getMinY() > env.getMaxY()) dy = getMinY() - env.getMaxY();
  double dz = 0.0;
  if (maxz < env.minz) dz = env.minz - maxz;
  else if (minz > env.maxz) dz = minz - env.maxz;
  // if either is zero, the envelopes overlap either vertically or
  // horizontally
  if (dx == 0.0 && dz == 0) return dy;
  if (dy == 0.0 && dz == 0) return dx;
  if (dx == 0 && dy == 0) return dz;
  return Math.sqrt(dx * dx + dy * dy + dz * dz);
}
origin: geotools/geotools

/**
 * Computes the intersection of two {@link Envelope}s.
 *
 * @param env the envelope to intersect with
 * @return a new Envelope representing the intersection of the envelopes (this will be the null
 *     envelope if either argument is null, or they do not intersect
 */
public ReferencedEnvelope3D intersection(ReferencedEnvelope3D env) {
  ensureCompatibleReferenceSystem(env);
  if (isNull() || env.isNull() || !intersects(env)) return new ReferencedEnvelope3D();
  double intMinX = getMinX() > env.getMinX() ? getMinX() : env.getMinX();
  double intMinY = getMinY() > env.getMinY() ? getMinY() : env.getMinY();
  double intMinZ = minz > env.minz ? minz : env.minz;
  double intMaxX = getMaxX() < env.getMaxX() ? getMaxX() : env.getMaxX();
  double intMaxY = getMaxY() < env.getMaxY() ? getMaxY() : env.getMaxY();
  double intMaxZ = maxz < env.maxz ? maxz : env.maxz;
  return new ReferencedEnvelope3D(
      intMinX,
      intMaxX,
      intMinY,
      intMaxY,
      intMinZ,
      intMaxZ,
      env.getCoordinateReferenceSystem());
}
org.geotools.geometry.jtsReferencedEnvelope3Dintersects

Javadoc

Check if the point (x, y) overlaps (lies inside) the region of this Envelope.

Popular methods of ReferencedEnvelope3D

  • <init>
    Creates a null envelope with the specified coordinate reference system.
  • getCoordinateReferenceSystem
  • getMaxZ
  • getMinZ
  • expandToInclude
  • getDimension
    Returns the number of dimensions.
  • getMaximum
    Returns the maximal ordinate along the specified dimension.
  • getMinimum
    Returns the minimal ordinate along the specified dimension.
  • init
    Sets this envelope to the specified bounding box.
  • isEmpty
    Returns true if lengths along all dimension are zero.
  • isNull
  • setToNull
    Makes this Envelope a "null" envelope, that is, the envelope of the empty geometry.
  • isNull,
  • setToNull,
  • centre,
  • checkCoordinateReferenceSystemDimension,
  • contains,
  • covers,
  • distance,
  • ensureCompatibleReferenceSystem,
  • equals

Popular in Java

  • Reactive rest calls using spring rest template
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getResourceAsStream (ClassLoader)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top Vim 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