Class AwtPointInShapeEvaluator

java.lang.Object
org.springframework.data.couchbase.repository.query.support.PointInShapeEvaluator
org.springframework.data.couchbase.repository.query.support.AwtPointInShapeEvaluator

public class AwtPointInShapeEvaluator extends PointInShapeEvaluator
A default PointInShapeEvaluator implementation based on the JDK's java.awt.geom classes.
Author:
Simon Baslé
  • Constructor Details

    • AwtPointInShapeEvaluator

      public AwtPointInShapeEvaluator()
  • Method Details

    • pointInPolygon

      public boolean pointInPolygon(Point p, Polygon polygon)
      Description copied from class: PointInShapeEvaluator
      Determine if a Point is contained by a Polygon.
      Specified by:
      pointInPolygon in class PointInShapeEvaluator
      Parameters:
      p - the point to test.
      polygon - the polygon we want the point to be in.
      Returns:
      true if the polygon contains the point, false otherwise.
    • pointInPolygon

      public boolean pointInPolygon(Point p, Point... points)
      Description copied from class: PointInShapeEvaluator
      Determine if a Point is contained by a polygon represented as an array of points. The points are not required to form a closed shape, but can (by having the first and last points be the same).
      Specified by:
      pointInPolygon in class PointInShapeEvaluator
      Parameters:
      p - the point to test.
      points - the Point[] representation of the polygon we want the point to be in.
      Returns:
      true if the polygon contains the point, false otherwise.
    • pointInCircle

      public boolean pointInCircle(Point p, Circle c)
      Description copied from class: PointInShapeEvaluator
      Determine if a Point is contained by a Circle.
      Specified by:
      pointInCircle in class PointInShapeEvaluator
      Parameters:
      p - the point to test.
      c - the Circle we want the point to be in.
      Returns:
      true if the circle contains the point, false otherwise.
    • pointInCircle

      public boolean pointInCircle(Point p, Point center, Distance radiusDistance)
      Description copied from class: PointInShapeEvaluator
      Determine if a Point is contained by a Circle represented by its center Point and Distance radius.
      Specified by:
      pointInCircle in class PointInShapeEvaluator
      Parameters:
      p - the point to test.
      center - the center Point of the Circle we want the point to be in.
      radiusDistance - the Distance radius of the Circle we want the point to be in.
      Returns:
      true if the circle contains the point, false otherwise.