|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.bbn.openmap.proj.ProjMath
Math functions used by projection code.
| Field Summary | |
static double |
DATELINE_D
Dateline longitude in radians. |
static float |
DATELINE_F
Dateline longitude in radians. |
static double |
LON_RANGE_D
Longitude range in radians. |
static float |
LON_RANGE_F
Longitude range in radians. |
static double |
NORTH_POLE_D
North pole latitude in radians. |
static float |
NORTH_POLE_F
North pole latitude in radians. |
static double |
SOUTH_POLE_D
South pole latitude in radians. |
static float |
SOUTH_POLE_F
South pole latitude in radians. |
| Method Summary | |
static double[] |
arrayDegToRad(double[] degs)
Converts an array of decimal degrees double lat/lons to double radians in place. |
static float[] |
arrayDegToRad(float[] degs)
Converts an array of decimal degrees float lat/lons to float radians in place. |
static double[] |
arrayRadToDeg(double[] rads)
Converts an array of radian double lat/lons to decimal degrees in place. |
static float[] |
arrayRadToDeg(float[] rads)
Converts an array of radian float lat/lons to decimal degrees in place. |
static long |
DEG_TO_SC(double deg)
Convert between decimal degrees and scoords. |
static double |
degToRad(double deg)
Convert degrees to radians. |
static float |
degToRad(float deg)
Convert degrees to radians. |
static float |
geocentric_latitude(float lat,
float flat)
Calculate the geocentric latitude given a geographic latitude. |
static float |
geographic_latitude(float lat,
float flat)
Calculate the geographic latitude given a geocentric latitude. |
protected static float |
getScale(LatLonPoint ll1,
LatLonPoint ll2,
java.awt.Point point1,
java.awt.Point point2,
Projection projection)
Given a couple of points representing a bounding box, find out what the scale should be in order to make those points appear at the corners of the projection. |
static float |
getScale(LatLonPoint ll1,
LatLonPoint ll2,
Projection projection)
Given a couple of points representing a bounding box, find out what the scale should be in order to make those points appear at the corners of the projection. |
static float |
getScale(java.awt.Point point1,
java.awt.Point point2,
Projection projection)
Given a couple of points representing a bounding box, find out what the scale should be in order to make those points appear at the corners of the projection. |
static int |
hashLatLon(float lat,
float lon)
Generate a hashCode value for a lat/lon pair. |
static float |
lonDistance(float lon1,
float lon2)
Calculate the shortest arc distance between two lons. |
static double |
normalize_latitude(double lat,
double epsilon)
Normalizes radian latitude. |
static float |
normalize_latitude(float lat,
float epsilon)
Normalizes radian latitude. |
static double |
qint(double x)
Rounds the quantity away from 0. |
static double |
radToDeg(double rad)
Convert radians to degrees. |
static float |
radToDeg(float rad)
Convert radians to degrees. |
static double |
roundAdjust(double x)
rounds the quantity away from 0. |
static double |
SC_TO_DEG(int sc)
Convert between decimal degrees and scoords. |
static float |
sphericalUnitsToDeg(float u,
float uCircumference)
Converts units (km, nm, miles, etc) to decimal degrees for a spherical planet. |
static float |
sphericalUnitsToRad(float u,
float uCircumference)
Converts units (km, nm, miles, etc) to arc radians for a spherical planet. |
static double |
wrap_longitude(double lon)
Sets radian longitude to something sane. |
static float |
wrap_longitude(float lon)
Sets radian longitude to something sane. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final transient float NORTH_POLE_F
public static final transient float SOUTH_POLE_F
public static final transient double NORTH_POLE_D
public static final transient double SOUTH_POLE_D
public static final transient float DATELINE_F
public static final transient double DATELINE_D
public static final transient float LON_RANGE_F
public static final transient double LON_RANGE_D
| Method Detail |
public static final double roundAdjust(double x)
x - in value
qint(double)public static final double qint(double x)
x - value
public static final float lonDistance(float lon1,
float lon2)
lon1 - radianslon2 - radians
public static final long DEG_TO_SC(double deg)
deg - degrees
public static final double SC_TO_DEG(int sc)
sc - scoords
public static final double radToDeg(double rad)
rad - radians
public static final float radToDeg(float rad)
rad - radians
public static final double degToRad(double deg)
deg - degrees
public static final float degToRad(float deg)
deg - degrees
public static final int hashLatLon(float lat,
float lon)
lat - latitudelon - longitude
public static final float[] arrayDegToRad(float[] degs)
degs - float[] lat/lons in decimal degrees
public static final float[] arrayRadToDeg(float[] rads)
rads - float[] lat/lons in radians
public static final double[] arrayDegToRad(double[] degs)
degs - double[] lat/lons in decimal degrees
public static final double[] arrayRadToDeg(double[] rads)
rads - double[] lat/lons in radians
public static final float normalize_latitude(float lat,
float epsilon)
lat - float latitude in radiansepsilon - epsilon (>= 0) radians distance from pole
Proj.normalize_latitude(float),
LatLonPoint.normalize_latitude(float)
public static final double normalize_latitude(double lat,
double epsilon)
lat - double latitude in radiansepsilon - epsilon (>= 0) radians distance from pole
Proj.normalize_latitude(float),
LatLonPoint.normalize_latitude(float)public static final float wrap_longitude(float lon)
lon - float longitude in radians
LatLonPoint.wrap_longitude(float)public static final double wrap_longitude(double lon)
lon - double longitude in radians
wrap_longitude(float)
public static final float sphericalUnitsToDeg(float u,
float uCircumference)
u - units float valueuCircumference - units circumference of planet
public static final float sphericalUnitsToRad(float u,
float uCircumference)
u - units float valueuCircumference - units circumference of planet
public static final float geocentric_latitude(float lat,
float flat)
Translated from Ken Anderson's lisp code Freeing the Essence of Computation
lat - float geographic latitude in radiansflat - float flatening factor
geographic_latitude(float, float)
public static final float geographic_latitude(float lat,
float flat)
lat - float geocentric latitude in radiansflat - float flatening factor
geocentric_latitude(float, float)
public static float getScale(LatLonPoint ll1,
LatLonPoint ll2,
Projection projection)
ll1 - the upper left coordinates of the bounding box.ll2 - the lower right coordinates of the bounding box.projection - the projection to use for other projection
parameters, like map width and map height.
public static float getScale(java.awt.Point point1,
java.awt.Point point2,
Projection projection)
point1 - a java.awt.Point reflecting a pixel spot on the
projection, usually the upper left corner of the area of
interest.point2 - a java.awt.Point reflecting a pixel spot on the
projection, usually the lower right corner of the area
of interest.projection - the projection to use for other projection
parameters, like map width and map height.
protected static float getScale(LatLonPoint ll1,
LatLonPoint ll2,
java.awt.Point point1,
java.awt.Point point2,
Projection projection)
ll1 - the upper left coordinates of the bounding box.ll2 - the lower right coordinates of the bounding box.point1 - a java.awt.Point reflecting a pixel spot on the
projection that matches the ll1 coordinate, the upper
left corner of the area of interest.point2 - a java.awt.Point reflecting a pixel spot on the
projection that matches the ll2 coordinate, usually the
lower right corner of the area of interest.projection - the projection to use to query to get the
scale for, for projection type and height and width.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||