congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Geometry.within
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: com.vividsolutions/jts

/**
 * Default implementation.
 */
public boolean within(Geometry g)
{
 return baseGeom.within(g);
}
 
origin: org.orbisgis/h2gis

  /**
   * @param a Surface Geometry.
   * @param b Geometry instance
   * @return true if the geometry A is within the geometry B
   */
  public static Boolean isWithin(Geometry a,Geometry b) {
    if(a==null || b==null) {
      return null;
    }
    return a.within(b);
  }
}
origin: org.geotools/gt-main

static public boolean within(Geometry arg0,Geometry arg1)
{
   if (arg0 == null || arg1 == null) return false;
   Geometry _this = arg0;
   return _this.within(arg1);
}
origin: org.geotools/gt2-main

static public boolean within(Geometry arg0,Geometry arg1)
{
   Geometry _this = arg0;
   return _this.within(arg1);
}
origin: org.orbisgis/h2gis-functions

  /**
   * @param a Surface Geometry.
   * @param b Geometry instance
   * @return true if the geometry A is within the geometry B
   */
  public static Boolean isWithin(Geometry a,Geometry b) {
    if(a==null || b==null) {
      return null;
    }
    return a.within(b);
  }
}
origin: org.n52.epos/epos-pattern-util

/**
 * @param geom first geometry
 * @param g second geometry
 * @return <code>true</code> if the first geometry is within the second
 */
public static boolean within(Geometry geom, Geometry g) {
  if  (geom == null || g == null) return false;
  return geom.within(g);
}
origin: com.vividsolutions/jts-core

/**
 * Default implementation.
 */
public boolean within(Geometry g)
{
 return baseGeom.within(g);
}
 
origin: org.orbisgis/h2spatial

  /**
   * @param a Surface Geometry.
   * @param b Geometry instance
   * @return true if the geometry A is within the geometry B
   */
  public static Boolean isWithin(Geometry a,Geometry b) {
    if(a==null || b==null) {
      return null;
    }
    return a.within(b);
  }
}
origin: ryantxu/spatial-solr-sandbox

 @Override
 public boolean matches(Geometry geo) {
  return geo.within(queryGeo);
 }
}
origin: org.geotools/gt-render

public boolean within(Geometry g) {
  return geometry.within(g);
}
origin: deegree/deegree3

@Override
public boolean isWithin( Geometry geometry ) {
  JTSGeometryPair jtsGeoms = JTSGeometryPair.createCompatiblePair( this, geometry );
  return jtsGeoms.first.within( jtsGeoms.second );
}
origin: org.n52.series-api/dwd-dao

private boolean checkForBboxFilter(Polygon envelop, WarnCell warnCell) {
  if (envelop != null) {
    return warnCell.getGeometry().within(envelop);
  }
  return true;
}
origin: ryantxu/spatial-solr-sandbox

 @Override
 public boolean matches(Geometry geo) {
  return geo.getEnvelope().within(queryGeo);
 }
}
origin: org.jboss.teiid/teiid-engine

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

origin: org.teiid/teiid-engine

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

origin: NationalSecurityAgency/datawave

public static boolean within(Object fieldValue, String geoString) {
  Geometry otherGeom = GeometryNormalizer.parseGeometry(geoString);
  Geometry thisGeom = getGeometryFromFieldValue(fieldValue);
  return thisGeom.within(otherGeom);
}

origin: teiid/teiid

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

origin: BaseXdb/basex

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

@Override
protected boolean basicEvaluate(Geometry left, Geometry right) {
  Envelope envLeft = left.getEnvelopeInternal();
  Envelope envRight = right.getEnvelopeInternal();
  
   if(envRight.contains(envLeft))
     return left.within(right);
   else
     return false;
 }
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.contains(envLeft))
     return left.within(right);
   else
     return false;
}

com.vividsolutions.jts.geomGeometrywithin

Javadoc

Tests whether this geometry is within the specified geometry.

The within predicate has the following equivalent definitions:

  • Every point of this geometry is a point of the other geometry, and the interiors of the two geometries have at least one point in common.
  • The DE-9IM Intersection Matrix for the two geometries matches [T*F**F***]
  • g.contains(this) = true
    (within is the converse of #contains)
An implication of the definition is that "The boundary of a Geometry is not within the Geometry". In other words, if a geometry A is a subset of the points in the boundary of a geomtry B, A.within(B) = false (As a concrete example, take A to be a LineString which lies in the boundary of a Polygon B.) For a predicate with similar behaviour but avoiding this subtle limitation, see #coveredBy.

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,
  • intersects,
  • union,
  • apply,
  • getLength

Popular in Java

  • Reading from database using SQL prepared statement
  • getApplicationContext (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • findViewById (Activity)
  • Path (java.nio.file)
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Top 12 Jupyter Notebook extensions
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