# doc-cache created by Octave 10.3.0
# name: cache
# type: cell
# rows: 3
# columns: 35
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
Contents


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6280
 GeographicLib toolbox
 Version 2.5 2025-11-07

   This toolbox provides native MATLAB implementations of a subset of the
   C++ library, GeographicLib.  Key components of this toolbox are

     * Geodesics, direct, inverse, area calculations.
     * Projections, transverse Mercator, polar stereographic, etc.
     * Grid systems, UTM, UPS, MGRS.
     * Geoid lookup, egm84, egm96, egm2008 geoids supported.
     * Geometric transformations, geocentric, local cartesian.
     * Great ellipse, direct, inverse, area calculations.
     * Geodesics and coordinate conversions on a triaxial ellipsoid.

   (The last two items are not present in the C++ library.)
   All the functions are vectorized and so offer speeds comparable to
   compiled C++ code when operating on arrays.  Additional information is
   available in the documentation for the GeographicLib, which is
   available at

       https://geographiclib.sourceforge.io/2.5

   Some details of the implementation of the triaxial class can be found at

       https://geographiclib.sourceforge.io/doc/triaxial.html

   Some common features of these functions:
     * Angles (latitude, longitude, azimuth, meridian convergence) are
       measured in degrees.
     * Distances are measured in meters, areas in meters^2.
     * Latitudes must lie in [-90,90].  However most routines don't check
       that this condition holds.  (Exceptions are the grid system and
       geoid functions.  These return NaNs for invalid inputs.)
     * The ellipsoid is specified as [a, e], where a = equatorial radius
       and e = eccentricity.  The eccentricity can be pure imaginary to
       denote a prolate ellipsoid.
     * Keep abs(e) < 0.2 (i.e., abs(f) <= 1/50) for full double precision
       accuracy.

   There is some overlap between this toolbox and MATLAB's Mapping
   Toolbox.  However, this toolbox offers:
     * better accuracy;
     * treatment of oblate and prolate ellipsoid;
     * guaranteed convergence for geoddistance;
     * calculation of area and differential properties of geodesics;
     * ellipsoidal versions of the equidistant azimuthal and gnomonic
       projections.

 Function summary:

 Geodesics
   geoddistance     - Distance between points on an ellipsoid
   geodreckon       - Point at specified azimuth, range on an ellipsoid
   geodarea         - Surface area of polygon on an ellipsoid

 Projections
   tranmerc_fwd     - Forward transverse Mercator projection
   tranmerc_inv     - Inverse transverse Mercator projection
   polarst_fwd      - Forward polar stereographic projection
   polarst_inv      - Inverse polar stereographic projection
   eqdazim_fwd      - Forward azimuthal equidistant projection
   eqdazim_inv      - Inverse azimuthal equidistant projection
   cassini_fwd      - Forward Cassini-Soldner projection
   cassini_inv      - Inverse Cassini-Soldner projection
   gnomonic_fwd     - Forward ellipsoidal gnomonic projection
   gnomonic_inv     - Inverse ellipsoidal gnomonic projection

 Grid systems
   utmups_fwd       - Convert to UTM/UPS system
   utmups_inv       - Convert from UTM/UPS system
   mgrs_fwd         - Convert UTM/UPS coordinates to MGRS
   mgrs_inv         - Convert MGRS to UTM/UPS coordinates

 Geoid lookup
   geoid_height     - Compute the height of the geoid above the ellipsoid
   geoid_load       - Load a geoid model

 Geometric transformations
   geocent_fwd      - Conversion from geographic to geocentric coordinates
   geocent_inv      - Conversion from geocentric to geographic coordinates
   loccart_fwd      - Convert geographic to local cartesian coordinates
   loccart_inv      - Convert local cartesian to geographic coordinates

 Great ellipses
   gedistance       - Great ellipse distance on an ellipsoid
   gereckon         - Point along great ellipse at given azimuth and range

 Utility
   defaultellipsoid - Set/return the default ellipsoid
   ecc2flat         - Convert eccentricity to flattening
   flat2ecc         - Convert flattening to eccentricity
   linesimp         - Simplify 2d or 3d polyline
   geographiclib_test     - The test suite for the geographiclib package
   geographiclib_signtest - Another test suite

 Documentation
   geoddoc          - Geodesics on an ellipsoid of revolution
   projdoc          - Projections for an ellipsoid
   gedoc            - Great ellipses on an ellipsoid of revolution

 The class for triaxial ellipsoids
   triaxial.triaxial      - The constructor
   triaxial.carttocart2   - Find the closest point on the ellipsoid
   triaxial.cart2tocart   - Find the point above a point on the ellipsoid
   triaxial.cart2toellip  - Convert a surface point to ellipsoidal coords
   triaxial.elliptocart2  - Convert ellipsoid coordinates to a surface point
   triaxial.carttoellip   - Convert cartesian coordinates to ellipsoid
   triaxial.elliptocart   - Convert ellipsoidal coordinates to cartesian
   triaxial.cart2togeod   - Convert a surface point to geodetic coordinates
   triaxial.carttogeod    - Convert a cartesian point to geodetic
   triaxial.geodtocart    - Convert geodetic coordinates to cartesian
   triaxial.cart2toparam  - Convert a surface point to parametric coordinates
   triaxial.paramtocart2  - Convert parametric coordinates to a surface point
   triaxial.cart2togeocen - Convert a surface point to geocentric coordinates
   triaxial.geocentocart2 - Convert geocentric coordinates to a surface point
   triaxial.convert       - General coordinate conversion
   triaxial.cart2rand     - Random points on the ellipsoid
   triaxial.reckon        - Solve the direct geodesic problem
   triaxial.distance      - Solve the inverse geodesic problem
   triaxial.hybrid        - Solve the hybrid geodesic problem
   triaxial.cart2norm     - Force a point to lie on the ellipsoid
   triaxial.scaled        - Return a scaled ellipsoid
   triaxial.cartproj      - Plot a curve on the ellipsoid
   triaxial.horizon       - Point on the horizon of the ellipsoid
   triaxial.ellipnorm     - Reduce ellipsoidal coordinates to standard ranges
   triaxial.ellipflip     - Switch ellipsoidal coordinates to the other sheet
   triaxial.demo          - Demonstrate geodesics
   triaxial.doc           - Summary documentation of triaxial class
   triaxial.tests         - Self test



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
 GeographicLib toolbox
 Version 2.5 2025-11-07



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
cassini_fwd


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1224
CASSINI_FWD  Forward Cassini-Soldner projection

   [x, y] = CASSINI_FWD(lat0, lon0, lat, lon)
   [x, y, azi, rk] = CASSINI_FWD(lat0, lon0, lat, lon, ellipsoid)

   performs the forward Cassini-Soldner projection of points (lat,lon) to
   (x,y) using (lat0,lon0) as the center of projection.  These input
   arguments can be scalars or arrays of equal size.  The ellipsoid vector
   is of the form [a, e], where a is the equatorial radius in meters, e is
   the eccentricity.  If ellipsoid is omitted, the WGS84 ellipsoid (more
   precisely, the value returned by defaultellipsoid) is used.  projdoc
   defines the projection and gives the restrictions on the allowed ranges
   of the arguments.  The inverse projection is given by cassini_inv.

   azi and rk give metric properties of the projection at (lat,lon); azi
   is the azimuth of the easting (x) direction and rk is the reciprocal of
   the northing (y) scale.  The scale in the easting direction is 1.

   lat0, lon0, lat, lon, azi are in degrees.  The projected coordinates x,
   y are in meters (more precisely the units used for the equatorial
   radius).  rk is dimensionless.

   See also PROJDOC, CASSINI_INV, GEODDISTANCE, DEFAULTELLIPSOID,
     FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
CASSINI_FWD  Forward Cassini-Soldner projection



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
cassini_inv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1217
CASSINI_INV  Inverse Cassini-Soldner projection

   [lat, lon] = CASSINI_INV(lat0, lon0, x, y)
   [lat, lon, azi, rk] = CASSINI_INV(lat0, lon0, x, y, ellipsoid)

   performs the inverse Cassini-Soldner projection of points (x,y) to
   (lat,lon) using (lat0,lon0) as the center of projection.  These input
   arguments can be scalars or arrays of equal size.  The ellipsoid vector
   is of the form [a, e], where a is the equatorial radius in meters, e is
   the eccentricity.  If ellipsoid is omitted, the WGS84 ellipsoid (more
   precisely, the value returned by defaultellipsoid) is used.  projdoc
   defines the projection and gives the restrictions on the allowed ranges
   of the arguments.  The forward projection is given by cassini_fwd.

   azi and rk give metric properties of the projection at (lat,lon); azi
   is the azimuth of the easting (x) direction and rk is the reciprocal of
   the northing (y) scale.  The scale in the easting direction is 1.

   lat0, lon0, lat, lon, azi are in degrees.  The projected coordinates x,
   y are in meters (more precisely the units used for the equatorial
   radius).  rk is dimensionless.

   See also PROJDOC, CASSINI_FWD, GEODRECKON, DEFAULTELLIPSOID, FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
