Class GeographyWithin<T>

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

public class GeographyWithin<T> extends Object implements Query<T>
Query that returns items in a geography that are some specified distance from another item or a geometry. The distance is either calculated from the center of a point, or from the buffer zone which is created around the line or polygon feature, see Geometry .buffer()
Author:
Nick Collier, Eric Tatara
  • Constructor Summary

    Constructors
    Constructor
    Description
    GeographyWithin(Geography geography, double distance, Object sourceObject)
    Creates GeographyWithinQuery that returns items in a specified geography that are within the specified distance from the centroid of the source object.
    GeographyWithin(Geography geography, double distance, javax.measure.Unit units, Object sourceObject)
    Creates GeographyWithinQuery that returns items in a specified geography that are within the specified distance from the centroid of the source object.
    GeographyWithin(Geography geography, double distance, javax.measure.Unit units, org.locationtech.jts.geom.Geometry location)
    Creates GeographyWithinQuery that returns items in a specified geography that are within the specified distance from the centroid of the source object.
    GeographyWithin(Geography geography, double distance, org.locationtech.jts.geom.Geometry location)
    Creates GeographyWithinQuery that returns items in a specified geography that are within the specified distance from the centroid of the specified location.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the result of the query.
    Returns an iterable over the objects that are the result of the query and are in the passed in iterable.

    Methods inherited from class java.lang.Object

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

    • GeographyWithin

      public GeographyWithin(Geography geography, double distance, Object sourceObject)
      Creates GeographyWithinQuery that returns items in a specified geography that are within the specified distance from the centroid of the source object.
      Parameters:
      geography - the containing geography
      distance - the distance in METERS
      sourceObject - the object whose neighbors we want
    • GeographyWithin

      public GeographyWithin(Geography geography, double distance, javax.measure.Unit units, Object sourceObject)
      Creates GeographyWithinQuery that returns items in a specified geography that are within the specified distance from the centroid of the source object.
      Parameters:
      geography - the containing geography
      distance - the distance in the specified units
      units - the distance units. These must be convertable to meters.
      sourceObject - the object whose neighbors we want
    • GeographyWithin

      public GeographyWithin(Geography geography, double distance, javax.measure.Unit units, org.locationtech.jts.geom.Geometry location)
      Creates GeographyWithinQuery that returns items in a specified geography that are within the specified distance from the centroid of the source object.
      Parameters:
      geography - the containing geography
      distance - the distance in the specified units
      units - the distance units. These must be convertable to meters.
      location - the source location whose surrounding neighbors we want
    • GeographyWithin

      public GeographyWithin(Geography geography, double distance, org.locationtech.jts.geom.Geometry location)
      Creates GeographyWithinQuery that returns items in a specified geography that are within the specified distance from the centroid of the specified location.
      Parameters:
      geography - the containing geography
      distance - the distance in METERS
      location - the source location whose surrounding neighbors we want
  • Method Details

    • query

      public Iterable<T> query()
      Returns the result of the query.
      Specified by:
      query in interface Query<T>
      Returns:
      an iterable over the objects that are the result of the query.
    • query

      public Iterable<T> query(Iterable<T> set)
      Returns an iterable over the objects that are the result of the query and are in the passed in iterable. This allows queries to be chained together where the result of one query is passed into another.
      Specified by:
      query in interface Query<T>
      Parameters:
      set -
      Returns:
      an iterable over the objects that are the result of the query and are in the passed in iterable.