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 doublehorizAxisYprivate GeoCircleinverseCircle-
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 doublegetYAxis()TheYcoordinate of where the circle axis intersect.private voidinit()private intnumCornersIntersect(Rectangle r)Returns either 0 for none, 1 for some, or 4 for all.private SpatialRelationrelateRectangleCircleWrapsPole(Rectangle r, SpatialContext ctx)protected SpatialRelationrelateRectanglePhase2(Rectangle r, SpatialRelation bboxSect)Called after bounding box is intersected.voidreset(double x, double y, double radiusDEG)Expert: Resets the state of this shape given the arguments.java.lang.StringtoString()-
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:CircleExpert: 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:
resetin interfaceCircle- Overrides:
resetin classCircleImpl
-
init
private void init()
-
getYAxis
protected double getYAxis()
Description copied from class:CircleImplTheYcoordinate of where the circle axis intersect.- Overrides:
getYAxisin classCircleImpl
-
relateRectanglePhase2
protected SpatialRelation relateRectanglePhase2(Rectangle r, SpatialRelation bboxSect)
Called after bounding box is intersected.- Overrides:
relateRectanglePhase2in 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:
toStringin classCircleImpl
-
-