CASSINI_INV  Inverse Cassini-Soldner projection



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
defaultellipsoid


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 550
DEFAULTELLIPSOID  Return or set the default ellipsoid

   ellipsoid = DEFAULTELLIPSOID
   DEFAULTELLIPSOID(newdefault)
   DEFAULTELLIPSOID([])

   The first form returns a vector of the equatorial radius and eccentricity
   for the "default ellipsoid".  Initially the WGS84 ellispoid is the
   default.  The second form allows a new default ellipsoid to be specified.
   The third form restores the WGS84 ellipsoid as the default.  Use ecc2flat
   and flat2ecc to convert between the eccentricity and the flattening.

   See also ECC2FLAT, FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
DEFAULTELLIPSOID  Return or set the default ellipsoid



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
ecc2flat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 158
ECC2FLAT   Convert eccentricity to flattening

   f = ECC2FLAT(ecc)

   returns the flattening of an ellipsoid given the eccentricity.

   See also FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
ECC2FLAT   Convert eccentricity to flattening



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
eqdazim_fwd


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1572
EQDAZIM_FWD  Forward azimuthal equidistant projection

   [x, y] = EQDAZIM_FWD(lat0, lon0, lat, lon)
   [x, y, azi, rk] = EQDAZIM_FWD(lat0, lon0, lat, lon, ellipsoid)

   performs the forward azimuthal equidistant projection of points
   (lat,lon) to (x,y) using (lat0,lon0) as the center of projection.
   These input arguments can be scalars or arrays of equal size.  The
   ellipsoid vector is of the form [a, e], where a is the equatorial
   radius in meters, e is the eccentricity.  If ellipsoid is omitted, the
   WGS84 ellipsoid (more precisely, the value returned by
   defaultellipsoid) is used.  projdoc defines the projection and gives
   the restrictions on the allowed ranges of the arguments.  The inverse
   projection is given by eqdazim_inv.

   azi and rk give metric properties of the projection at (lat,lon); azi
   is the azimuth of the geodesic from the center of projection and rk is
   the reciprocal of the azimuthal scale.  The scale in the radial
   direction is 1.

   lat0, lon0, lat, lon, azi are in degrees.  The projected coordinates x,
   y are in meters (more precisely the units used for the equatorial
   radius).  rk is dimensionless.

   Section 14 of

    C. F. F. Karney, Geodesics on an ellipsoid of revolution (2011),
    https://arxiv.org/abs/1102.1215
    Errata: https://geographiclib.sourceforge.io/geod-addenda.html#geod-errata

   describes how to use this projection in the determination of maritime
   boundaries (finding the median line).

   See also PROJDOC, EQDAZIM_INV, GEODDISTANCE, DEFAULTELLIPSOID,
     FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
EQDAZIM_FWD  Forward azimuthal equidistant projection



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
eqdazim_inv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1566
EQDAZIM_INV  Inverse azimuthal equidistant projection

   [lat, lon] = EQDAZIM_INV(lat0, lon0, x, y)
   [lat, lon, azi, rk] = EQDAZIM_INV(lat0, lon0, x, y, ellipsoid)

   performs the inverse azimuthal equidistant projection of points (x,y)
   to (lat,lon) using (lat0,lon0) as the center of projection.  These
   input arguments can be scalars or arrays of equal size.  The ellipsoid
   vector is of the form [a, e], where a is the equatorial radius in
   meters, e is the eccentricity.  If ellipsoid is omitted, the WGS84
   ellipsoid (more precisely, the value returned by defaultellipsoid) is
   used.  projdoc defines the projection and gives the restrictions on
   the allowed ranges of the arguments.  The forward projection is given
   by eqdazim_fwd.

   azi and rk give metric properties of the projection at (lat,lon); azi
   is the azimuth of the geodesic from the center of projection and rk is
   the reciprocal of the azimuthal scale.  The scale in the radial
   direction is 1.

   lat0, lon0, lat, lon, azi are in degrees.  The projected coordinates x,
   y are in meters (more precisely the units used for the equatorial
   radius).  rk is dimensionless.

   Section 14 of

    C. F. F. Karney, Geodesics on an ellipsoid of revolution (2011),
    https://arxiv.org/abs/1102.1215
    Errata: https://geographiclib.sourceforge.io/geod-addenda.html#geod-errata

   describes how to use this projection in the determination of maritime
   boundaries (finding the median line).

   See also PROJDOC, EQDAZIM_FWD, GEODRECKON, DEFAULTELLIPSOID, FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
EQDAZIM_INV  Inverse azimuthal equidistant projection



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
flat2ecc


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 158
FLAT2ECC   Convert flattening to eccentricity

   ecc = FLAT2ECC(f)

   returns the eccentricity of an ellipsoid given the flattening.

   See also ECC2FLAT.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
FLAT2ECC   Convert flattening to eccentricity



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
gedistance


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1523
GEDISTANCE  Great ellipse distance on an ellipsoid

   [s12, azi1, azi2] = GEDISTANCE(lat1, lon1, lat2, lon2)
   [s12, azi1, azi2, S12] = GEDISTANCE(lat1, lon1, lat2, lon2, ellipsoid)

   solves the inverse great ellipse problem of finding of length and
   azimuths of the great ellipse between points specified by lat1, lon1,
   lat2, lon2.  The input latitudes and longitudes, lat1, lon1, lat2,
   lon2, can be scalars or arrays of equal size and must be expressed in
   degrees.  The ellipsoid vector is of the form [a, e], where a is the
   equatorial radius in meters, e is the eccentricity.  If ellipsoid is
   omitted, the WGS84 ellipsoid (more precisely, the value returned by
   defaultellipsoid) is used.  The output s12 is the distance in meters
   and azi1 and azi2 are the forward azimuths at the end points in
   degrees.  The optional output S12 is the area between the great ellipse
   and the equator (in meters^2).  gedoc gives an example and provides
   additional background information.  gedoc also gives the restrictions
   on the allowed ranges of the arguments.

   When given a combination of scalar and array inputs, the scalar inputs
   are automatically expanded to match the size of the arrays.

   geoddistance solves the equivalent geodesic problem and usually this is
   preferable to using GEDISTANCE.

   For more information, see

     https://geographiclib.sourceforge.io/C++/doc/greatellipse.html

   See also GEDOC, GERECKON, DEFAULTELLIPSOID, FLAT2ECC, GEODDISTANCE,
     GEODRECKON.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
