Class AwtPointInShapeEvaluator
java.lang.Object
org.springframework.data.couchbase.repository.query.support.PointInShapeEvaluator
org.springframework.data.couchbase.repository.query.support.AwtPointInShapeEvaluator
A default
PointInShapeEvaluator
implementation based on the JDK's java.awt.geom classes.- Author:
- Simon Baslé
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
pointInCircle
(Point p, Circle c) boolean
pointInCircle
(Point p, Point center, Distance radiusDistance) boolean
pointInPolygon
(Point p, Point... points) boolean
pointInPolygon
(Point p, Polygon polygon) Methods inherited from class org.springframework.data.couchbase.repository.query.support.PointInShapeEvaluator
removeFalsePositives, removeFalsePositives, removeFalsePositives, removeFalsePositives
-
Constructor Details
-
AwtPointInShapeEvaluator
public AwtPointInShapeEvaluator()
-
-
Method Details
-
pointInPolygon
Description copied from class:PointInShapeEvaluator
- Specified by:
pointInPolygon
in classPointInShapeEvaluator
- 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
Description copied from class:PointInShapeEvaluator
Determine if aPoint
is contained by a polygon represented as an array ofpoints
. 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 classPointInShapeEvaluator
- 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
Description copied from class:PointInShapeEvaluator
- Specified by:
pointInCircle
in classPointInShapeEvaluator
- 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
Description copied from class:PointInShapeEvaluator
- Specified by:
pointInCircle
in classPointInShapeEvaluator
- 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.
-