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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanpointInCircle(Point p, Circle c) booleanpointInCircle(Point p, Point center, Distance radiusDistance) booleanpointInPolygon(Point p, Point... points) booleanpointInPolygon(Point p, Polygon polygon) Methods inherited from class PointInShapeEvaluator
removeFalsePositives, removeFalsePositives, removeFalsePositives, removeFalsePositives
-
Constructor Details
-
AwtPointInShapeEvaluator
public AwtPointInShapeEvaluator()
-
-
Method Details
-
pointInPolygon
Description copied from class:PointInShapeEvaluator- Specified by:
pointInPolygonin 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:PointInShapeEvaluatorDetermine if aPointis 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:
pointInPolygonin 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:
pointInCirclein 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:
pointInCirclein 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.
-