public class PlanetModel extends Object implements SerializableObject
Modifier and Type | Class and Description |
---|---|
static class |
PlanetModel.DocValueEncoder
Utility class for encoding / decoding from lat/lon (decimal degrees) into sortable doc value numerics (integers)
|
Modifier and Type | Field and Description |
---|---|
double |
a
Semi-major axis
|
double |
b
Semi-minor axis
|
static PlanetModel |
CLARKE_1866
Planet model corresponding to Clarke 1866 ellipsoid
|
double |
DECODE
scalar value used to decode from integer back into double space
|
PlanetModel.DocValueEncoder |
docValueEncoder
utility class used to encode/decode from lat/lon (decimal degrees) into doc value integers
|
double |
inverseScale
The inverse of scale
|
double |
inverseXYScaling
The inverse of xyScaling
|
double |
inverseXYScalingSquared
The square of the inverse of xyScaling
|
double |
inverseZScaling
The inverse of zScaling
|
double |
inverseZScalingSquared
The square of the inverse of zScaling
|
int |
MAX_ENCODED_VALUE
Max encoded value
|
double |
MAX_VALUE
maximum magnitude value for *this* planet model
|
GeoPoint |
MAX_X_POLE
Max X pole
|
GeoPoint |
MAX_Y_POLE
Max Y pole
|
double |
meanRadius
The mean radius of the planet
|
int |
MIN_ENCODED_VALUE
Min encoded value
|
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
|
double |
scaledFlattening
The scaled flattening value
|
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 ellipsoid
|
double |
xyScaling
The x/y scaling factor
|
double |
zScaling
The z scaling factor
|
Constructor and Description |
---|
PlanetModel(double semiMajorAxis,
double semiMinorAxis)
* Construct a Planet Model from the semi major axis, semi minor axis=.
|
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.
|
double |
decodeValue(int x)
Decodes a given integer back into the radian value according to the defined planet model
|
int |
encodeValue(double x)
encode the provided value from double to integer space
|
boolean |
equals(Object o) |
PlanetModel.DocValueEncoder |
getDocValueEncoder()
return reference to the DocValueEncoder used to encode/decode Geo3DDocValues
|
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 |
getMeanRadius()
return the calculated mean radius (in units provided by ab and c)
|
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 PlanetModel WGS84
public static final PlanetModel CLARKE_1866
public final double a
public final double b
public final double xyScaling
public final double zScaling
public final double inverseXYScaling
public final double inverseZScaling
public final double inverseXYScalingSquared
public final double inverseZScalingSquared
public final double scaledFlattening
public final double squareRatio
public final double meanRadius
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 final double MAX_VALUE
public final double DECODE
public final int MAX_ENCODED_VALUE
public final int MIN_ENCODED_VALUE
public final PlanetModel.DocValueEncoder docValueEncoder
public PlanetModel(double semiMajorAxis, double semiMinorAxis)
semiMajorAxis
- is the semi major axis (in meters) defined as 'a' in projection formulae.semiMinorAxis
- is the semi minor axis (in meters) defined as 'b' in projection formulae.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 double getMeanRadius()
public int encodeValue(double x)
public double decodeValue(int x)
public PlanetModel.DocValueEncoder getDocValueEncoder()
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-2021 Apache Software Foundation. All Rights Reserved.