LOGICAL FUNCTION SETSPHERE( AXISMAJOR, AXISMINOR )
LOGICAL FUNCTION INITSPHERES()
LOGICAL FUNCTION SPHEREDAT( INSPHERE, INPARAM, IOPARAM )
REAL*8 AXISMAJOR ! small integer, or major axis (meters)
REAL*8 AXISMINOR ! minor axis (meters) or eccentricity
INTEGER INSPHERE ! argument for GCTP
REAL*8 INPARAM( 15 ) ! argument for GCTP
REAL*8 IOPARAM( 15 ) ! argument for GCTP
SETSPHERE(), INITSPHERES(), and
SPHEREDAT() may be used to set up the choice of
spheres for LL2UTM(), UTM2LL(),
LL2LAM(), LAM2LLL(), etc., and for
setting up the argument-lists for USGS National Mapping Division's
General Cartographic Transformation Package routine
GTPZ0().
INITSPHERES() uses environment variable
IOAPI_ISPH to set up internal sphere specifications;
it is called automatically during the initialization of the wrapper
routines, and defaults to the GRS-1980 geodetic spheroid in the
absence of user specification. Sphere-specification should follow
the criteria below. Since
INITSPHERES() is called automatically by the
wrapper-routines, its use should not be needed unless you want
to call GCTP directly.
SETSPHERE() uses sphere specifications established
by SETSPHERE() or INITSPHERES(), and
sets up the arguments INSPH, TPARIN,
and TPARIO for GCTP accordingly.
SPHEREDAT() uses the most recently stored sphere
specifications established by SETSPHERE() or
INITSPHERES() to set up the arguments
INSPH, TPARIN, and TPARIO
accordingly for USGS National Mapping Division's General
Cartographic Transformation Package routine
GTPZ0(). (Normally this
functionality is handled within the wrapper-routines; it should
be needed only for direct calls to GCTP.)
Note that GCTP only permits the specification
of one sphere at a time, so sphere-to-sphere coordinate
transformations must use Lat-Lon as an intermediate step between
the starting projection and spheroid and the final projection
and spheroid. For example, to transform from UTM
coordinates <x,y> on Clarke 1880 to Lambert
coordinates <s,t> on GRS 1980, one might set the
spheroid to 1 with SETSPHERE and use
UTM2LL on <x,y> to compute Lat-Lon
coordinates <p,q>, then set the spheroid to 8
with SETSPHERE and use LL2LAM to
transform <p,q> into the desired
<s,t>.
DOUBLE PRECISION sphere radius in meters may be used to
designate a requested spherical Earth. A pair of DOUBLE
PRECISION containing the major axis and the minor axis in
meters, or the major axis and square of the eccentricity may be
used to designate a requested spheroidal Earth. Examples are as
follows:
setenv IOAPI_ISPH
setenv IOAPI_ISPH 1
setenv IOAPI_ISPH 6367333.0D0
setenv IOAPI_ISPH 6378388.0D0 6356912.0D0
SETSPHERE( 6378388.0D0, 1.006768153D0 )
d setenv IOAPI_ISPHdd<value>
to establish program-wide non-default geodetic spheroid choices.
See also Coordinate-coordinate conversion routines:
Up: Coordinate and Grid Related Routines
To: Models-3/EDSS I/O API: The Help Pages