GEDISTANCE  Great ellipse distance on an ellipsoid



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
gedoc


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5558
GEDOC  Great ellipses on an ellipsoid of revolution

   The two routines GEDISTANCE and GERECKON solve the inverse and direct
   problems for great ellipses on the surface of an ellipsoid of
   revolution.  For more information, see

     https://geographiclib.sourceforge.io/C++/doc/greatellipse.html

   Great ellipses are sometimes proposed as alternatives to computing
   ellipsoidal geodesics.  However geodesic calculations are easy to
   perform using geoddistance and geodreckon, and these should normally be
   used instead of gedistance and gereckon.  For a discussion, see

     https://geographiclib.sourceforge.io/C++/doc/greatellipse.html#gevsgeodesic

   The method involves stretching the ellipse along the axis until it
   becomes a sphere, solving the corresponding great circle problem on the
   sphere and mapping the results back to the ellipsoid.  For details,
   see

     https://geographiclib.sourceforge.io/C++/doc/greatellipse.html#geformulation

   Consider two points on the ellipsoid at (lat1, lon1) and (lat2, lon2).
   The plane containing these points and the center of the ellipsoid
   intersects the ellipsoid on a great ellipse.  The length of the shorter
   portion of the great ellipse between the two points is s12 and the
   great ellipse from point 1 to point 2 has forward azimuths azi1 and
   azi2 at the two end points.

   Two great ellipse problems can be considered:
     * the direct problem -- given lat1, lon1, s12, and azi1, determine
       lat2, lon2, and azi2.  This is solved by gereckon.
     * the inverse problem -- given lat1, lon1, lat2, lon2, determine s12,
       azi1, and azi2.  This is solved by gedistance.

   The routines also optionally calculate S12 ,the area between the great
   ellipse from point 1 to point 2 and the equator; i.e., it is the area,
   measured counter-clockwise, of the quadrilateral with corners
   (lat1,lon1), (0,lon1), (0,lon2), and (lat2,lon2).  It is given in
   meters^2.

   The parameters of the ellipsoid are specified by the optional ellipsoid
   argument to the routines.  This is a two-element vector of the form
   [a,e], where a is the equatorial radius, e is the eccentricity e =
   sqrt(a^2-b^2)/a, and b is the polar semi-axis.  Typically, a and b are
   measured in meters and the distances returned by the routines are then
   in meters.  However, other units can be employed.  If ellipsoid is
   omitted, then the WGS84 ellipsoid (more precisely, the value returned
   by defaultellipsoid) is assumed [6378137, 0.0818191908426215]
   corresponding to a = 6378137 meters and a flattening f = (a-b)/a =
   1/298.257223563.  The flattening and eccentricity are related by

       e = sqrt(f * (2 - f))
       f = e^2 / (1 + sqrt(1 - e^2))

   (The functions ecc2flat and flat2ecc implement these conversions.)  For
   a sphere, set e = 0; for a prolate ellipsoid (b > a), specify e as a
   pure imaginary number.

   All angles (latitude, longitude, azimuth) are measured in degrees with
   latitudes increasing northwards, longitudes increasing eastwards, and
   azimuths measured clockwise from north.  For a point at a pole, the
   azimuth is defined by keeping the longitude fixed, writing lat =
   +/-(90-eps), and taking the limit eps -> 0+.

   Restrictions on the inputs:
     * All latitudes must lie in [-90, 90].
     * The distance s12 is unrestricted.  This allows great ellipses to
       wrap around the ellipsoid.
     * The equatorial radius, a, must be positive.
     * The eccentricity, e, should be satisfy abs(e) < 0.2 in order to
       retain full accuracy (this corresponds to flattenings satisfying
       abs(f) <= 1/50, approximately).  This condition holds for most
       applications in geodesy.

   Larger values of e can be used with a corresponding drop in accuracy.
   The following table gives the approximate maximum error in gedistance
   and gereckon (expressed as a distance) for an ellipsoid with the same
   equatorial radius as the WGS84 ellipsoid and different values of the
   flattening (nm means nanometer and um means micrometer).

        |f|     error
        0.01    25 nm
        0.02    30 nm
        0.05    10 um
        0.1    1.5 mm
        0.2    300 mm

   In order to compute intermediate points on a great ellipse, proceed as
   in the following example which plots the track from Sydney to
   Valparaiso and computes the deviation from the corresponding geodesic.

       % 1 = Sydney, 2 = Valparaiso
       lat1 = -33.83; lon1 = 151.29;
       lat2 = -33.02; lon2 = -71.64;
       [s12g, azi1g] = geoddistance(lat1, lon1, lat2, lon2);
       [s12e, azi1e] =   gedistance(lat1, lon1, lat2, lon2);
       fprintf('Difference in lengths = %.1f m\n', s12e - s12g);
       [latg, long] = geodreckon(lat1, lon1, s12g * [0:100]/100, azi1g);
       [late, lone] =   gereckon(lat1, lon1, s12e * [0:100]/100, azi1e);
       plot(long+360*(long<0), latg, lone+360*(lone<0), late);
       legend('geodesic', 'great ellipse', 'Location', 'SouthEast');
       title('Sydney to Valparaiso');
       xlabel('longitude'); ylabel('latitude');
       fprintf('Maximum separation = %.1f km\n', ...
               max(geoddistance(latg, long, late, lone))/1000);

   The restriction on e above arises because the meridian distance is
   given as a series expansion in the third flattening.  The exact
   distance (valid for any e) can be expressed in terms of the elliptic
   integral of the second kind.

   See also GEDISTANCE, GERECKON, DEFAULTELLIPSOID, ECC2FLAT, FLAT2ECC,
     GEODDISTANCE, GEODRECKON.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
GEDOC  Great ellipses on an ellipsoid of revolution



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
geocent_fwd


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 953
GEOCENT_FWD  Conversion from geographic to geocentric coordinates

   [X, Y, Z] = GEOCENT_FWD(lat, lon)
   [X, Y, Z] = GEOCENT_FWD(lat, lon, h)
   [X, Y, Z, M] = GEOCENT_FWD(lat, lon, h, ellipsoid)

   converts from geographic coordinates, lat, lon, h to geocentric
   coordinates X, Y, Z.  lat, lon, h can be scalars or arrays of equal
   size.  lat and lon are in degrees.  h (default 0) and X, Y, Z are in
   meters.  The ellipsoid vector is of the form [a, e], where a is the
   equatorial radius in meters, e is the eccentricity.  If ellipsoid is
   omitted, the WGS84 ellipsoid (more precisely, the value returned by
   defaultellipsoid) is used.  The inverse operation is given by
   geocent_inv.

   M is the 3 x 3 rotation matrix for the conversion.  Pre-multiplying a
   unit vector in local cartesian coordinates (east, north, up) by M
   transforms the vector to geocentric coordinates.

   See also GEOCENT_INV, DEFAULTELLIPSOID, FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
GEOCENT_FWD  Conversion from geographic to geocentric coordinates



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
geocent_inv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 915
GEOCENT_INV  Conversion from geocentric to geographic coordinates

   [lat, lon, h] = GEOCENT_INV(X, Y, Z)
   [lat, lon, h, M] = GEOCENT_INV(X, Y, Z, ellipsoid)

   converts from geocentric coordinates X, Y, Z to geographic coordinates,
   lat, lon, h.  X, Y, Z can be scalars or arrays of equal size.  X, Y, Z,
   and h are in meters.  lat and lon are in degrees.  The ellipsoid vector
   is of the form [a, e], where a is the equatorial radius in meters, e is
   the eccentricity.  If ellipsoid is omitted, the WGS84 ellipsoid (more
   precisely, the value returned by defaultellipsoid) is used.  The
   forward operation is given by geocent_fwd.

   M is the 3 x 3 rotation matrix for the conversion.  Pre-multiplying a
   unit vector in geocentric coordinates by the transpose of M transforms
   the vector to local cartesian coordinates (east, north, up).

   See also GEOCENT_FWD, DEFAULTELLIPSOID, FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
GEOCENT_INV  Conversion from geocentric to geographic coordinates



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
geodarea


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1868
GEODAREA  Surface area of polygon on an ellipsoid

   A = GEODAREA(lats, lons)
   [A, P, N] = GEODAREA(lats, lons, ellipsoid)

   calculates the surface area A of the geodesic polygon specified by the
   input vectors lats, lons (in degrees).  The ellipsoid vector is of the
   form [a, e], where a is the equatorial radius in meters, e is the
   eccentricity.  If ellipsoid is omitted, the WGS84 ellipsoid (more
   precisely, the value returned by defaultellipsoid) is used.  There is
   no need to "close" the polygon by repeating the first point.  Multiple
   polygons can be specified by separating the vertices by NaNs in the
   vectors.  Thus a series of K quadrilaterals can be specified as two
   5 x K arrays where the 5th row is NaN.  The output, A, is in meters^2.
   Counter-clockwise traversal counts as a positive area.  Arbitrarily
   complex polygons are allowed.  In the case of self-intersecting
   polygons the area is accumulated "algebraically", e.g., the areas of
   the 2 loops in a figure-8 polygon will partially cancel.  Also returned
   are the perimeters of the polygons in P (meters) and the numbers of
   vertices in N.  geoddoc gives the restrictions on the allowed ranges of
   the arguments.

   GEODAREA loosely duplicates the functionality of the areaint function
   in the MATLAB mapping toolbox.  The major difference is that the
   polygon edges are taken to be geodesics and the area contributed by
   each edge is computed using a series expansion with is accurate
   regardless of the length of the edge.  The formulas are derived in

     C. F. F. Karney, Algorithms for geodesics,
     J. Geodesy 87, 43-55 (2013);
     https://doi.org/10.1007/s00190-012-0578-z
     Addenda: https://geographiclib.sourceforge.io/geod-addenda.html

   See also GEODDOC, GEODDISTANCE, GEODRECKON, POLYGONAREA,
     DEFAULTELLIPSOID, FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
GEODAREA  Surface area of polygon on an ellipsoid



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
geoddistance


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2014
GEODDISTANCE  Distance between points on an ellipsoid

   [s12, azi1, azi2] = GEODDISTANCE(lat1, lon1, lat2, lon2)
   [s12, azi1, azi2, S12, m12, M12, M21, a12] =
      GEODDISTANCE(lat1, lon1, lat2, lon2, ellipsoid)

   solves the inverse geodesic problem of finding of length and azimuths
   of the shortest geodesic between points specified by lat1, lon1, lat2,
   lon2.  The input latitudes and longitudes, lat1, lon1, lat2, lon2, can
   be scalars or arrays of equal size and must be expressed in degrees.
   The ellipsoid vector is of the form [a, e], where a is the equatorial
   radius in meters, e is the eccentricity.  If ellipsoid is omitted, the
   WGS84 ellipsoid (more precisely, the value returned by
   defaultellipsoid) is used.  The output s12 is the distance in meters
   and azi1 and azi2 are the forward azimuths at the end points in
   degrees.  The other optional outputs, S12, m12, M12, M21, a12 are
   documented in geoddoc.  geoddoc also gives the restrictions on the
   allowed ranges of the arguments.

   When given a combination of scalar and array inputs, the scalar inputs
   are automatically expanded to match the size of the arrays.

   This is an implementation of the algorithm given in

     C. F. F. Karney, Algorithms for geodesics,
     J. Geodesy 87, 43-55 (2013);
     https://doi.org/10.1007/s00190-012-0578-z
     Addenda: https://geographiclib.sourceforge.io/geod-addenda.html

   This function duplicates some of the functionality of the distance
   function in the MATLAB mapping toolbox.  Differences are

     * When the ellipsoid argument is omitted, use the WGS84 ellipsoid.
     * The routines work for prolate (as well as oblate) ellipsoids.
     * The azimuth at the second end point azi2 is returned.
     * The solution is accurate to round off for abs(e) < 0.2.
     * The algorithm converges for all pairs of input points.
     * Additional properties of the geodesic are calcuated.

   See also GEODDOC, GEODRECKON, GEODAREA, DEFAULTELLIPSOID, FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
