public class FlatGlobe extends EllipsoidalGlobe
geodeticToCartesian
cartesianToGeodetic.
This globe uses a Cartesian coordinate system in the world plane is located at the origin and has UNIT-Z as normal.
The Y axis points to the north pole. The Z axis points up. The X axis completes a right-handed coordinate system, and
points east. Latitude and longitude zero are at the origin on y and x respectively. Sea level is at z = zero.EllipsoidalGlobe.StateKey| Modifier and Type | Field and Description |
|---|---|
static String |
PROJECTION_LAT_LON
Latitude/Longitude
projection.
|
static String |
PROJECTION_MERCATOR
Mercator projection.
|
static String |
PROJECTION_MODIFIED_SINUSOIDAL |
static String |
PROJECTION_SINUSOIDAL
Sinusoidal projection.
|
egm96, equatorialRadius, es, polarRadius| Constructor and Description |
|---|
FlatGlobe(double equatorialRadius,
double polarRadius,
double es,
ElevationModel em)
Create a new globe.
|
| Modifier and Type | Method and Description |
|---|---|
protected Position |
cartesianToGeodetic(Vec4 cart)
Compute the geographic position to corresponds to a Cartesian point.
|
Vec4 |
computeNorthPointingTangentAtLocation(Angle latitude,
Angle longitude)
Computes a vector tangent to this globe and pointing toward the north pole.
|
Vec4 |
computeSurfaceNormalAtLocation(Angle latitude,
Angle longitude)
Returns the normal to the Globe at the specified position.
|
Vec4 |
computeSurfaceNormalAtPoint(Vec4 point)
Returns the normal to the Globe at the specified cartiesian point.
|
Matrix |
computeSurfaceOrientationAtPosition(Angle latitude,
Angle longitude,
double metersElevation)
Returns the cartesian transform Matrix that maps model coordinates to a local coordinate system at (latitude,
longitude, metersElevation).
|
Matrix |
computeSurfaceOrientationAtPosition(Position position)
Returns the cartesian transform Matrix that maps model coordinates to a local coordinate system at (latitude,
longitude, metersElevation).
|
protected Vec4 |
geodeticToCartesian(Angle latitude,
Angle longitude,
double metersElevation)
Maps a position to a flat world Cartesian coordinates.
|
double |
getElevation(Angle latitude,
Angle longitude)
Indicates the elevation at a specified location.
|
GlobeStateKey |
getGlobeStateKey()
Returns a typed state key identifying this globe's current configuration.
|
GlobeStateKey |
getGlobeStateKey(DrawContext dc)
Returns a typed state key identifying this globe's current configuration.
|
String |
getProjection()
Indicates the projection used to project the globe onto a plane.
|
double |
getRadiusAt(Angle latitude,
Angle longitude)
Indicates the radius of the globe at a location.
|
double |
getRadiusAt(LatLon latLon)
Indicates this globe's radius at a specified location.
|
Object |
getStateKey(DrawContext dc)
Returns a state key identifying this globe's current configuration.
|
protected Intersection[] |
intersect(Line line,
double equRadius,
double polarRadius) |
boolean |
intersects(Line line)
Determines whether or not
line intersects this Extent. |
boolean |
intersects(Plane plane)
Calculate whether or not this
Extent is intersected by plane. |
boolean |
isPointAboveElevation(Vec4 point,
double elevation)
Determines whether a point is above a given elevation
|
void |
setProjection(String projection)
Set the projection used to project the globe onto a plane.
|
applyEGMA96Offsets, computeModelCoordinateOriginTransform, computeModelCoordinateOriginTransform, computePointFromLocation, computePointFromPosition, computePointFromPosition, computePointFromPosition, computePositionFromPoint, getCenter, getDiameter, getEccentricitySquared, getEffectiveRadius, getElevationModel, getElevations, getEquatorialRadius, getExtent, getIntersectionPosition, getMaxElevation, getMaximumRadius, getMinAndMaxElevations, getMinAndMaxElevations, getMinElevation, getPolarRadius, getProjectedArea, getRadius, getTessellator, intersect, intersect, intersect, intersects, makeElevationModel, setElevationModel, setTessellator, tessellateonMessage, propertyChangeaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuespropertyChangeonMessagepublic static final String PROJECTION_LAT_LON
public static final String PROJECTION_MERCATOR
public static final String PROJECTION_MODIFIED_SINUSOIDAL
public static final String PROJECTION_SINUSOIDAL
public FlatGlobe(double equatorialRadius,
double polarRadius,
double es,
ElevationModel em)
setProjection(String).equatorialRadius - Radius of the globe at the equator.polarRadius - Radius of the globe at the poles.es - Square of the globe's eccentricity.em - Elevation model. May be null.protected Position cartesianToGeodetic(Vec4 cart)
EllipsoidalGlobecartesianToGeodetic in class EllipsoidalGlobecart - Cartesian point to convert to geographic.cart.EllipsoidalGlobe.geodeticToCartesian(gov.nasa.worldwind.geom.Angle, gov.nasa.worldwind.geom.Angle, double)public Vec4 computeNorthPointingTangentAtLocation(Angle latitude, Angle longitude)
GlobecomputeNorthPointingTangentAtLocation in interface GlobecomputeNorthPointingTangentAtLocation in class EllipsoidalGlobelatitude - Latitude of the location at which to compute the tangent vector.longitude - Longitude of the location at which to compute the tangent vector.public Vec4 computeSurfaceNormalAtLocation(Angle latitude, Angle longitude)
EllipsoidalGlobecomputeSurfaceNormalAtLocation in interface GlobecomputeSurfaceNormalAtLocation in class EllipsoidalGlobelatitude - the latitude of the position.longitude - the longitude of the position.public Vec4 computeSurfaceNormalAtPoint(Vec4 point)
EllipsoidalGlobecomputeSurfaceNormalAtPoint in interface GlobecomputeSurfaceNormalAtPoint in class EllipsoidalGlobepoint - the cartesian point.public Matrix computeSurfaceOrientationAtPosition(Angle latitude, Angle longitude, double metersElevation)
EllipsoidalGlobecomputeSurfaceOrientationAtPosition in interface GlobecomputeSurfaceOrientationAtPosition in class EllipsoidalGlobelatitude - the latitude of the position.longitude - the longitude of the position.metersElevation - the number of meters above or below mean sea level.public Matrix computeSurfaceOrientationAtPosition(Position position)
EllipsoidalGlobecomputeSurfaceOrientationAtPosition in interface GlobecomputeSurfaceOrientationAtPosition in class EllipsoidalGlobeposition - the latitude, longitude, and number of meters above or below mean sea level.protected Vec4 geodeticToCartesian(Angle latitude, Angle longitude, double metersElevation)
geodeticToCartesian in class EllipsoidalGlobelatitude - the latitude of the position.longitude - the longitude of the position.metersElevation - the number of meters above or below mean sea level.public double getElevation(Angle latitude, Angle longitude)
GlobegetElevation in interface GlobegetElevation in class EllipsoidalGlobelatitude - the latitude of the location at which to determine elevation.longitude - the longitude of the location at which to determine elevation.Globe.getElevationModel()public GlobeStateKey getGlobeStateKey()
GlobegetGlobeStateKey in interface GlobegetGlobeStateKey in class EllipsoidalGlobepublic GlobeStateKey getGlobeStateKey(DrawContext dc)
GlobegetGlobeStateKey in interface GlobegetGlobeStateKey in class EllipsoidalGlobedc - the current draw context.public String getProjection()
setProjection(String)public double getRadiusAt(Angle latitude, Angle longitude)
GlobegetRadiusAt in interface GlobegetRadiusAt in class EllipsoidalGlobelatitude - Latitude of the location at which to determine radius.longitude - Longitude of the location at which to determine radius.public double getRadiusAt(LatLon latLon)
GlobegetRadiusAt in interface GlobegetRadiusAt in class EllipsoidalGlobelatLon - the location of interest.public Object getStateKey(DrawContext dc)
GlobegetStateKey in interface GlobegetStateKey in class EllipsoidalGlobedc - the current draw context.protected Intersection[] intersect(Line line, double equRadius, double polarRadius)
intersect in class EllipsoidalGlobepublic boolean intersects(Line line)
Extentline intersects this Extent. This method may be faster than
checking the size of the array returned by intersect(Line). Implementing methods must ensure that
this method returns true if and only if intersect(Line) returns a non-null array containing at least
one element.intersects in interface Extentintersects in class EllipsoidalGlobeline - the Line with which to test for intersection.public boolean intersects(Plane plane)
ExtentExtent is intersected by plane.intersects in interface Extentintersects in class EllipsoidalGlobeplane - the Plane with which to test for intersection.plane is found to intersect this Extent.public boolean isPointAboveElevation(Vec4 point, double elevation)
isPointAboveElevation in interface GlobeisPointAboveElevation in class EllipsoidalGlobepoint - the Vec4 point to test.elevation - the elevation to test for.public void setProjection(String projection)
projection - New projection. One of PROJECTION_LAT_LON, PROJECTION_MERCATOR, PROJECTION_SINUSOIDAL, or PROJECTION_MODIFIED_SINUSOIDAL.