public abstract class GCTPCStyleProjection extends GCTPStyleProjection
GCTPCStyleProjection
class provides method signatures
that correspond directly with the GCTPC code modules for ease of converting
GCTPC code to Java.Modifier and Type | Field and Description |
---|---|
static int |
ERROR |
static int |
IN_BREAK |
static int |
LAT |
static int |
LON
The indices into return value array for inverse transforms.
|
static int |
OK
The return codes for GCTPC functions.
|
protected double[] |
params
The projection parameters used at initialization.
|
static int |
X
The indices into return value array for forward transforms.
|
static int |
Y |
C3P, D2R, ec, ec2, EPSLN, falseEast, falseNorth, HALF_PI, PI, R2D, rMajor, TWO_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
Modifier | Constructor and Description |
---|---|
protected |
GCTPCStyleProjection(int system,
int zone,
double rMajor,
double rMinor,
int[] dimensions,
java.awt.geom.AffineTransform affine)
Creates a GCTP C style projection.
|
Modifier and Type | Method and Description |
---|---|
protected void |
cenlat(double lat) |
protected void |
cenlon(double lon) |
protected void |
cenlonmer(double lon) |
protected static void |
genrpt_long(long a,
java.lang.String what) |
protected static void |
genrpt(double a,
java.lang.String what) |
double[] |
getParameters()
Gets a set of GCTP-style projection parameters if available.
|
void |
mapTransformFor(double[] lonLat,
double[] xy)
Performs a forward map transformation from (latitude,
longitude) coordinates to map (x, y).
|
void |
mapTransformInv(double[] xy,
double[] lonLat)
Performs an inverse map transformation from map (x, y)
coordinates to (latitude, longitude).
|
protected void |
offsetp(double fe,
double fn) |
protected void |
origin(double lat) |
protected static void |
p_error(char[] what,
char[] where)
These are some dummy functions to satify the GCTPC code.
|
protected static void |
p_error(char[] what,
java.lang.String where) |
protected static void |
p_error(java.lang.String what,
java.lang.String where) |
static double |
paksz(double ang,
long[] iflg)
Converts DMS packed angle into degrees.
|
protected static void |
pblank() |
static double |
phi1z(double eccent,
double qs,
long[] flag)
Convenience function for phi1z.
|
static double |
phi2z(double eccent,
double ts,
long[] flag)
Convenience function for phi2z.
|
static double |
phi3z(double ml,
double e0,
double e1,
double e2,
double e3,
long[] flag) |
static long |
phi4z(double eccent,
double e0,
double e1,
double e2,
double e3,
double a,
double b,
double[] c,
double[] phi) |
protected abstract long |
projfor(double lat,
double lon,
double[] x,
double[] y)
Performs the actual forward calculation as specified in the
GCTP C code.
|
protected abstract long |
projinv(double x,
double y,
double[] lon,
double[] lat)
Performs the actual inverse calculation as specified in the
GCTP C code.
|
protected static void |
ptitle(java.lang.String title) |
protected void |
radius(double r) |
protected void |
radius2(double rmaj,
double rmin) |
static void |
setErrorStream(java.io.PrintStream stream)
Sets the error output stream for use by the error
reporting functions.
|
void |
setParameters(double[] parameters)
Sets the GCTPC style parameter set.
|
static void |
setParamStream(java.io.PrintStream stream)
Sets the parameter output stream for use by the parameter
reporting functions.
|
protected static void |
sprintf(char[] buffer,
java.lang.String format,
java.lang.Object... args) |
protected void |
stanparl(double lat1,
double lat2) |
protected void |
stparl1(double lat) |
adjust_lon, asinz, calc_utm_zone, e0fn, e1fn, e2fn, e3fn, e4fn, mlfn, msfnz, pack_angle, pakcz, pakr2dm, phi1z, phi2z, phi3z, phi4z, qsfnz, setDatum, setFalse, sign, sphdz, tsfnz, unpack_angle
clone, describe, equals, getAffine, getDatum, getModified, getPixelDimensions, getPixelSize, getProjection, getSpheroid, getSpheroidName, getSubset, getSubset, getSystem, getSystemName, getZone, isOrientable, setAffine, setPositiveLon, transformImpl, transformImpl
get2DVersion, getBoundingBox, getWorldAxes, main, setPointTransform, transformToPoint
distance, getDimensions, getResolution, getSpheroid, getSpheroid, transform, transform, transform, transform
getMetadataMap
public static final int X
public static final int Y
public static final int LON
public static final int LAT
public static final int OK
public static final int ERROR
public static final int IN_BREAK
protected double[] params
protected GCTPCStyleProjection(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
public static void setErrorStream(java.io.PrintStream stream)
stream
- the new stream for error reporting.public static void setParamStream(java.io.PrintStream stream)
stream
- the new stream for parameter reporting.protected abstract long projfor(double lat, double lon, double[] x, double[] y)
lat
- the latitude to convert.lon
- the longitude to convert.x
- the map coordinate x value (modified).y
- the map coordinate y value (modified).public void mapTransformFor(double[] lonLat, double[] xy)
MapProjection
mapTransformFor
in class MapProjection
lonLat
- the longitude and latitude in radians.xy
- the x and y in meters or Double.NaN if the
transform could not be computed (modified).protected abstract long projinv(double x, double y, double[] lon, double[] lat)
lat
- the latitude to convert.lon
- the longitude to convert.x
- the map coordinate x value (modified).y
- the map coordinate y value (modified).public void mapTransformInv(double[] xy, double[] lonLat)
MapProjection
mapTransformInv
in class MapProjection
xy
- the x and y in meters.lonLat
- the longitude and latitude in radians or Double.NaN
if the transform could not be computed (modified).protected static void p_error(char[] what, char[] where)
protected static void p_error(java.lang.String what, java.lang.String where)
protected static void p_error(char[] what, java.lang.String where)
protected static void sprintf(char[] buffer, java.lang.String format, java.lang.Object... args)
protected static void pblank()
protected static void ptitle(java.lang.String title)
protected void radius(double r)
protected void radius2(double rmaj, double rmin)
protected void cenlon(double lon)
protected void cenlonmer(double lon)
protected void cenlat(double lat)
protected void origin(double lat)
protected void stanparl(double lat1, double lat2)
protected void stparl1(double lat)
protected void offsetp(double fe, double fn)
protected static void genrpt(double a, java.lang.String what)
protected static void genrpt_long(long a, java.lang.String what)
public void setParameters(double[] parameters)
getParameters()
.parameters
- the parameters to set.public double[] getParameters()
MapProjection
getParameters
in class MapProjection
public static double phi1z(double eccent, double qs, long[] flag)
public static double phi2z(double eccent, double ts, long[] flag)
public static double phi3z(double ml, double e0, double e1, double e2, double e3, long[] flag)
public static long phi4z(double eccent, double e0, double e1, double e2, double e3, double a, double b, double[] c, double[] phi)
public static double paksz(double ang, long[] iflg)
ang
- the DMS packed angle.iflg
- the error flag number (modified).