GEODDISTANCE  Distance between points on an ellipsoid



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
geoddoc


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8372
GEODDOC  Geodesics on an ellipsoid of revolution

   The routines geoddistance, geodreckon, and geodarea solve various
   problems involving geodesics on the surface of an ellipsoid of
   revolution.  These are based on the paper

     C. F. F. Karney, Algorithms for geodesics,
     J. Geodesy 87, 43-55 (2013);
     https://doi.org/10.1007/s00190-012-0578-z
     Addenda: https://geographiclib.sourceforge.io/geod-addenda.html

   which, in turn, is based on the classic solution of the geodesic
   problems pioneered by Legendre (1806), Bessel (1825), and Helmert
   (1880).  Links for these and other original papers on geodesics are
   given in

     https://geographiclib.sourceforge.io/geodesic-papers/biblio.html

   The shortest path between two points on the ellipsoid at (lat1, lon1)
   and (lat2, lon2) is called the geodesic.  Its length is s12 and the
   geodesic from point 1 to point 2 has forward azimuths azi1 and azi2 at
   the two end points.

   Traditionally two geodesic problems are considered:
     * the direct problem -- given lat1, lon1, s12, and azi1, determine
       lat2, lon2, and azi2.  This is solved by geodreckon.
     * the inverse problem -- given lat1, lon1, lat2, lon2, determine s12,
       azi1, and azi2.  This is solved by geoddistance.
   In addition, geodarea computes the area of an ellipsoidal polygon
   where the edges are defined as shortest geodesics.

   The parameters of the ellipsoid are specified by the optional ellipsoid
   argument to the routines.  This is a two-element vector of the form
   [a,e], where a is the equatorial radius, e is the eccentricity e =
   sqrt(a^2-b^2)/a, and b is the polar semi-axis.  Typically, a and b are
   measured in meters and the linear and area quantities returned by the
   routines are then in meters and meters^2.  However, other units can be
   employed.  If ELLIPSOID is omitted, then the WGS84 ellipsoid (more
   precisely, the value returned by defaultellipsoid) is assumed [6378137,
   0.0818191908426215] corresponding to a = 6378137 meters and a
   flattening f = (a-b)/a = 1/298.257223563.  The flattening and
   eccentricity are related by

       e = sqrt(f * (2 - f))
       f = e^2 / (1 + sqrt(1 - e^2))

   (The functions ecc2flat and flat2ecc implement these conversions.)  For
   a sphere, set e = 0; for a prolate ellipsoid (b > a), specify e as a
   pure imaginary number.

   All angles (latitude, longitude, azimuth) are measured in degrees with
   latitudes increasing northwards, longitudes increasing eastwards, and
   azimuths measured clockwise from north.  For a point at a pole, the
   azimuth is defined by keeping the longitude fixed, writing lat =
   +/-(90-eps), and taking the limit eps -> 0+.

   The routines also calculate several other quantities of interest
     * S12 is the area between the geodesic from point 1 to point 2 and
       the equator; i.e., it is the area, measured counter-clockwise, of
       the quadrilateral with corners (lat1,lon1), (0,lon1), (0,lon2), and
       (lat2,lon2).  It is given in meters^2.
     * m12, the reduced length of the geodesic is defined such that if the
       initial azimuth is perturbed by dazi1 (radians) then the second
       point is displaced by m12 dazi1 in the direction perpendicular to
       the geodesic.  m12 is given in meters.  On a curved surface the
       reduced length obeys a symmetry relation, m12 + m21 = 0.  On a flat
       surface, we have m12 = s12.
     * M12 and M21 are geodesic scales.  If two geodesics are parallel at
       point 1 and separated by a small distance dt, then they are
       separated by a distance M12 dt at point 2.  M21 is defined
       similarly (with the geodesics being parallel to one another at
       point 2).  M12 and M21 are dimensionless quantities.  On a flat
       surface, we have M12 = M21 = 1.
     * a12 is the arc length on the auxiliary sphere.  This is a construct
       for converting the problem to one in spherical trigonometry.  a12
       is measured in degrees.  The spherical arc length from one equator
       crossing to the next is always 180 degrees.

   If points 1, 2, and 3 lie on a single geodesic, then the following
   addition rules hold:
     * s13 = s12 + s23
     * a13 = a12 + a23
     * S13 = S12 + S23
     * m13 = m12*M23 + m23*M21
     * M13 = M12*M23 - (1 - M12*M21) * m23/m12
     * M31 = M32*M21 - (1 - M23*M32) * m12/m23

   Restrictions on the inputs:
     * All latitudes must lie in [-90, 90].
     * The distance s12 is unrestricted.  This allows geodesics to wrap
       around the ellipsoid.  Such geodesics are no longer shortest paths.
       However they retain the property that they are the straightest
       curves on the surface.
     * Similarly, the spherical arc length, a12, is unrestricted.
     * The equatorial radius, a, must be positive.
     * The eccentricity, e, should satisfy abs(e) < 0.2 in order to
       retain full accuracy (this corresponds to flattenings satisfying
       abs(f) <= 1/50, approximately).  This condition holds for most
       applications in geodesy.

    Larger values of e can be used with a corresponding drop in accuracy.
    The following table gives the approximate maximum error in
    geoddistance and geodreckon (expressed as a distance) for an ellipsoid
    with the same equatorial radius as the WGS84 ellipsoid and different
    values of the flattening (nm means nanometer and um means micrometer).

         |f|     error
         0.01    25 nm
         0.02    30 nm
         0.05    10 um
         0.1    1.5 mm
         0.2    300 mm

   The shortest distance returned by GEODDISTANCE is (obviously) uniquely
   defined.  However, in a few special cases there are multiple azimuths
   which yield the same shortest distance.  Here is a catalog of those
   cases:
     * lat1 = -lat2 (with neither point at a pole).  If azi1 = azi2, the
       geodesic is unique.  Otherwise there are two geodesics and the
       second one is obtained by setting [azi1,azi2] = [azi2,azi1],
       [M12,M21] = [M21,M12], S12 = -S12.  (This occurs when the longitude
       difference is near +/-180 for oblate ellipsoids.)
     * lon2 = lon1 +/- 180 (with neither point at a pole).  If azi1 = 0 or
       +/-180, the geodesic is unique.  Otherwise there are two geodesics
       and the second one is obtained by setting [azi1,azi2] =
       [-azi1,-azi2], S12 = -S12.  (This occurs when lat2 is near -lat1
       for prolate ellipsoids.)
     * Points 1 and 2 at opposite poles.  There are infinitely many
       geodesics which can be generated by setting [azi1,azi2] =
       [azi1,azi2] + [d,-d], for arbitrary d.  (For spheres, this
       prescription applies when points 1 and 2 are antipodal.)
     * s12 = 0 (coincident points).  There are infinitely many geodesics
       which can be generated by setting [azi1,azi2] = [azi1,azi2] +
       [d,d], for arbitrary d.

   In order to compute intermediate points on a geodesic, proceed as in
   the following example which plots the track from JFK Airport to
   Singapore Changi Airport.

       lat1 = 40.64; lon1 = -73.78;
       lat2 =  1.36; lon2 = 103.99;
       [s12,  azi1] = geoddistance(lat1, lon1, lat2, lon2);
       [lats, lons] = geodreckon(lat1, lon1, s12 * [0:100]/100, azi1);
       plot(lons, lats);

   The restriction on e above arises because the formulation is in terms
   of series expansions in e^2.  The exact solutions (valid for any e) can
   be expressed in terms of elliptic integrals.  These are provided by the
   C++ classes GeodesicExact and GeodesicLineExact.

   The routines duplicate some of the functionality of the distance,
   reckon, and areaint functions in the MATLAB mapping toolbox.  The major
   improvements offered by geoddistance, geodreckon, and geodarea are

     * The routines are accurate to round off for abs(e) < 0.2.  For
       example, for the WGS84 ellipsoid, the error in the distance
       returned by geoddistance is less then 15 nanometers.
     * The routines work for prolate (as well as oblate) ellipsoids.
     * geoddistance converges for all inputs.
     * Differential and integral properties of the geodesics are computed.
     * geodarea is accurate regardless of the length of the edges of the
       polygon.

   See also GEODDISTANCE, GEODRECKON, GEODAREA,
     DEFAULTELLIPSOID, ECC2FLAT, FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
