public abstract class GCTPStyleProjection extends MapProjection
GCTPStyleProjection
class provides various static
constants and functions for classes that perform GCTP style
projection computations. The functions are based directly on those
from the GCTPC package.Modifier and Type | Field and Description |
---|---|
static double |
C3P
A useless quirky companion constant to go along with R2D.
|
static double |
D2R
Conversion from degrees to radians.
|
protected double |
ec
The eccentricity value for the spheroid.
|
protected double |
ec2
The eccentricity value squared for the spheroid.
|
static double |
EPSLN
The epsilon value for checking if numbers are very close.
|
protected double |
falseEast
The false easting value.
|
protected double |
falseNorth
The false northing value.
|
static double |
HALF_PI
The value of PI/2.
|
static double |
PI
The value of PI.
|
static double |
R2D
Conversion from radians to degrees.
|
protected double |
rMajor
The semi-major axis in meters.
|
static double |
TWO_PI
The value of 2 PI.
|
datum, DESCRIPTION, forwardAffine, inverseAffine, positiveLon, spheroid, system, zone
dims
ALASKA, ALBERS, AZMEQD, EQRECT, EQUIDC, GEO, GNOMON, GOOD, GVNSP, HAMMER, HOM, IMOLL, LAMAZ, LAMCC, MAX_PROJECTIONS, MERCAT, MILLER, MOLL, OBEQA, ORTHO, POLYC, PROJECTION_NAMES, PS, ROBIN, SNSOID, SOM, SPCS, STEREO, TM, USDEF, UTM, VGRINT, WAGIV, WAGVII
AIRY, AUS_NAT, BESSEL, CLARKE1866, CLARKE1880, EVEREST, GRS1980, HOUGH, INT1909, INT1967, KRASS, MAX_SPHEROIDS, MERCURY1960, MOD_AIRY, MOD_EVEREST, MOD_MER1968, SE_ASIA, SPHERE, SPHEROID_INV_FLAT, SPHEROID_NAMES, SPHEROID_SEMI_MAJOR, SPHEROID_SEMI_MINOR, STD_RADIUS, WGS66, WGS72
Constructor and Description |
---|
GCTPStyleProjection(int system,
int zone,
double rMajor,
double rMinor,
int[] dimensions,
java.awt.geom.AffineTransform affine)
Creates a GCTP style projection.
|
Modifier and Type | Method and Description |
---|---|
static double |
adjust_lon(double x)
Adjusts a longitude angle to be in the range [-180 ..
|
static double |
asinz(double con)
Computes asin and eliminates roundoff error.
|
static int |
calc_utm_zone(double lon)
Calculates the UTM zone number.
|
static double |
e0fn(double x)
Computes the constant e0 which is used
in a series for calculating the distance along a meridian.
|
static double |
e1fn(double x)
Computes the constant e1 which is used
in a series for calculating the distance along a meridian.
|
static double |
e2fn(double x)
Computes the constant e2 which is used
in a series for calculating the distance along a meridian.
|
static double |
e3fn(double x)
Computes the constant e3 which is used
in a series for calculating the distance along a meridian.
|
static double |
e4fn(double x)
Computes the constant e4 used in the Polar Stereographic
projection.
|
static double |
mlfn(double e0,
double e1,
double e2,
double e3,
double phi)
Computes the value of M which is the distance along a meridian
from the Equator to latitude phi.
|
static double |
msfnz(double eccent,
double sinphi,
double cosphi)
Computes the constant small m which is the radius of
a parallel of latitude, phi, divided by the semimajor axis.
|
static double |
pack_angle(double angle)
Packs an angle in degrees to DDDMMMSSS.SS format.
|
static double |
pakcz(double pak)
Converts the 2 digit alternate packed DMS format (+/-)DDDMMSS.SSS
to 3 digit standard packed DMS format (+/-)DDDMMMSSS.SSS.
|
static double |
pakr2dm(double pak)
Converts radians to 3 digit packed DMS format (+/-)DDDMMMSSS.SSS.
|
static double |
phi1z(double eccent,
double qs)
Computes the value phi1, the latitude for the inverse of the
Albers Conical Equal-Area projection.
|
static double |
phi2z(double eccent,
double ts)
Computes the latitude angle, phi2, for the inverse of the
Lambert Conformal Conic and Polar Stereographic projections.
|
static double |
phi3z(double ml,
double e0,
double e1,
double e2,
double e3)
Computes the latitude, phi3, for the inverse of the Equidistant
Conic projection.
|
static double |
phi4z(double eccent,
double e0,
double e1,
double e2,
double e3,
double a,
double b,
double[] c)
Computes phi4, the latitude for the inverse of the
Polyconic projection.
|
static double |
qsfnz(double eccent,
double sinphi,
double cosphi)
Computes the constant small q which is the radius of a
parallel of latitude, phi, divided by the semimajor axis.
|
protected void |
setDatum(Datum datum)
Sets the datum for this projection and pre-computes values
needed and matching spheroid code.
|
void |
setFalse(double falseEast,
double falseNorth)
Sets the false east and north values.
|
static int |
sign(double x)
Gets the sign of a value.
|
static void |
sphdz(int isph,
double[] parm,
double[] r_major,
double[] r_minor,
double[] radius)
Gets the semi-major, semi-minor, and radius axes lengths based on
the parameters and spheroid code.
|
static double |
tsfnz(double eccent,
double phi,
double sinphi)
Computes the constant small t for use in the forward computations
in the Lambert Conformal Conic and the Polar Stereographic
projections.
|
static double |
unpack_angle(double angle)
Unpacks an angle in DDDMMMSSS.SS format to degrees.
|
clone, describe, equals, getAffine, getDatum, getModified, getParameters, getPixelDimensions, getPixelSize, getProjection, getSpheroid, getSpheroidName, getSubset, getSubset, getSystem, getSystemName, getZone, isOrientable, mapTransformFor, mapTransformInv, setAffine, setPositiveLon, transformImpl, transformImpl
get2DVersion, getBoundingBox, getWorldAxes, main, setPointTransform, transformToPoint
distance, getDimensions, getResolution, getSpheroid, getSpheroid, transform, transform, transform, transform
getMetadataMap
public static final double PI
public static final double HALF_PI
public static final double TWO_PI
public static final double EPSLN
public static final double R2D
public static final double C3P
public static final double D2R
protected double falseEast
protected double falseNorth
protected double ec
protected double ec2
protected double rMajor
public GCTPStyleProjection(int system, int zone, double rMajor, double rMinor, int[] dimensions, java.awt.geom.AffineTransform affine) throws java.awt.geom.NoninvertibleTransformException
system
- the map projection system.zone
- the map projection zone for State Plane and UTM
projections.rMajor
- the semi-major axis in meters.rMinor
- the semi-minor axis in meters.dimensions
- the dimensions of the data grid as [rows,
columns]
.affine
- the affine transform for translating data
[row, column]
to map [x, y]
.java.awt.geom.NoninvertibleTransformException
protected void setDatum(Datum datum)
datum
- the new datum to use.public void setFalse(double falseEast, double falseNorth)
falseEast
- the false easting value in meters.falseNorth
- the false northing value in meters.public static double asinz(double con)
con
- the value to compute the arc sine for.public static double msfnz(double eccent, double sinphi, double cosphi)
eccent
- the spheroid eccentricity.sinphi
- sine of the latitude angle.cosphi
- cosine of the latitude angle.public static double qsfnz(double eccent, double sinphi, double cosphi)
eccent
- the spheroid eccentricity.sinphi
- sine of the latitude angle.cosphi
- cosine of the latitude angle.public static double phi1z(double eccent, double qs)
eccent
- the eccentricity angle in radians.qs
- the angle in radians.public static double phi2z(double eccent, double ts)
eccent
- the spheroid eccentricity.ts
- the constant value t.public static double phi3z(double ml, double e0, double e1, double e2, double e3)
ml
- the constant ml.e0
- the constant e0.e1
- the constant e1.e2
- the constant e2.e3
- the constant e3.public static double phi4z(double eccent, double e0, double e1, double e2, double e3, double a, double b, double[] c)
eccent
- the eccentricity squared.e0
- the constant e0.e1
- the constant e1.e2
- the constant e0.e3
- the constant e0.a
- the constant e0.b
- the constant e0.c
- the constant c (modified).public static double pakcz(double pak)
pak
- the angle in alternate packed DMS format.public static double pakr2dm(double pak)
pak
- the angle in radians.public static double e0fn(double x)
x
- the eccentricity squared.public static double e1fn(double x)
x
- the eccentricity squared.public static double e2fn(double x)
x
- the eccentricity squared.public static double e3fn(double x)
x
- the eccentricity squared.public static double e4fn(double x)
x
- the eccentricity.public static double mlfn(double e0, double e1, double e2, double e3, double phi)
e0
- the constant e0.e1
- the constant e1.e2
- the constant e0.e3
- the constant e0.phi
- the latitude value in radians.public static int calc_utm_zone(double lon)
lon
- the longitude in degrees.public static int sign(double x)
x
- the value to get the sign for.public static double tsfnz(double eccent, double phi, double sinphi)
eccent
- the eccentricity of the spheroid.phi
- the latitude phi in radians.sinphi
- the sine of the latitude.public static double adjust_lon(double x)
x
- the input longitude in radians.public static void sphdz(int isph, double[] parm, double[] r_major, double[] r_minor, double[] radius)
parm
are used to define the
values as follows:
parm[0]
is a non-zero value and
parm[1]
is greater than one, the semimajor
axis and radius are set to parm[0]
and the
semiminor axis is set to parm[1]
.parm[0]
is nonzero and
parm[1]
is greater than zero but less than or
equal to one, the semimajor axis and radius are set to
parm[0]
and the semiminor axis is computed
from the eccentricity squared value parm[1]
.
This algorithm is given below.parm[0]
is nonzero and
parm[1]
is equal to zero, the semimajor axis,
radius, and semiminor axis are set to
parm[0]
.parm[0]
equals zero and
parm[1]
is greater than zero, the default
Clarke 1866 is used to assign values to the semimajor
axis, radius and semiminor axis.parm[0]
and parm[1]
equals zero, the semimajor axis and radius are set to
6370997.0 and the semiminor axis is set to zero.SpheroidConstants
interface, and the radius is set to
6370997.0. If the spheroid code is greater than
MAX_SPHEROIDS-1
the default spheroid, Clarke 1866,
is used to define the semimajor and semiminor axis and radius is
set to 6370997.0.The algorithm to define the semiminor axis using the eccentricity squared value is as follows:
semiminor = sqrt(1.0 - ES) * semimajorwhere
ES
is the eccentricity squared.isph
- the spheroid code number.parm
- the projection parameter array.r_major
- the semi-major axis value in meters (modified).r_minor
- the semi-minor axis value in meters (modified).radius
- the radius value in meters (modified).public static double pack_angle(double angle)
angle
- the angle in degrees.public static double unpack_angle(double angle)
angle
- the packed angle in DDDMMMSSS.SS format.