Class GeoCircle
- java.lang.Object
-
- org.locationtech.spatial4j.shape.BaseShape<SpatialContext>
-
- org.locationtech.spatial4j.shape.impl.CircleImpl
-
- org.locationtech.spatial4j.shape.impl.GeoCircle
-
public class GeoCircle extends CircleImpl
A circle as it exists on the surface of a sphere.
-
-
Field Summary
Fields Modifier and Type Field Description private double
horizAxisY
private GeoCircle
inverseCircle
-
Fields inherited from class org.locationtech.spatial4j.shape.impl.CircleImpl
enclosingBox, point, radiusDEG
-
-
Constructor Summary
Constructors Constructor Description GeoCircle(Point p, double radiusDEG, SpatialContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected double
getYAxis()
TheY
coordinate of where the circle axis intersect.private void
init()
private int
numCornersIntersect(Rectangle r)
Returns either 0 for none, 1 for some, or 4 for all.private SpatialRelation
relateRectangleCircleWrapsPole(Rectangle r, SpatialContext ctx)
protected SpatialRelation
relateRectanglePhase2(Rectangle r, SpatialRelation bboxSect)
Called after bounding box is intersected.void
reset(double x, double y, double radiusDEG)
Expert: Resets the state of this shape given the arguments.java.lang.String
toString()
-
Methods inherited from class org.locationtech.spatial4j.shape.impl.CircleImpl
contains, equals, equals, getArea, getBoundingBox, getBuffered, getCenter, getRadius, getXAxis, hasArea, hashCode, hashCode, isEmpty, relate, relate, relate, relate
-
Methods inherited from class org.locationtech.spatial4j.shape.BaseShape
getContext
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.locationtech.spatial4j.shape.Shape
getContext
-
-
-
-
Field Detail
-
inverseCircle
private GeoCircle inverseCircle
-
horizAxisY
private double horizAxisY
-
-
Constructor Detail
-
GeoCircle
public GeoCircle(Point p, double radiusDEG, SpatialContext ctx)
-
-
Method Detail
-
reset
public void reset(double x, double y, double radiusDEG)
Description copied from interface:Circle
Expert: Resets the state of this shape given the arguments. This is a performance feature to avoid excessive Shape object allocation as well as some argument error checking. Mutable shapes is error-prone so use with care.- Specified by:
reset
in interfaceCircle
- Overrides:
reset
in classCircleImpl
-
init
private void init()
-
getYAxis
protected double getYAxis()
Description copied from class:CircleImpl
TheY
coordinate of where the circle axis intersect.- Overrides:
getYAxis
in classCircleImpl
-
relateRectanglePhase2
protected SpatialRelation relateRectanglePhase2(Rectangle r, SpatialRelation bboxSect)
Called after bounding box is intersected.- Overrides:
relateRectanglePhase2
in classCircleImpl
- Parameters:
bboxSect
- INTERSECTS or CONTAINS from enclosingBox's intersection- Returns:
- DISJOINT, CONTAINS, or INTERSECTS (not WITHIN)
-
relateRectangleCircleWrapsPole
private SpatialRelation relateRectangleCircleWrapsPole(Rectangle r, SpatialContext ctx)
-
numCornersIntersect
private int numCornersIntersect(Rectangle r)
Returns either 0 for none, 1 for some, or 4 for all.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classCircleImpl
-
-