GEODDOC  Geodesics on an ellipsoid of revolution



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
geodreckon


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3522
GEODRECKON  Point at specified azimuth, range on an ellipsoid

   [lat2, lon2, azi2] = GEODRECKON(lat1, lon1, s12, azi1)
   [lat2, lon2, azi2, S12, m12, M12, M21, a12_s12] =
     GEODRECKON(lat1, lon1, s12_a12, azi1, ellipsoid, flags)

   solves the direct geodesic problem of finding the final point and
   azimuth given lat1, lon1, s12, and azi1.  The input arguments lat1,
   lon1, s12, azi1, can be scalars or arrays of equal size.  lat1, lon1,
   azi1 are given in degrees and s12 in meters.  The ellipsoid vector is
   of the form [a, e], where a is the equatorial radius in meters, e is
   the eccentricity.  If ellipsoid is omitted, the WGS84 ellipsoid (more
   precisely, the value returned by defaultellipsoid) is used.  lat2,
   lon2, and azi2 give the position and forward azimuths at the end point
   in degrees.  The other outputs, S12, m12, M12, M21, a12 are documented
   in geoddoc.  geoddoc also gives the restrictions on the allowed ranges
   of the arguments.

   flags (default 0) is a combination of 2 flags:
      arcmode = bitand(flags, 1)
      long_unroll = bitand(flags, 2)

   If arcmode is unset (the default), then, in the long form of the call,
   the input argument s12_a12 is the distance s12 (in meters) and the
   final output variable a12_s12 is the arc length on the auxiliary sphere
   a12 (in degrees).  If arcmode is set, then the roles of s12_a12 and
   a12_s12 are reversed; s12_a12 is interpreted as the arc length on the
   auxiliary sphere a12 (in degrees) and the corresponding distance s12 is
   returned in the final output variable a12_s12 (in meters).

   If long_unroll is unset (the default), then the value lon2 is in the
   range [-180,180].  If long_unroll is set, the longitude is "unrolled"
   so that the quantity lon2 - lon1 indicates how many times and in what
   sense the geodesic encircles the ellipsoid.

   The two optional arguments, ellipsoid and flags, may be given in any
   order and either or both may be omitted.

   When given a combination of scalar and array inputs, GEODRECKON behaves
   as though the inputs were expanded to match the size of the arrays.
   However, the setting up of the geodesic lines depends only on lat1 and
   azi1.  So the combination of these arrays should be made as small as
   possible.  For example, lat1, lon1, and azi1 could be specified as
   column vectors of length M, while s12 is a row vector of length N.  The
   result will be an M x N matrices however some portion of the compution
   will performed on the smaller, size M, problem involving lat1 and azi1.
   For N large, this speeds up the computation by about a factor of 2.

   This is an implementation of the algorithm given in

     C. F. F. Karney, Algorithms for geodesics,
     J. Geodesy 87, 43-55 (2013);
     https://doi.org/10.1007/s00190-012-0578-z
     Addenda: https://geographiclib.sourceforge.io/geod-addenda.html

   This function duplicates some of the functionality of the RECKON
   function in the MATLAB mapping toolbox.  Differences are

     * When the ellipsoid argument is omitted, use the WGS84 ellipsoid.
     * The routines work for prolate (as well as oblate) ellipsoids.
     * The azimuth at the end point azi2 is returned.
     * The solution is accurate to round off for abs(e) < 0.2.
     * Redundant calculations are avoided when computing multiple
       points on a single geodesic.
     * Additional properties of the geodesic are calcuated.

   See also GEODDOC, GEODDISTANCE, GEODAREA, DEFAULTELLIPSOID, FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
GEODRECKON  Point at specified azimuth, range on an ellipsoid



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
geographiclib_signtest


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 141
SIGN_TEST   The test suite for the geographiclib package

   SIGN_TEST

   runs a variety of tests checking the treatment of +/-0 and +/-180



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
SIGN_TEST   The test suite for the geographiclib package



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
geographiclib_test


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 164
GEOGRAPHICLIB_TEST   The test suite for the geographiclib package

   GEOGRAPHICLIB_TEST

   runs a variety of tests and produces no output it they are successful.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
GEOGRAPHICLIB_TEST   The test suite for the geographiclib package



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
geoid_height


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2404
GEOID_HEIGHT  Compute the height of the geoid above the ellipsoid

   N = GEOID_HEIGHT(lat, lon)
   N = GEOID_HEIGHT(lat, lon, geoidname)
   N = GEOID_HEIGHT(lat, lon, geoidname, geoiddir)
       GEOID_HEIGHT([])
   N = GEOID_HEIGHT(lat, lon, geoid)

   computes the height, N, of the geoid above the WGS84 ellipsoid.  lat
   and lon are the latitude and longitude in degrees; these can be scalars
   or arrays of the same size.  N is in meters.

   The height of the geoid above the ellipsoid, N, is sometimes called the
   geoid undulation.  It can be used to convert a height above the
   ellipsoid, h, to the corresponding height above the geoid (the
   orthometric height, roughly the height above mean sea level), H, using
   the relations

       h = N + H;   H = -N + h.

   The possible geoids are

       egm84-30  egm84-15
       egm96-15  egm96-5
       egm2008-5 egm2008-2_5 egm2008-1

   The first part of the name is the geoid model.  The second part gives
   the resolution of the gridded data (in arc-seconds).  Thus egm2008-2_5
   is the egm2008 geoid model at a resolution of 2.5".

   By default the egm96-5 geoid is used.  This can be overridden by
   specifying geoidname.  The geoiddir argument overrides the default
   directory for the model.  See the documentation on geoid_load for how
   these arguments are interpreted.

   When geoid_height is invoked with a particular geoidname, the geoid
   data is loaded from disk and cached.  A subsequent invocation of
   geoid_height with the same geoidname uses the cached data.  Use
   GEOID_HEIGHT([]) to clear this cached data.

   Alternatively, you can load a geoid with geoid_load and use the
   returned structure as the third argument.  This use does not change the
   cached data.

   In order to use this routine with Octave, Octave needs to have been
   compiled with a version of GraphicsMagick which supports 16-bit images.
   Also, the first time you uses this routine, you may receive a warning
   message "your version of GraphicsMagick limits images to 16 bits per
   pixel"; this can safely be ignored.

   Information on downloading and installing the data for the supported
   geoid models is available at

     https://geographiclib.sourceforge.io/C++/doc/geoid.html#geoidinst

   GEOID_HEIGHT uses cubic interpolation on gridded data that has been
   quantized at a resolution of 3mm.

   See also GEOID_LOAD.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
GEOID_HEIGHT  Compute the height of the geoid above the ellipsoid



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
geoid_load


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2051
GEOID_LOAD  Load a geoid model

   geoid = GEOID_LOAD
   geoid = GEOID_LOAD(geoidname)
   geoid = GEOID_LOAD(geoidname, geoiddir)

   Loads geoid data into the workspace.  geoid_height uses this function
   to load the geoid data it needs.  The possible geoids are

       egm84-30  egm84-15
       egm96-15  egm96-5
       egm2008-5 egm2008-2_5 egm2008-1

   The first part of the name is the geoid model.  The second part gives
   the resolution of the gridded data (in arc-seconds).  Thus egm2008-2_5
   is the egm2008 geoid model at a resolution of 2.5".

   If geoidname is not specified (or is empty), the environment variable
   GEOGRAPHICLIB_GEOID_NAME is used; if this is not defined then egm96-5
   is used.

   GEOID_LOAD determines the directory with the geoid data as follows
   (here an empty string is the same as undefined):

      * if geoiddir is specified, then look there; otherwise ...
      * if the environment variable GEOGRAPHICLIB_GEOID_PATH is defined,
        look there; otherwise ...
      * if the environment variable GEOGRAPHICLIB_DATA is defined, look in
        [GEOGRAPHICLIB_DATA '/geoids']; otherwise ...
      * look in /usr/local/share/GeographicLib/geoids (for non-Windows
        systems) or C:/ProgramData/GeographicLib/geoids (for Windows
        systems).

   If your geoid models are installed in /usr/share/GeographicLib/geoids,
   for example, you can avoid the need to supply the geoiddir argument
   with

       setenv GEOGRAPHICLIB_DATA /usr/share/GeographicLib

   The geoid data is loaded from the image file obtained by concatenating
   the components to give geoiddir/geoidname.pgm.  These files store a
   grid of geoid heights above the ellipsoid encoded as 16-bit integers.

   The returned geoid can be passed to geoid_height to determine the
   height of the geoid above the ellipsoid.

   Information on downloading and installing the data for the supported
   geoid models is available at

     https://geographiclib.sourceforge.io/C++/doc/geoid.html#geoidinst

   See also GEOID_HEIGHT.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
