Class WithinQuery<T>

java.lang.Object
repast.simphony.query.space.gis.AbstractGeometryQuery<T>
repast.simphony.query.space.gis.WithinQuery<T>
All Implemented Interfaces:
Query<T>

public class WithinQuery<T> extends AbstractGeometryQuery<T>
Query that returns objects a specific a geometry is within.
  • Field Summary

    Fields inherited from class repast.simphony.query.space.gis.AbstractGeometryQuery

    geography, geom, predicate, sourceObject
  • Constructor Summary

    Constructors
    Constructor
    Description
    WithinQuery(Geography<T> geography, org.locationtech.jts.geom.Geometry geom)
    Creates a WithinQuery that will query the specified geography for objects that contain the specified geometry, that is, objects that the geometry is within.
    WithinQuery(Geography<T> geography, T sourceObject)
    Creates a WithinQuery that will query the specified geography for objects that contain the geometry of the specified object, that is, objects that the geometry is within.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.apache.commons.collections15.Predicate<T>
    Creates a predicate that tests for containment.

    Methods inherited from class repast.simphony.query.space.gis.AbstractGeometryQuery

    query, query

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WithinQuery

      public WithinQuery(Geography<T> geography, T sourceObject)
      Creates a WithinQuery that will query the specified geography for objects that contain the geometry of the specified object, that is, objects that the geometry is within.
      Parameters:
      geography - the geography to query
      sourceObject - the object whose geometry is the container
    • WithinQuery

      public WithinQuery(Geography<T> geography, org.locationtech.jts.geom.Geometry geom)
      Creates a WithinQuery that will query the specified geography for objects that contain the specified geometry, that is, objects that the geometry is within.
      Parameters:
      geography - the geography to query
      geom - the containing geometry
  • Method Details

    • createPredicate

      protected org.apache.commons.collections15.Predicate<T> createPredicate()
      Creates a predicate that tests for containment.
      Specified by:
      createPredicate in class AbstractGeometryQuery<T>
      Returns:
      a predicate that tests for containment.