public class PlanetModel extends Object implements SerializableObject
Modifier and Type | Field and Description |
---|---|
double |
ab
The x/y scaling factor
|
double |
c
The z scaling factor
|
double |
flattening
The flattening value
|
double |
inverseAb
The inverse of ab
|
double |
inverseAbSquared
The square of the inverse of ab
|
double |
inverseC
The inverse of c
|
double |
inverseCSquared
The square of the inverse of c
|
double |
inverseScale
The inverse of scale
|
GeoPoint |
MAX_X_POLE
Max X pole
|
GeoPoint |
MAX_Y_POLE
Max Y pole
|
GeoPoint |
MIN_X_POLE
Min X pole
|
GeoPoint |
MIN_Y_POLE
Min Y pole
|
double |
minimumPoleDistance
Minimum surface distance between poles
|
GeoPoint |
NORTH_POLE
North pole
|
double |
scale
The scale of the planet
|
GeoPoint |
SOUTH_POLE
South pole
|
static PlanetModel |
SPHERE
Planet model corresponding to sphere.
|
double |
squareRatio
The square ratio
|
static PlanetModel |
WGS84
Planet model corresponding to WGS84
|
static double |
WGS84_EQUATORIAL
Equatorial radius
|
static double |
WGS84_MEAN
Mean radius
|
static double |
WGS84_POLAR
Polar radius
|
Constructor and Description |
---|
PlanetModel(double ab,
double c)
Constructor.
|
PlanetModel(InputStream inputStream)
Deserialization constructor.
|
Modifier and Type | Method and Description |
---|---|
GeoPoint |
bisection(GeoPoint pt1,
GeoPoint pt2)
Compute a GeoPoint that's a bisection between two other GeoPoints.
|
GeoPoint |
createSurfacePoint(double x,
double y,
double z)
Compute a GeoPoint that's based on (x,y,z) values, but is scaled to actually be on the planet surface.
|
GeoPoint |
createSurfacePoint(Vector vector)
Compute a GeoPoint that's scaled to actually be on the planet surface.
|
boolean |
equals(Object o) |
double |
getMaximumMagnitude()
Find the maximum magnitude of all points on the ellipsoid.
|
double |
getMaximumXValue()
Find the maximum x value.
|
double |
getMaximumYValue()
Find the maximum y value.
|
double |
getMaximumZValue()
Find the maximum z value.
|
double |
getMinimumMagnitude()
Find the minimum magnitude of all points on the ellipsoid.
|
double |
getMinimumXValue()
Find the minimum x value.
|
double |
getMinimumYValue()
Find the minimum y value.
|
double |
getMinimumZValue()
Find the minimum z value.
|
int |
hashCode() |
boolean |
isSphere()
Does this planet model describe a sphere?
|
boolean |
pointOnSurface(double x,
double y,
double z)
Check if point is on surface.
|
boolean |
pointOnSurface(Vector v)
Check if point is on surface.
|
boolean |
pointOutside(double x,
double y,
double z)
Check if point is outside surface.
|
boolean |
pointOutside(Vector v)
Check if point is outside surface.
|
double |
surfaceDistance(GeoPoint pt1,
GeoPoint pt2)
Compute surface distance between two points.
|
GeoPoint |
surfacePointOnBearing(GeoPoint from,
double dist,
double bearing)
Compute new point given original point, a bearing direction, and an adjusted angle (as would be computed by
the surfaceDistance() method above).
|
String |
toString() |
void |
write(OutputStream outputStream)
Serialize to output stream.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
readBitSet, readBoolean, readByteArray, readClass, readDouble, readHeterogeneousArray, readHomogeneousArray, readInt, readLong, readObject, readObject, readObject, readObject, readPlanetObject, readPointArray, readPolygonArray, readString, writeBitSet, writeBoolean, writeByteArray, writeClass, writeDouble, writeHeterogeneousArray, writeHeterogeneousArray, writeHomogeneousArray, writeHomogeneousArray, writeInt, writeLong, writeObject, writePlanetObject, writePointArray, writePointArray, writePolygonArray, writePolygonArray, writeString
public static final PlanetModel SPHERE
public static final double WGS84_MEAN
public static final double WGS84_POLAR
public static final double WGS84_EQUATORIAL
public static final PlanetModel WGS84
public final double ab
public final double c
public final double inverseAb
public final double inverseC
public final double inverseAbSquared
public final double inverseCSquared
public final double flattening
public final double squareRatio
public final double scale
public final double inverseScale
public final GeoPoint NORTH_POLE
public final GeoPoint SOUTH_POLE
public final GeoPoint MIN_X_POLE
public final GeoPoint MAX_X_POLE
public final GeoPoint MIN_Y_POLE
public final GeoPoint MAX_Y_POLE
public final double minimumPoleDistance
public PlanetModel(double ab, double c)
ab
- is the x/y scaling factor.c
- is the z scaling factor.public PlanetModel(InputStream inputStream) throws IOException
inputStream
- is the input stream.IOException
public void write(OutputStream outputStream) throws IOException
SerializableObject
write
in interface SerializableObject
outputStream
- is the output stream to write to.IOException
public boolean isSphere()
public double getMinimumMagnitude()
public double getMaximumMagnitude()
public double getMinimumXValue()
public double getMaximumXValue()
public double getMinimumYValue()
public double getMaximumYValue()
public double getMinimumZValue()
public double getMaximumZValue()
public boolean pointOnSurface(Vector v)
v
- is the point to check.public boolean pointOnSurface(double x, double y, double z)
x
- is the x coord.y
- is the y coord.z
- is the z coord.public boolean pointOutside(Vector v)
v
- is the point to check.public boolean pointOutside(double x, double y, double z)
x
- is the x coord.y
- is the y coord.z
- is the z coord.public GeoPoint createSurfacePoint(Vector vector)
vector
- is the vector.public GeoPoint createSurfacePoint(double x, double y, double z)
x
- is the x value.y
- is the y value.z
- is the z value.public GeoPoint bisection(GeoPoint pt1, GeoPoint pt2)
pt1
- is the first point.pt2
- is the second point.public double surfaceDistance(GeoPoint pt1, GeoPoint pt2)
pt1
- is the first point.pt2
- is the second point.GeoPoint.arcDistance(Vector)
public GeoPoint surfacePointOnBearing(GeoPoint from, double dist, double bearing)
from
- is the starting point.dist
- is the adjusted angle.bearing
- is the direction to proceed.Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.