GEOID_LOAD  Load a geoid model



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
gereckon


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1799
GERECKON  Point along great ellipse at given azimuth and range

   [lat2, lon2, azi2] = GERECKON(lat1, lon1, s12, azi1)
   [lat2, lon2, azi2, S12] = GERECKON(lat1, lon1, s12, azi1, ellipsoid)

   solves the direct great ellipse problem of finding the final point and
   azimuth given lat1, lon1, s12, and azi1.  The input arguments lat1,
   lon1, s12, azi1, can be scalars or arrays of equal size.  lat1, lon1,
   azi1 are given in degrees and s12 in meters.  The ellipsoid vector is
   of the form [a, e], where a is the equatorial radius in meters, e is
   the eccentricity.  If ellipsoid is omitted, the WGS84 ellipsoid (more
   precisely, the value returned by defaultellipsoid) is used.  lat2,
   lon2, and azi2 give the position and forward azimuths at the end point
   in degrees.  The optional output S12 is the area between the great
   ellipse and the equator (in meters^2).  gedoc gives an example and
   provides additional background information.  gedoc also gives the
   restrictions on the allowed ranges of the arguments.

   When given a combination of scalar and array inputs, GERECKON behaves
   as though the inputs were expanded to match the size of the arrays.
   However, in the particular case where lat1 and azi1 are the same for
   all the input points, they should be specified as scalars since this
   will considerably speed up the calculations.  (In particular a series
   of points along a single geodesic is efficiently computed by specifying
   an array for s12 only.)

   geodreckon solves the equivalent geodesic problem and usually this is
   preferable to using GERECKON.

   For more information, see

     https://geographiclib.sourceforge.io/C++/doc/greatellipse.html

   See also GEDOC, GEDISTANCE, DEFAULTELLIPSOID, FLAT2ECC, GEODDISTANCE,
     GEODRECKON.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
GERECKON  Point along great ellipse at given azimuth and range



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
gnomonic_fwd


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2095
GNOMONIC_FWD  Forward ellipsoidal gnomonic projection

   [x, y] = GNOMONIC_FWD(lat0, lon0, lat, lon)
   [x, y, azi, rk] = GNOMONIC_FWD(lat0, lon0, lat, lon, ellipsoid)

   performs the forward ellipsoidal gnomonic projection of points
   (lat,lon) to (x,y) using (lat0,lon0) as the center of projection.
   These input arguments can be scalars or arrays of equal size.  The
   ellipsoid vector is of the form [a, e], where a is the equatorial
   radius in meters, e is the eccentricity.  If ellipsoid is omitted, the
   WGS84 ellipsoid (more precisely, the value returned by
   defaultellipsoid) is used.  projdoc defines the projection and gives
   the restrictions on the allowed ranges of the arguments.  The inverse
   projection is given by gnomonic_inv.

   azi and rk give metric properties of the projection at (lat,lon); azi
   is the azimuth of the geodesic from the center of projection and rk is
   the reciprocal of the azimuthal scale.  The scale in the radial
   direction is 1/rk^2.

   If the point lies "over the horizon", i.e., if rk <= 0, then NaNs are
   returned for x and y (the correct values are returned for azi and rk).

   lat0, lon0, lat, lon, azi are in degrees.  The projected coordinates x,
   y are in meters (more precisely the units used for the equatorial
   radius).  rk is dimensionless.

   The ellipsoidal gnomonic projection is an azimuthal projection about a
   center point.  All geodesics through the center point are projected
   into straight lines with the correct azimuth relative to the center
   point.  In addition all geodesics are pass close to the center point
   are very nearly straight.  The projection is derived in Section 8 of

     C. F. F. Karney, Algorithms for geodesics,
     J. Geodesy 87, 43-55 (2013);
     https://doi.org/10.1007/s00190-012-0578-z
     Addenda: https://geographiclib.sourceforge.io/geod-addenda.html

   which also includes methods for solving the "intersection" and
   "interception" problems using the gnomonic projection.

   See also PROJDOC, GNOMONIC_INV, GEODDISTANCE, DEFAULTELLIPSOID,
     FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
GNOMONIC_FWD  Forward ellipsoidal gnomonic projection



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
gnomonic_inv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2209
GNOMONIC_INV  Inverse ellipsoidal gnomonic projection

   [lat, lon] = GNOMONIC_INV(lat0, lon0, x, y)
   [lat, lon, azi, rk] = GNOMONIC_INV(lat0, lon0, x, y, ellipsoid)

   performs the inverse ellipsoidal gnomonic projection of points (x,y) to
   (lat,lon) using (lat0,lon0) as the center of projection.  These input
   arguments can be scalars or arrays of equal size.  The ellipsoid vector
   is of the form [a, e], where a is the equatorial radius in meters, e is
   the eccentricity.  If ellipsoid is omitted, the WGS84 ellipsoid (more
   precisely, the value returned by defaultellipsoid) is used.  projdoc
   defines the projection and gives the restrictions on the allowed ranges
   of the arguments.  The forward projection is given by gnomonic_fwd.

   azi and rk give metric properties of the projection at (lat,lon); azi
   is the azimuth of the geodesic from the center of projection and rk is
   the reciprocal of the azimuthal scale.  The scale in the radial
   direction is 1/rk^2.

   In principle, all finite x and y are allowed.  However, it's possible
   that the inverse projection fails for very large x and y (when the
   geographic position is close to the "horizon").  In that case, NaNs are
   returned for the corresponding output variables.

   lat0, lon0, lat, lon, azi are in degrees.  The projected coordinates x,
   y are in meters (more precisely the units used for the equatorial
   radius).  rk is dimensionless.

   The ellipsoidal gnomonic projection is an azimuthal projection about a
   center point.  All geodesics through the center point are projected
   into straight lines with the correct azimuth relative to the center
   point.  In addition all geodesics are pass close to the center point
   are very nearly straight.  The projection is derived in Section 8 of

     C. F. F. Karney, Algorithms for geodesics,
     J. Geodesy 87, 43-55 (2013);
     https://doi.org/10.1007/s00190-012-0578-z
     Addenda: https://geographiclib.sourceforge.io/geod-addenda.html

   which also includes methods for solving the "intersection" and
   "interception" problems using the gnomonic projection.

   See also PROJDOC, GNOMONIC_FWD, GEODRECKON, DEFAULTELLIPSOID, FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
GNOMONIC_INV  Inverse ellipsoidal gnomonic projection



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
linesimp


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 999
LINESIMP  simplify a line using the Ramer-Douglas-Peucker method

   ptsout = LINESIMP(ptsin, tol)
   ptsout = LINESIMP(ptsin, tol, scal)

   Input:
     ptsin an n x 2 or n x 3 array of input points
     tol the tolerane used to determine whether points can be removed
     scal a vector of length 2 o3 3 used to prescale the points
   Output:
     ptsout an m x 2 or m x 3 array of input points

   Simplify a polyline by removing redundant points.  This routine can deal
   with points in 2d or 3d.  The routine is nan-aware; consecutive runs of
   nans are collapsed to a single entry and initial and final runs of nans
   are removed.  Particularly for 2d data, it's useful to be able to scale
   the data before the algorithm is applied using scale.  For example:

     x = [0:360];;
     xyin = [x,sind(x)];
     xyout = linesimp(xyin, 0.001, [180/pi, 1]);

   If scal is omitted, it is assumed to be [1,1] or [1,1,1].  If tol < 0, it
   just returns the original points with nans collapsed.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
LINESIMP  simplify a line using the Ramer-Douglas-Peucker method



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
loccart_fwd


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1105
LOCCART_FWD  Convert geographic to local cartesian coordinates

   [x, y, z] = LOCCART_FWD(lat0, lon0, h0, lat, lon)
   [x, y, z] = LOCCART_FWD(lat0, lon0, h0, lat, lon, h)
   [x, y, z, M] = LOCCART_FWD(lat0, lon0, h0, lat, lon, h, ellipsoid)

   converts from geodetic coordinates, lat, lon, h to local cartesian
   coordinates, x, y, z, centered at lat0, lon0, h0.  Latitudes and
   longitudes are in degrees; h (default 0), h0, x, y, z are in meters.
   lat, lon, h can be scalars or arrays of equal size.  lat0, lon0, h0
   must be scalars.  The ellipsoid vector is of the form [a, e], where a
   is the equatorial radius in meters, e is the eccentricity.  If
   ellipsoid is omitted, the WGS84 ellipsoid (more precisely, the value
   returned by defaultellipsoid) is used.  The inverse operation is given
   by loccart_inv.

   M is the 3 x 3 rotation matrix for the conversion.  Pre-multiplying a
   unit vector in local cartesian coordinates at (lat, lon, h) by M
   transforms the vector to local cartesian coordinates at (lat0, lon0,
   h0).

   See also LOCCART_INV, DEFAULTELLIPSOID, FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
