|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.cs.utilities.ProjectionUtils
public class ProjectionUtils
The Utils
class combines some helpful constants and forms.
Field Summary | |
---|---|
static double |
DTR
Degrees to Radians (Math.PI/180.0) |
static double |
EPS10
A small epsilon value |
static double |
EPS11
An even smaller epsilon value |
static double |
HALFPI
Cotaining the value 0.5*pi |
static double |
QUARTERPI
Containing the value 0.25*pi |
static double |
RTD
Radians to Degrees (180.0/Math.PI) |
static double |
TWOPI
Containing the value 2*pi |
static Rectangle2D |
WORLD_BOUNDS
The max and min of the projected word map in degrees (-180, -90, 360, 180) |
static Rectangle2D |
WORLD_BOUNDS_RAD
The max and min of the projected word map in radians (-Math.PI, -HALFPI, TWOPI, Math.PI) |
Constructor Summary | |
---|---|
ProjectionUtils()
|
Method Summary | |
---|---|
static double |
acosScaled(double value)
A helper method, which returns the acos from value or if value < -1 pi or value>1 0. |
static double |
asinScaled(double value)
A helper method, which returns the asin from value or if value < -1 (-pi/2) or value>1 (pi/2). |
static double |
authlat(double beta,
double[] APA)
Deprecated. use calcPhiFromAuthalicLatitude(double, double[]) instead.; |
static double[] |
authset(double eccentricitySquared)
Deprecated. use getAuthalicLatitudeSeriesValues(double) instead.; |
static double |
calcMFromSnyder(double sinphi,
double cosphi,
double eccentricitySquared)
This method can be used to calculate the value of a variable called 'm' by Snyder (Snyder p.101 14-15). |
static double |
calcPhiFromAuthalicLatitude(double beta,
double[] APA)
Gets phi from the authalic latitude beta and the precalculated values of the adams? |
static double |
calcPhiFromConformalLatitude(double chi,
double[] APA)
Gets Phi from the given conformal latitude chi and the precalculated values (gotten from preCalcedThetaSeries(double) ) of the adams? |
static double |
calcPhiFromMeridianDistance(double initialValue,
double squaredEccentricity,
double[] en)
This method calcs lattitude phi from a given distance along the meridian to the equator for a a given ellispoid and is therefore the inverse of the getDistanceAlongMeridian(double, double, double, double[]) . |
static double |
calcQForAuthalicLatitude(double sinphi,
double eccentricity)
From the proj4 library, to determine small q which is needed to calculate the authalic (equal-areaed) latitude beta, on a sphere having the same surface area as the ellipsoid, relative to the ellipsoid. |
static double |
conformalLatitudeInnerPart(double phi,
double sinphi,
double eccentricity)
This method calculates the innerpart of the conformal latitude's definition (Snyder p.15 3-1). |
static double |
decMinSecToRadians(double inCoord)
Converts a Deegree.MinSec value into it's radian equivalent. |
static double[] |
enfn(double es)
Deprecated. Use getRectifiyingLatitudeValues(double) instead |
static double[] |
getAuthalicLatitudeSeriesValues(double eccentricitySquared)
Pre-Calculates the values (used for the adams? |
static double |
getDistanceAlongMeridian(double phi,
double sphi,
double cphi,
double[] en)
This method calcs the distance along the meridian from the equator to latitude phi for a a given ellispoid Snyder (p.17 3-21). |
static double[] |
getRectifiyingLatitudeValues(double es)
Pre Calculates the values for the series to calculate for a given ellipsoid with given eccentricity the distance along the meridian from the equator to a given latitude getDistanceAlongMeridian(double, double, double, double[]) . |
static double |
inv_mlfn(double initialValue,
double squaredEccentricity,
double[] en)
Deprecated. Use calcPhiFromMeridianDistance(double,double,double[]) instead |
static double |
length(double dx,
double dy)
Calcs the length of a vector given by two points x and y |
static double |
mlfn(double phi,
double sphi,
double cphi,
double[] en)
Deprecated. Use getDistanceAlongMeridian(double,double,double,double[]) instead |
static double |
msfn(double sinphi,
double cosphi,
double eccentricitySquared)
Deprecated. Use calcMFromSnyder(double,double,double) instead |
static double |
normalizeLatitude(double angle)
A helper method modulos (pi)the given angle (in radians) until the result fits betwee -HALFPI and HALF_PI. |
static double |
normalizeLongitude(double angle)
A helper method modulos (2*pi)the given angle (in radians) until the result fits betwee -PI and PI. |
static double[] |
preCalcedThetaSeries(double eccentricitySquared)
Pre-Calculates the values (used for the adams? |
static double |
qsfn(double sinphi,
double e)
Deprecated. use calcQForAuthalicLatitude(double, double) instead. |
static double |
radiansToDecMinSec(double inCoord)
Converts a radian to its Deegree.MinSec equivalent. |
static double |
ssfn(double phi,
double sinphi,
double eccentricity)
Deprecated. Use conformalLatitudeInnerPart(double,double,double) instead |
static double |
tanHalfCoLatitude(double phi,
double sinphi,
double eccentricity)
This method calculates the tangens of the half colatitude from the conformal latitude (Snyder p.108 15-9). |
static double |
tsfn(double phi,
double sinphi,
double eccentricity)
Deprecated. Use tanHalfCoLatitude(double,double,double) instead |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double EPS10
public static final double EPS11
public static final double HALFPI
public static final double QUARTERPI
public static final double TWOPI
public static final double RTD
public static final double DTR
public static final Rectangle2D WORLD_BOUNDS_RAD
public static final Rectangle2D WORLD_BOUNDS
Constructor Detail |
---|
public ProjectionUtils()
Method Detail |
---|
@Deprecated public static double qsfn(double sinphi, double e)
calcQForAuthalicLatitude(double, double)
instead.
sinphi
- the sine of the angle between the positive z-axis and the line formed between the origin and P.e
- the eccentricity
public static double calcQForAuthalicLatitude(double sinphi, double eccentricity)
sinphi
- the sine of the angle between the positive z-axis and the line formed between the origin and P.eccentricity
- the eccentricity of the ellipsoid to map the sphere to.
public static double[] preCalcedThetaSeries(double eccentricitySquared)
eccentricitySquared
- the squared eccentricity from the ellipsoid to calculate the theta for.
public static double calcPhiFromConformalLatitude(double chi, double[] APA)
preCalcedThetaSeries(double)
) of the adams? serie. From Snyder (3-5).
chi
- the conformal latitudeAPA
- the precalculated values from the serie gotten from
preCalcedThetaSeries(double)
.
@Deprecated public static double[] authset(double eccentricitySquared)
getAuthalicLatitudeSeriesValues(double)
instead.;
eccentricitySquared
- the squared eccentricity from the ellipsoid to calculate the authalic latitude for.
public static double[] getAuthalicLatitudeSeriesValues(double eccentricitySquared)
eccentricitySquared
- the squared eccentricity from the ellipsoid to calculate the authalic latitude for.
@Deprecated public static double authlat(double beta, double[] APA)
calcPhiFromAuthalicLatitude(double, double[])
instead.;
beta
- authalic latitude.APA
- the precalculated values from the series gotten from
getAuthalicLatitudeSeriesValues(double)
.
public static double calcPhiFromAuthalicLatitude(double beta, double[] APA)
beta
- authalic latitude.APA
- the precalculated values from the serie gotten from
getAuthalicLatitudeSeriesValues(double)
.
public static double length(double dx, double dy)
dx
- of the vectordy
- of the vector
public static double conformalLatitudeInnerPart(double phi, double sinphi, double eccentricity)
phi
- to calculate the conformal latitude fromsinphi
- the sinus of the phi.eccentricity
- of the ellipsoid to which the phi should be made conformal to.
@Deprecated public static double ssfn(double phi, double sinphi, double eccentricity)
conformalLatitudeInnerPart(double,double,double)
instead
phi
- to calculate the conformal latitude fromsinphi
- the sinus of the phi.eccentricity
- of the ellipsoid to which the phi should be made conformal to.
public static double tanHalfCoLatitude(double phi, double sinphi, double eccentricity)
phi
- to calculate the half of the co latitude of the conformal latitude fromsinphi
- the sinus of the phi.eccentricity
- of the ellipsoid to which the phi should be made conformal to.
@Deprecated public static double tsfn(double phi, double sinphi, double eccentricity)
tanHalfCoLatitude(double,double,double)
instead
phi
- to calculate the half of the co latitude of the conformal latitude fromsinphi
- the sinus of the phi.eccentricity
- of the ellipsoid to which the phi should be made conformal to.
@Deprecated public static double msfn(double sinphi, double cosphi, double eccentricitySquared)
calcMFromSnyder(double,double,double)
instead
sinphi
- the sinus of the phicosphi
- the cosinus of the phieccentricitySquared
- the value eccentricity * eccentricity.
public static double calcMFromSnyder(double sinphi, double cosphi, double eccentricitySquared)
sinphi
- the sinus of the phicosphi
- the cosinus of the phieccentricitySquared
- the value eccentricity * eccentricity.
@Deprecated public static double[] enfn(double es)
getRectifiyingLatitudeValues(double)
instead
getDistanceAlongMeridian(double, double, double, double[])
.
es
- the squared eccentricity of the underlying ellipsoid.
public static double[] getRectifiyingLatitudeValues(double es)
getDistanceAlongMeridian(double, double, double, double[])
.
es
- the squared eccentricity of the underlying ellipsoid.
@Deprecated public static double mlfn(double phi, double sphi, double cphi, double[] en)
getDistanceAlongMeridian(double,double,double,double[])
instead
phi
- the lattitude of the point in radianssphi
- the sinus of the latitudecphi
- the cosinus of the latitudeen
- an array (of length 5) containing the precalculate values for this ellipsoid gotten from
getRectifiyingLatitudeValues(double)
.
public static double getDistanceAlongMeridian(double phi, double sphi, double cphi, double[] en)
phi
- the lattitude of the point in radianssphi
- the sinus of the latitudecphi
- the cosinus of the latitudeen
- an array (of length 5) containing the precalculate values for this ellipsoid gotten from
getRectifiyingLatitudeValues(double)
.
@Deprecated public static double inv_mlfn(double initialValue, double squaredEccentricity, double[] en)
calcPhiFromMeridianDistance(double,double,double[])
instead
getDistanceAlongMeridian(double, double, double, double[])
. Phi is
determined to EPS (1e-11) radians, which is about 1e-6 seconds.
initialValue
- to calculate phi from, a good starting value is using the (distance along the meridian / y*scale) e.g.
the scaled y value on the meridian.squaredEccentricity
- the squared eccentricity of the ellipsoid.en
- an array (of length 5) containing the precalculate values for this ellipsoid gotten from
getRectifiyingLatitudeValues(double)
.
public static double calcPhiFromMeridianDistance(double initialValue, double squaredEccentricity, double[] en)
getDistanceAlongMeridian(double, double, double, double[])
. Phi is
determined to EPS (1e-11) radians, which is about 1e-6 seconds.
initialValue
- to calculate phi from, a good starting value is using the (distance along the meridian / y*scale) e.g.
the scaled y value on the meridian.squaredEccentricity
- the squared eccentricity of the ellipsoid.en
- an array (of length 5) containing the precalculate values for this ellipsoid gotten from
getRectifiyingLatitudeValues(double)
.
public static double acosScaled(double value)
value
- (in radians) from which the acos must be calculated
public static double asinScaled(double value)
value
- (in radians) from which the asin must be calculated
public static double normalizeLatitude(double angle)
angle
- in radians
public static double normalizeLongitude(double angle)
angle
- to be normalized
public static double decMinSecToRadians(double inCoord)
for example 13.120637 dms -> 13.201769444444446° -> 0.23041434389473822 rd
inCoord
- to be converted to radians.
public static double radiansToDecMinSec(double inCoord)
For example 0.23041434389473822 rd -> 13.201769444444446° -> 13.120637 dms
inCoord
- to be converted to degrees.minsec
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |