public class GeoSouthRectangle extends GeoBaseBBox
GeoWideSouthRectangle
.Modifier and Type | Field and Description |
---|---|
protected GeoPoint |
centerPoint
The center point
|
protected double |
cosMiddleLat
The cosine of a middle latitude
|
protected GeoPoint[] |
edgePoints
A point on the edge
|
protected double |
leftLon
The left longitude of the rect
|
protected SidedPlane |
leftPlane
The left plane
|
protected GeoPoint[] |
leftPlanePoints
Notable points for the left plane
|
protected double |
rightLon
The right longitude of the rect
|
protected SidedPlane |
rightPlane
The right plane
|
protected GeoPoint[] |
rightPlanePoints
Notable points for the right plane
|
protected double |
topLat
The top latitude of the rect
|
protected SidedPlane |
topPlane
The top plane
|
protected GeoPoint[] |
topPlanePoints
Notable points for the top plane
|
protected GeoPoint |
ULHC
The upper left hand corner of the rectangle
|
protected GeoPoint |
URHC
The upper right hand corner of the rectangle
|
ALL_INSIDE, NONE_INSIDE, SOME_INSIDE
planetModel
Constructor and Description |
---|
GeoSouthRectangle(PlanetModel planetModel,
double topLat,
double leftLon,
double rightLon)
Accepts only values in the following ranges: lat:
-PI/2 -> PI/2 , lon: -PI -> PI |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
GeoBBox |
expand(double angle)
Expand box by specified angle.
|
Bounds |
getBounds(Bounds bounds)
Compute longitude/latitude bounds for the shape.
|
GeoPoint |
getCenter()
Returns the center of a circle into which the area will be inscribed.
|
GeoPoint[] |
getEdgePoints()
Return a sample point that is on the outside edge/boundary of the shape.
|
double |
getRadius()
Returns the radius of a circle into which the GeoSizeable area can
be inscribed.
|
int |
getRelationship(GeoShape path)
Find the spatial relationship between a shape and the current geo area.
|
int |
hashCode() |
boolean |
intersects(Plane p,
GeoPoint[] notablePoints,
Membership... bounds)
Assess whether a plane, within the provided bounds, intersects
with the shape.
|
boolean |
isWithin(double x,
double y,
double z)
Check if a point is within this shape.
|
protected double |
outsideDistance(DistanceStyle distanceStyle,
double x,
double y,
double z)
Called by a
computeOutsideDistance method if X/Y/Z is not within this shape. |
String |
toString() |
isShapeInsideBBox
computeOutsideDistance, computeOutsideDistance, isWithin
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
computeOutsideDistance, computeOutsideDistance
isWithin
protected final double topLat
protected final double leftLon
protected final double rightLon
protected final double cosMiddleLat
protected final GeoPoint ULHC
protected final GeoPoint URHC
protected final SidedPlane topPlane
protected final SidedPlane leftPlane
protected final SidedPlane rightPlane
protected final GeoPoint[] topPlanePoints
protected final GeoPoint[] leftPlanePoints
protected final GeoPoint[] rightPlanePoints
protected final GeoPoint centerPoint
protected final GeoPoint[] edgePoints
public GeoSouthRectangle(PlanetModel planetModel, double topLat, double leftLon, double rightLon)
-PI/2 -> PI/2
, lon: -PI -> PI
planetModel
- is the planet model.topLat
- is the top latitude.leftLon
- is the left longitude.rightLon
- is the right longitude.public GeoBBox expand(double angle)
GeoBBox
angle
- is the angle amount to expand the GeoBBox by.public boolean isWithin(double x, double y, double z)
Membership
x
- is x coordinate of point to check.y
- is y coordinate of point to check.z
- is z coordinate of point to check.public double getRadius()
GeoSizeable
public GeoPoint[] getEdgePoints()
GeoShape
public GeoPoint getCenter()
GeoSizeable
public boolean intersects(Plane p, GeoPoint[] notablePoints, Membership... bounds)
GeoShape
p
- is the plane to assess for intersection with the shape's edges or
bounding curves.notablePoints
- represents the intersections of the plane with the supplied
bounds. These are used to disambiguate when two planes are identical and it needs
to be determined whether any points exist that fulfill all the bounds.bounds
- are a set of bounds that define an area that an
intersection must be within in order to qualify (provided by a GeoArea).public Bounds getBounds(Bounds bounds)
GeoShape
getBounds
in interface GeoShape
getBounds
in class GeoBaseShape
bounds
- is the optional input bounds object. If this is null,
a bounds object will be created. Otherwise, the input object will be modified.public int getRelationship(GeoShape path)
GeoArea
path
- is the shape to consider.protected double outsideDistance(DistanceStyle distanceStyle, double x, double y, double z)
GeoBaseMembershipShape
computeOutsideDistance
method if X/Y/Z is not within this shape.outsideDistance
in class GeoBaseMembershipShape
public boolean equals(Object o)
equals
in class BasePlanetObject
public int hashCode()
hashCode
in class BasePlanetObject
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.