LOCCART_FWD  Convert geographic to local cartesian coordinates



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
loccart_inv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1053
LOCCART_INV  Convert local cartesian to geographic coordinates

   [lat, lon, h] = LOCCART_INV(lat0, lon0, h0, x, y, z)
   [lat, lon, h, M] = LOCCART_INV(lat0, lon0, h0, x, y, z, ellipsoid)

   converts from local cartesian coordinates, x, y, z, centered at lat0,
   lon0, h0 to geodetic coordinates, lat, lon, h.  Latitudes and
   longitudes are in degrees; h, h0, x, y, z are in meters.  x, y, z can
   be scalars or arrays of equal size.  lat0, lon0, h0 must be scalars.
   The ellipsoid vector is of the form [a, e], where a is the equatorial
   radius in meters, e is the eccentricity.  If ellipsoid is omitted, the
   WGS84 ellipsoid (more precisely, the value returned by
   defaultellipsoid) is used.  The forward operation is given by
   loccart_fwd.

   M is the 3 x 3 rotation matrix for the conversion.  Pre-multiplying a
   unit vector in local cartesian coordinates at (lat0, lon0, h0) by the
   transpose of M transforms the vector to local cartesian coordinates at
   (lat, lon, h).

   See also LOCCART_FWD, DEFAULTELLIPSOID, FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
LOCCART_INV  Convert local cartesian to geographic coordinates



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
mgrs_fwd


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1472
MGRS_FWD  Convert UTM/UPS coordinates to MGRS

   mgrs = MGRS_FWD(x, y, zone, isnorth)
   mgrs = MGRS_FWD(x, y, zone, isnorth, prec)

   converts from the UTM/UPS system to MGRS.  (x,y) are the easting and
   northing (in meters); zone is the UTM zone, in [1,60], or 0 for UPS;
   isnorth is 1 (0) for the northern (southern) hemisphere.  prec in
   [-1,11] gives the precision of the grid reference; the default is 5
   giving 1 m precision.  For example, prec = 2 corresponding to 1 km
   precision, returns a string such as 38SMB4488.  A value of -1 means
   that only the grid zone, e.g., 38S, is returned.  The maximum allowed
   value of prec is 11 (denoting 1 um precision).  prec < -1 is treated a
   NaN, while prec > 11 is treated the same as prec = 11.  The MGRS
   references are returned in a cell array of strings.  x, y, zone,
   isnorth, prec can be scalars or arrays of the same size.  Values that
   can't be converted to MGRS return the "invalid" string, INV.  The
   inverse operation is performed by mgrs_inv.

   The allowed values of (x,y) are
        UTM: x in [100 km, 900 km]
             y in [0 km, 9500 km] for northern hemisphere
             y in [1000 km, 10000 km] for southern hemisphere
        UPS: x and y in [1300 km, 2700 km] for northern hemisphere
             x and y in [800 km, 3200 km] for southern hemisphere

   The ranges are 100 km more restrictive than for utmups_fwd and
   utmups_inv.

   See also MGRS_INV, UTMUPS_FWD.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
MGRS_FWD  Convert UTM/UPS coordinates to MGRS



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
mgrs_inv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1273
MGRS_INV  Convert MGRS to UTM/UPS coordinates

   [x, y, zone, isnorth] = MGRS_INV(mgrs)
   [x, y, zone, isnorth, prec] = MGRS_INV(mgrs, center)

   converts MGRS grid references to the UTM/UPS system.  mgrs is either a
   2d character array of MGRS grid references or a cell array of character
   strings; leading and trailing white space is ignored.  (x,y) are the
   easting and northing (in meters); zone is the UTM zone in [1,60] or 0
   for UPS; isnorth is 1 (0) for the northern (southern) hemisphere.  prec
   is the precision of the grid reference, i.e., 1/2 the number of
   trailing digits; for example 38SMB4488 has prec = 2 (denoting a 1 km
   square).  If center = 1 (the default), then for prec >= 0, the position
   of the center of the grid square is returned; to obtain the SW corner
   subtract 0.5 * 10^(5-prec) from the easting and northing.  If center =
   0, then the SW corner is returned.  center must be a scalar.  prec = -1
   means that the grid reference consists of a grid zone, e.g., 38S, only;
   in this case some representative position in the grid zone is returned.
   Illegal MGRS references result in x = y = NaN, zone = -4, isnorth = 0,
   prec = -2.  The forward operation is performed by mgrs_fwd.

   See also MGRS_FWD, UTMUPS_INV.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
MGRS_INV  Convert MGRS to UTM/UPS coordinates



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
polarst_fwd


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1188
POLARST_FWD  Forward polar stereographic projection

   [x, y] = POLARST_FWD(isnorth, lat, lon)
   [x, y, gam, k] = POLARST_FWD(isnorth, lat, lon, ellipsoid)

   performs the forward polar stereographic projection of points (lat,lon)
   to (x,y) using the north (south) as the center of projection depending
   on whether isnorth is 1 (0).  These input arguments can be scalars or
   arrays of equal size.  The ellipsoid vector is of the form [a, e],
   where a is the equatorial radius in meters, e is the eccentricity.  If
   ellipsoid is omitted, the WGS84 ellipsoid (more precisely, the value
   returned by defaultellipsoid) is used.  projdoc defines the projection
   and gives the restrictions on the allowed ranges of the arguments.  The
   inverse projection is given by polarst_inv.

   gam and k give metric properties of the projection at (lat,lon); gam is
   the meridian convergence at the point and k is the scale.

   lat, lon, gam are in degrees.  The projected coordinates x, y are in
   meters (more precisely the units used for the equatorial radius).  k is
   dimensionless.

   See also PROJDOC, POLARST_INV, UTMUPS_FWD, UTMUPS_INV,
     DEFAULTELLIPSOID, FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
POLARST_FWD  Forward polar stereographic projection



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
polarst_inv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1188
POLARST_INV  Inverse polar stereographic projection

   [lat, lon] = POLARST_INV(isnorth, x, y)
   [lat, lon, gam, k] = POLARST_INV(isnorth, x, y, ellipsoid)

   performs the inverse polar stereographic projection of points (x,y) to
   (lat,lon) using the north (south) as the center of projection depending
   on whether isnorth is 1 (0).  These input arguments can be scalars or
   arrays of equal size.  The ellipsoid vector is of the form [a, e],
   where a is the equatorial radius in meters, e is the eccentricity.  If
   ellipsoid is omitted, the WGS84 ellipsoid (more precisely, the value
   returned by defaultellipsoid) is used.  projdoc defines the projection
   and gives the restrictions on the allowed ranges of the arguments.  The
   forward projection is given by polarst_fwd.

   gam and k give metric properties of the projection at (lat,lon); gam is
   the meridian convergence at the point and k is the scale.

   lat, lon, gam are in degrees.  The projected coordinates x, y are in
   meters (more precisely the units used for the equatorial radius).  k is
   dimensionless.

   See also PROJDOC, POLARST_FWD, UTMUPS_FWD, UTMUPS_INV,
     DEFAULTELLIPSOID, FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
POLARST_INV  Inverse polar stereographic projection



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
projdoc


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3165
PROJDOC  Projections for an ellipsoid

   This package implements five projections:
     * the transverse Mercator projection (tranmerc)
     * the polar stereographic projection (polarst)
     * the azimuthal equidistant projection (eqdazim)
     * the Cassini-Soldner projection (cassini)
     * the ellipsoidal gnomonic projection (gnomonic)

   The package implements the forward projection (from geographic to
   projected coordinates) and inverse projection (from projected to
   geographic coordinates) with abbreviated function names (listed in
   parentheses in the list above) suffixed by _fwd and _inv.  For each
   function, metric properties of the projection are also returned.

   The ellipsoidal gnomonic projection is defined by

     [~,azi0,~,~,m,M] = geoddistance(lat0,lon0,lat,lon)
     rho = m./M, x = rho.*sind(azi0), y = rho.*cosd(azi0)

   Obviously this is an azimuthal projection.  It also enjoys
   approximately the property of the spherical gnomonic projection, that
   geodesics map to straight lines.  The projection is derived in Section
   8 of

     C. F. F. Karney, Algorithms for geodesics,
     J. Geodesy 87, 43-55 (2013);
     https://doi.org/10.1007/s00190-012-0578-z
     Addenda: https://geographiclib.sourceforge.io/geod-addenda.html

   The parameters of the ellipsoid are specified by the optional ellipsoid
   argument to the routines.  This is a two-element vector of the form
   [a,e], where a is the equatorial radius, e is the eccentricity e =
   sqrt(a^2-b^2)/a, and b is the polar semi-axis.  Typically, a and b are
   measured in meters and the linear and area quantities returned by the
   routines are then in meters and meters^2.  However, other units can be
   employed.  If ellipsoid is omitted, then the WGS84 ellipsoid (more
   precisely, the value returned by defaultellipsoid) is assumed [6378137,
   0.0818191908426215] corresponding to a = 6378137 meters and a
   flattening f = (a-b)/a = 1/298.257223563.  The flattening and
   eccentricity are related by

       e = sqrt(f * (2 - f))
       f = e^2 / (1 + sqrt(1 - e^2))

   (The functions ecc2flat and flat2ecc implement these conversions.)  For
   a sphere, set e = 0; for a prolate ellipsoid (b > a), specify e as a
   pure imaginary number.

   All angles (latitude, longitude, azimuth) are measured in degrees with
   latitudes increasing northwards, longitudes increasing eastwards, and
   azimuths measured clockwise from north.  For a point at a pole, the
   azimuth is defined by keeping the longitude fixed, writing lat =
   +/-(90-eps), and taking the limit eps -> 0+.

   Restrictions on the inputs:
     * All latitudes must lie in [-90, 90].
     * The equatorial radius, a, must be positive.
     * The eccentricity, e, should be satisfy abs(e) < 0.2 in order to
       retain full accuracy (this corresponds to flattenings satisfying
       abs(f) <= 1/50, approximately).  This condition holds for most
       applications in geodesy.

   See also TRANMERC_FWD, TRANMERC_INV, POLARST_FWD, POLARST_INV,
     EQDAZIM_FWD, EQDAZIM_INV, CASSINI_FWD, CASSINI_INV, GNOMONIC_FWD,
     GNOMONIC_INV, DEFAULTELLIPSOID, ECC2FLAT, FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
PROJDOC  Projections for an ellipsoid



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
tranmerc_fwd


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2027
TRANMERC_FWD  Forward transverse Mercator projection

   [x, y] = TRANMERC_FWD(lat0, lon0, lat, lon)
   [x, y, gam, k] = TRANMERC_FWD(lat0, lon0, lat, lon, ellipsoid)

   performs the forward transverse Mercator projection of points (lat,lon)
   to (x,y) using (lat0,lon0) as the center of projection.  These input
   arguments can be scalars or arrays of equal size.  The ellipsoid vector
   is of the form [a, e], where a is the equatorial radius in meters, e is
   the eccentricity.  If ellipsoid is omitted, the WGS84 ellipsoid (more
   precisely, the value returned by defaultellipsoid) is used.  The common
   case of lat0 = 0 is treated efficiently provided that lat0 is specified
   as a scalar.  projdoc defines the projection and gives the restrictions
   on the allowed ranges of the arguments.  The inverse projection is
   given by tranmerc_inv.  The scale on the central meridian is 1.

   gam and k give metric properties of the projection at (lat,lon); gam is
   the meridian convergence at the point and k is the scale.

   lat0, lon0, lat, lon, gam are in degrees.  The projected coordinates x,
   y are in meters (more precisely the units used for the equatorial
   radius).  k is dimensionless.

   This implementation of the projection is based on the series method
   described in

     C. F. F. Karney, Transverse Mercator with an accuracy of a few
     nanometers, J. Geodesy 85(8), 475-485 (Aug. 2011);
     Addenda: https://geographiclib.sourceforge.io/tm-addenda.html

   This extends the series given by Krueger (1912) to sixth order in the
   flattening.  This is a substantially better series than that used by
   the MATLAB mapping toolbox.  In particular the errors in the projection
   are less than 5 nanometers within 3900 km of the central meridian (and
   less than 1 mm within 7600 km of the central meridian).  The mapping
   can be continued accurately over the poles to the opposite meridian.

   See also PROJDOC, TRANMERC_INV, UTMUPS_FWD, UTMUPS_INV,
     DEFAULTELLIPSOID, FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
TRANMERC_FWD  Forward transverse Mercator projection



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
tranmerc_inv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2027
TRANMERC_INV  Inverse transverse Mercator projection

   [lat, lon] = TRANMERC_INV(lat0, lon0, x, y)
   [lat, lon, gam, k] = TRANMERC_INV(lat0, lon0, x, y, ellipsoid)

   performs the inverse transverse Mercator projection of points (x,y) to
   (lat,lon) using (lat0,lon0) as the center of projection.  These input
   arguments can be scalars or arrays of equal size.  The ellipsoid vector
   is of the form [a, e], where a is the equatorial radius in meters, e is
   the eccentricity.  If ellipsoid is omitted, the WGS84 ellipsoid (more
   precisely, the value returned by defaultellipsoid) is used.  The common
   case of lat0 = 0 is treated efficiently provided that lat0 is specified
   as a scalar.  projdoc defines the projection and gives the restrictions
   on the allowed ranges of the arguments.  The forward projection is
   given by tranmerc_fwd.  The scale on the central meridian is 1.

   gam and K give metric properties of the projection at (lat,lon); gam is
   the meridian convergence at the point and k is the scale.

   lat0, lon0, lat, lon, gam are in degrees.  The projected coordinates x,
   y are in meters (more precisely the units used for the equatorial
   radius).  k is dimensionless.

   This implementation of the projection is based on the series method
   described in

     C. F. F. Karney, Transverse Mercator with an accuracy of a few
     nanometers, J. Geodesy 85(8), 475-485 (Aug. 2011);
     Addenda: https://geographiclib.sourceforge.io/tm-addenda.html

   This extends the series given by Krueger (1912) to sixth order in the
   flattening.  This is a substantially better series than that used by
   the MATLAB mapping toolbox.  In particular the errors in the projection
   are less than 5 nanometers within 3900 km of the central meridian (and
   less than 1 mm within 7600 km of the central meridian).  The mapping
   can be continued accurately over the poles to the opposite meridian.

   See also PROJDOC, TRANMERC_FWD, UTMUPS_FWD, UTMUPS_INV,
     DEFAULTELLIPSOID, FLAT2ECC.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
TRANMERC_INV  Inverse transverse Mercator projection



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
utmups_fwd


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1926
UTMUPS_FWD  Convert to UTM/UPS system

   [x, y, zone, isnorth] = UTMUPS_FWD(lat, lon)
   [x, y, zone, isnorth, gam, k] = UTMUPS_FWD(lat, lon, setzone)

   convert from geographical coordinates, (lat,lon), to the UTM/UPS
   system.  The output is (x,y) = (easting,northing), zone which is either
   the UTM zone or 0 for UPS, and a hemisphere selector, isnorth (0 for
   the southern hemisphere, 1 for the northern).  If setzone = -1 (the
   default), the standard choice is made between UTM and UPS and, if UTM,
   the standard zone is picked (the Norway and Svalbard exceptions are
   honored).  lat, lon, and setzone can be scalars or arrays of equal
   size.  The inverse operation is performed by utmups_inv.

   gam and k give metric properties of the projection at (lat,lon); gam is
   the meridian convergence at the point and k is the scale.

   lat, lon, gam are in degrees.  The projected coordinates x, y are in
   meters.  k is dimensionless.

   The optional argument, setzone, allows the UTM/UPS and zone
   assignment to be overridden.  The choices are
        0, use UPS
        [1,60], use the corresponding UTM zone
       -1, use the standard assigment (the default)
       -2, use closest UTM zone
       -4, an undefined zone

   The allowed values of (x,y) are
        UTM: x in [0 km, 1000 km]
             y in [0 km, 9600 km] for northern hemisphere
             y in [900 km, 10000 km] for southern hemisphere
        UPS: x and y in [1200 km, 2800 km] for northern hemisphere
             x and y in [700 km, 3300 km] for southern hemisphere

   The ranges are 100 km less restrictive than for mgrs_fwd.

   UTMUPS_FWD checks its arguments and requires that lat is in
   [-90deg,90deg] and that (x,y) lie in the limits given above.  If these
   conditions don't hold (x,y), gam, k are converted to NaN, zone to -4
   and isnorthp to 0.

   See also UTMUPS_INV, TRANMERC_FWD, POLARST_FWD, MGRS_FWD.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
UTMUPS_FWD  Convert to UTM/UPS system



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
utmups_inv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1503
UTMUPS_INV  Convert from UTM/UPS system

   [lat, lon] = UTMUPS_INV(x, y, zone, isnorth)
   [lat, lon, gam, k] = UTMUPS_INV(x, y, zone, isnorth)

   convert to the UTM/UPS system to geographical coordinates, (lat,lon).
   The input is (x,y) = (easting,northing), the zone which is either the
   UTM zone or 0 for UPS , and a hemisphere selector, isnorth (0 for the
   southern hemisphere, 1 for the northern).  x, y, zone, and isnorth can
   be scalars or arrays of equal size.  The forward operation is performed
   by utmups_fwd.

   gam and k give metric properties of the projection at (lat,lon); gam is
   the meridian convergence at the point and k is the scale.

   lat, lon, gam are in degrees.  The projected coordinates x, y are in
   meters.  k is dimensionless.

   The argument zone has the following meanings
        0, use UPS
        [1,60], use the corresponding UTM zone
       -4, an undefined zone

   The allowed values of (x,y) are
        UTM: x in [0 km, 1000 km]
             y in [0 km, 9600 km] for northern hemisphere
             y in [900 km, 10000 km] for southern hemisphere
        UPS: x and y in [1200 km, 2800 km] for northern hemisphere
             x and y in [700 km, 3300 km] for southern hemisphere

   The ranges are 100 km less restrictive than for mgrs_fwd.

   UTMUPS_INV checks that (x,y) lie in the limits given above.  If these
   conditions don't hold (lat,lon), gam, k are converted to NaN.

   See also UTMUPS_FWD, TRANMERC_INV, POLARST_INV, MGRS_INV.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
UTMUPS_INV  Convert from UTM/UPS system





