WCSLIB: prj.h File Reference

WCSLIB 8.9

Loading...
Searching...
No Matches
Data Structures | Macros | Enumerations | Functions | Variables
prj.h File Reference

Go to the source code of this file.

## Data Structures
struct | prjprm
| Projection parameters. More...

## Macros
#define | PVN 30
| Total number of projection parameters.
#define | PRJX2S_ARGS
| For use in declaring deprojection function prototypes.
#define | PRJS2X_ARGS
| For use in declaring projection function prototypes.
#define | PRJLEN (sizeof(struct prjprm)/sizeof(int))
| Size of the prjprm struct in int units.
#define | prjini_errmsg prj_errmsg
| Deprecated.
#define | prjprt_errmsg prj_errmsg
| Deprecated.
#define | prjset_errmsg prj_errmsg
| Deprecated.
#define | prjx2s_errmsg prj_errmsg
| Deprecated.
#define | prjs2x_errmsg prj_errmsg
| Deprecated.

## Enumerations
enum | prjenq_enum { PRJENQ_SET = 2 , PRJENQ_BYP = 4 }
enum | prj_errmsg_enum { PRJERR_SUCCESS = 0 , PRJERR_NULL_POINTER = 1 , PRJERR_BAD_PARAM = 2 , PRJERR_BAD_PIX = 3 , PRJERR_BAD_WORLD = 4 }

## Functions
int | prjini (struct prjprm *prj)
| Default constructor for the prjprm struct.
int | prjfree (struct prjprm *prj)
| Destructor for the prjprm struct.
int | prjsize (const struct prjprm *prj, int sizes[2])
| Compute the size of a prjprm struct.
int | prjenq (const struct prjprm *prj, int enquiry)
| enquire about the state of a prjprm struct.
int | prjprt (const struct prjprm *prj)
| Print routine for the prjprm struct.
int | prjperr (const struct prjprm *prj, const char *prefix)
| Print error messages from a prjprm struct.
int | prjbchk (double tol, int nphi, int ntheta, int spt, double phi[], double theta[], int stat[])
| Bounds checking on native coordinates.
int | prjset (struct prjprm *prj)
| Generic setup routine for the prjprm struct.
int | prjx2s (PRJX2S_ARGS)
| Generic Cartesian-to-spherical deprojection.
int | prjs2x (PRJS2X_ARGS)
| Generic spherical-to-Cartesian projection.
int | azpset (struct prjprm *prj)
| Set up a prjprm struct for the zenithal/azimuthal perspective (AZP) projection.
int | azpx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the zenithal/azimuthal perspective (AZP) projection.
int | azps2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the zenithal/azimuthal perspective (AZP) projection.
int | szpset (struct prjprm *prj)
| Set up a prjprm struct for the slant zenithal perspective (SZP) projection.
int | szpx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the slant zenithal perspective (SZP) projection.
int | szps2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the slant zenithal perspective (SZP) projection.
int | tanset (struct prjprm *prj)
| Set up a prjprm struct for the gnomonic (TAN) projection.
int | tanx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the gnomonic (TAN) projection.
int | tans2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the gnomonic (TAN) projection.
int | stgset (struct prjprm *prj)
| Set up a prjprm struct for the stereographic (STG) projection.
int | stgx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the stereographic (STG) projection.
int | stgs2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the stereographic (STG) projection.
int | sinset (struct prjprm *prj)
| Set up a prjprm struct for the orthographic/synthesis (SIN) projection.
int | sinx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the orthographic/synthesis (SIN) projection.
int | sins2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the orthographic/synthesis (SIN) projection.
int | arcset (struct prjprm *prj)
| Set up a prjprm struct for the zenithal/azimuthal equidistant (ARC) projection.
int | arcx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the zenithal/azimuthal equidistant (ARC) projection.
int | arcs2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the zenithal/azimuthal equidistant (ARC) projection.
int | zpnset (struct prjprm *prj)
| Set up a prjprm struct for the zenithal/azimuthal polynomial (ZPN) projection.
int | zpnx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the zenithal/azimuthal polynomial (ZPN) projection.
int | zpns2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the zenithal/azimuthal polynomial (ZPN) projection.
int | zeaset (struct prjprm *prj)
| Set up a prjprm struct for the zenithal/azimuthal equal area (ZEA) projection.
int | zeax2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the zenithal/azimuthal equal area (ZEA) projection.
int | zeas2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the zenithal/azimuthal equal area (ZEA) projection.
int | airset (struct prjprm *prj)
| Set up a prjprm struct for Airy's (AIR) projection.
int | airx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for Airy's (AIR) projection.
int | airs2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for Airy's (AIR) projection.
int | cypset (struct prjprm *prj)
| Set up a prjprm struct for the cylindrical perspective (CYP) projection.
int | cypx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the cylindrical perspective (CYP) projection.
int | cyps2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the cylindrical perspective (CYP) projection.
int | ceaset (struct prjprm *prj)
| Set up a prjprm struct for the cylindrical equal area (CEA) projection.
int | ceax2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the cylindrical equal area (CEA) projection.
int | ceas2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the cylindrical equal area (CEA) projection.
int | carset (struct prjprm *prj)
| Set up a prjprm struct for the plate carrée (CAR) projection.
int | carx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the plate carrée (CAR) projection.
int | cars2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the plate carrée (CAR) projection.
int | merset (struct prjprm *prj)
| Set up a prjprm struct for Mercator's (MER) projection.
int | merx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for Mercator's (MER) projection.
int | mers2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for Mercator's (MER) projection.
int | sflset (struct prjprm *prj)
| Set up a prjprm struct for the Sanson-Flamsteed (SFL) projection.
int | sflx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the Sanson-Flamsteed (SFL) projection.
int | sfls2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the Sanson-Flamsteed (SFL) projection.
int | parset (struct prjprm *prj)
| Set up a prjprm struct for the parabolic (PAR) projection.
int | parx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the parabolic (PAR) projection.
int | pars2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the parabolic (PAR) projection.
int | molset (struct prjprm *prj)
| Set up a prjprm struct for Mollweide's (MOL) projection.
int | molx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for Mollweide's (MOL) projection.
int | mols2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for Mollweide's (MOL) projection.
int | aitset (struct prjprm *prj)
| Set up a prjprm struct for the Hammer-Aitoff (AIT) projection.
int | aitx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the Hammer-Aitoff (AIT) projection.
int | aits2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the Hammer-Aitoff (AIT) projection.
int | copset (struct prjprm *prj)
| Set up a prjprm struct for the conic perspective (COP) projection.
int | copx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the conic perspective (COP) projection.
int | cops2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the conic perspective (COP) projection.
int | coeset (struct prjprm *prj)
| Set up a prjprm struct for the conic equal area (COE) projection.
int | coex2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the conic equal area (COE) projection.
int | coes2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the conic equal area (COE) projection.
int | codset (struct prjprm *prj)
| Set up a prjprm struct for the conic equidistant (COD) projection.
int | codx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the conic equidistant (COD) projection.
int | cods2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the conic equidistant (COD) projection.
int | cooset (struct prjprm *prj)
| Set up a prjprm struct for the conic orthomorphic (COO) projection.
int | coox2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the conic orthomorphic (COO) projection.
int | coos2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the conic orthomorphic (COO) projection.
int | bonset (struct prjprm *prj)
| Set up a prjprm struct for Bonne's (BON) projection.
int | bonx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for Bonne's (BON) projection.
int | bons2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for Bonne's (BON) projection.
int | pcoset (struct prjprm *prj)
| Set up a prjprm struct for the polyconic (PCO) projection.
int | pcox2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the polyconic (PCO) projection.
int | pcos2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the polyconic (PCO) projection.
int | tscset (struct prjprm *prj)
| Set up a prjprm struct for the tangential spherical cube (TSC) projection.
int | tscx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the tangential spherical cube (TSC) projection.
int | tscs2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the tangential spherical cube (TSC) projection.
int | cscset (struct prjprm *prj)
| Set up a prjprm struct for the COBE spherical cube (CSC) projection.
int | cscx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the COBE spherical cube (CSC) projection.
int | cscs2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the COBE spherical cube (CSC) projection.
int | qscset (struct prjprm *prj)
| Set up a prjprm struct for the quadrilateralized spherical cube (QSC) projection.
int | qscx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the quadrilateralized spherical cube (QSC) projection.
int | qscs2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the quadrilateralized spherical cube (QSC) projection.
int | hpxset (struct prjprm *prj)
| Set up a prjprm struct for the HEALPix (HPX) projection.
int | hpxx2s (PRJX2S_ARGS)
| Cartesian-to-spherical transformation for the HEALPix (HPX) projection.
int | hpxs2x (PRJS2X_ARGS)
| Spherical-to-Cartesian transformation for the HEALPix (HPX) projection.
int | xphset (struct prjprm *prj)
int | xphx2s (PRJX2S_ARGS)
int | xphs2x (PRJS2X_ARGS)

## Variables
const char * | prj_errmsg []
| Status return messages.
const int | CONIC
| Identifier for conic projections.
const int | CONVENTIONAL
| Identifier for conventional projections.
const int | CYLINDRICAL
| Identifier for cylindrical projections.
const int | POLYCONIC
| Identifier for polyconic projections.
const int | PSEUDOCYLINDRICAL
| Identifier for pseudocylindrical projections.
const int | QUADCUBE
| Identifier for quadcube projections.
const int | ZENITHAL
| Identifier for zenithal/azimuthal projections.
const int | HEALPIX
| Identifier for the HEALPix projection.
const char | prj_categories [9][32]
| Projection categories.
const int | prj_ncode
| The number of recognized three-letter projection codes.
const char | prj_codes [28][4]
| Recognized three-letter projection codes.

## Detailed Description

Routines in this suite implement the spherical map projections defined by the FITS World Coordinate System (WCS) standard, as described in

"Representations of world coordinates in FITS",
Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I)
"Representations of celestial coordinates in FITS",
Calabretta, M.R., & Greisen, E.W. 2002, A&A, 395, 1077 (WCS Paper II)
"Mapping on the HEALPix grid",
Calabretta, M.R., & Roukema, B.F. 2007, MNRAS, 381, 865 (WCS Paper V)
"Representing the 'Butterfly' Projection in FITS -- Projection Code XPH",
Calabretta, M.R., & Lowe, S.R. 2013, PASA, 30, e050 (WCS Paper VI)

These routines are based on the prjprm struct which contains all information needed for the computations. The struct contains some members that must be set by the user, and others that are maintained by these routines, somewhat like a C++ class but with no encapsulation.

Routine prjini() is provided to initialize the prjprm struct with default values, prjfree() reclaims any memory that may have been allocated to store an error message, prjsize() computes its total size including allocated memory, prjenq() returns information about the state of the struct, and prjprt() prints its contents.

prjperr() prints the error message(s) (if any) stored in a prjprm struct. prjbchk() performs bounds checking on native spherical coordinates.

Setup routines for each projection with names of the form ???set(), where "???" is the down-cased three-letter projection code, compute intermediate values in the prjprm struct from parameters in it that were supplied by the user. The struct always needs to be set by the projection's setup routine but that need not be called explicitly - refer to the explanation of prjprm::flag.

Each map projection is implemented via separate functions for the spherical projection, ???s2x(), and deprojection, ???x2s().

A set of driver routines, prjset(), prjx2s(), and prjs2x(), provides a generic interface to the specific projection routines which they invoke via pointers-to-functions stored in the prjprm struct.

In summary, the routines are:

- prjini() Initialization routine for the prjprm struct.
- prjfree() Reclaim memory allocated for error messages.
- prjsize() Compute total size of a prjprm struct.
- prjprt() Print a prjprm struct.
- prjperr() Print error message (if any).

- prjbchk() Bounds checking on native coordinates.

- prjset(), prjx2s(), prjs2x(): Generic driver routines

- azpset(), azpx2s(), azps2x(): AZP (zenithal/azimuthal perspective)
- szpset(), szpx2s(), szps2x(): SZP (slant zenithal perspective)
- tanset(), tanx2s(), tans2x(): TAN (gnomonic)
- stgset(), stgx2s(), stgs2x(): STG (stereographic)
- sinset(), sinx2s(), sins2x(): SIN (orthographic/synthesis)
- arcset(), arcx2s(), arcs2x(): ARC (zenithal/azimuthal equidistant)
- zpnset(), zpnx2s(), zpns2x(): ZPN (zenithal/azimuthal polynomial)
- zeaset(), zeax2s(), zeas2x(): ZEA (zenithal/azimuthal equal area)
- airset(), airx2s(), airs2x(): AIR (Airy)
- cypset(), cypx2s(), cyps2x(): CYP (cylindrical perspective)
- ceaset(), ceax2s(), ceas2x(): CEA (cylindrical equal area)
- carset(), carx2s(), cars2x(): CAR (Plate carée)
- merset(), merx2s(), mers2x(): MER (Mercator)
- sflset(), sflx2s(), sfls2x(): SFL (Sanson-Flamsteed)
- parset(), parx2s(), pars2x(): PAR (parabolic)
- molset(), molx2s(), mols2x(): MOL (Mollweide)
- aitset(), aitx2s(), aits2x(): AIT (Hammer-Aitoff)
- copset(), copx2s(), cops2x(): COP (conic perspective)
- coeset(), coex2s(), coes2x(): COE (conic equal area)
- codset(), codx2s(), cods2x(): COD (conic equidistant)
- cooset(), coox2s(), coos2x(): COO (conic orthomorphic)
- bonset(), bonx2s(), bons2x(): BON (Bonne)
- pcoset(), pcox2s(), pcos2x(): PCO (polyconic)
- tscset(), tscx2s(), tscs2x(): TSC (tangential spherical cube)
- cscset(), cscx2s(), cscs2x(): CSC (COBE spherical cube)
- qscset(), qscx2s(), qscs2x(): QSC (quadrilateralized spherical cube)
- hpxset(), hpxx2s(), hpxs2x(): HPX (HEALPix)
- xphset(), xphx2s(), xphs2x(): XPH (HEALPix polar, aka "butterfly")

Argument checking (projection routines):
The values of and (the native longitude and latitude) normally lie in the range for , and for . However, all projection routines will accept any value of and will not normalize it.

The projection routines do not explicitly check that lies within the range . They do check for any value of that produces an invalid argument to the projection equations (e.g. leading to division by zero). The projection routines for AZP, SZP, TAN, SIN, ZPN, and COP also return error 2 if corresponds to the overlapped (far) side of the projection but also return the corresponding value of . This strict bounds checking may be relaxed at any time by setting prjprm::bounds%2 to 0 (rather than 1); the projections need not be reinitialized.

Argument checking (deprojection routines):
Error checking on the projected coordinates is limited to that required to ascertain whether a solution exists. Where a solution does exist, an optional check is made that the value of and obtained lie within the ranges for , and for . This check, performed by prjbchk(), is enabled by default. It may be disabled by setting prjprm::bounds%4 to 0 (rather than 1); the projections need not be reinitialized.

Accuracy:
No warranty is given for the accuracy of these routines (refer to the copyright notice); intending users must satisfy for themselves their adequacy for the intended purpose. However, closure to a precision of at least of longitude and latitude has been verified for typical projection parameters on the degree graticule of native longitude and latitude (to within of any latitude where the projection may diverge). Refer to the tprj1.c and tprj2.c test routines that accompany this software.

## Macro Definition Documentation

## ◆ PVN

#define PVN 30

Total number of projection parameters.

The total number of projection parameters numbered 0 to PVN-1.

## ◆ PRJX2S_ARGS

#define PRJX2S_ARGS

Value:
struct prjprm *prj, int nx, int ny, int sxy, int spt, \
const double x[], const double y[], double phi[], double theta[], int stat[]
prjprm
Projection parameters.
Definition prj.h:730

For use in declaring deprojection function prototypes.

Preprocessor macro used for declaring deprojection function prototypes.

## ◆ PRJS2X_ARGS

#define PRJS2X_ARGS

Value:
struct prjprm *prj, int nx, int ny, int sxy, int spt, \
const double phi[], const double theta[], double x[], double y[], int stat[]

For use in declaring projection function prototypes.

Preprocessor macro used for declaring projection function prototypes.

## ◆ PRJLEN

#define PRJLEN (sizeof(struct prjprm)/sizeof(int))

Size of the prjprm struct in int units.

Size of the prjprm struct in int units, used by the Fortran wrappers.

## ◆ prjini_errmsg

#define prjini_errmsg prj_errmsg

Deprecated.

Deprecated
  Added for backwards compatibility, use prj_errmsg directly now instead.

## ◆ prjprt_errmsg

#define prjprt_errmsg prj_errmsg

Deprecated.

Deprecated
  Added for backwards compatibility, use prj_errmsg directly now instead.

## ◆ prjset_errmsg

#define prjset_errmsg prj_errmsg

Deprecated.

Deprecated
  Added for backwards compatibility, use prj_errmsg directly now instead.

## ◆ prjx2s_errmsg

#define prjx2s_errmsg prj_errmsg

Deprecated.

Deprecated
  Added for backwards compatibility, use prj_errmsg directly now instead.

## ◆ prjs2x_errmsg

#define prjs2x_errmsg prj_errmsg

Deprecated.

Deprecated
  Added for backwards compatibility, use prj_errmsg directly now instead.

## Enumeration Type Documentation

## ◆ prjenq_enum

enum prjenq_enum

Enumerator
PRJENQ_SET |
PRJENQ_BYP |

## ◆ prj_errmsg_enum

enum prj_errmsg_enum

Enumerator
PRJERR_SUCCESS |
PRJERR_NULL_POINTER |
PRJERR_BAD_PARAM |
PRJERR_BAD_PIX |
PRJERR_BAD_WORLD |

## Function Documentation

## ◆ prjini()

int prjini | ( | struct prjprm * | prj | ) |

Default constructor for the prjprm struct.

prjini() sets all members of a prjprm struct to default values. It should be used to initialize every prjprm struct.

PLEASE NOTE: If the prjprm struct has already been initialized, then before reinitializing, it prjfree() should be used to free any memory that may have been allocated to store an error message. A memory leak may otherwise result.

Parameters

  [out] | prj | Projection parameters.

Returns
  Status return value:
  - 0: Success.
  - 1: Null prjprm pointer passed.

## ◆ prjfree()

int prjfree | ( | struct prjprm * | prj | ) |

Destructor for the prjprm struct.

prjfree() frees any memory that may have been allocated to store an error message in the prjprm struct.

Parameters

  [in,out] | prj | Projection parameters.

Returns
  Status return value:
  - 0: Success.
  - 1: Null prjprm pointer passed.

## ◆ prjsize()

int prjsize | ( | const struct prjprm * | prj,
|  | int | sizes[2] )

Compute the size of a prjprm struct.

prjsize() computes the full size of a prjprm struct, including allocated memory.

Parameters

  [in] | prj | Projection parameters. If NULL, the base size of the struct and the allocated size are both set to zero.
  [out] | sizes | The first element is the base size of the struct as returned by sizeof(struct prjprm). The second element is the total allocated size, in bytes. This figure includes memory allocated for the constituent struct, prjprm::err. It is not an error for the struct not to have been set up via prjset().

Returns
  Status return value:
  - 0: Success.

## ◆ prjenq()

int prjenq | ( | const struct prjprm * | prj,
|  | int | enquiry )

enquire about the state of a prjprm struct.

prjenq() may be used to obtain information about the state of a prjprm struct. The function returns a true/false answer for the enquiry asked.

Parameters

  [in] | prj | Projection parameters.
  [in] | enquiry | Enquiry according to the following parameters: PRJENQ_SET: the struct has been set up by prjset(). PRJENQ_BYP: the struct is in bypass mode (see prjset()).

Returns
  Enquiry result:
  - 0: No.
  - 1: Yes.

## ◆ prjprt()

int prjprt | ( | const struct prjprm * | prj | ) |

Print routine for the prjprm struct.

prjprt() prints the contents of a prjprm struct using wcsprintf(). Mainly intended for diagnostic purposes.

Parameters

  [in] | prj | Projection parameters.

Returns
  Status return value:
  - 0: Success.
  - 1: Null prjprm pointer passed.

## ◆ prjperr()

int prjperr | ( | const struct prjprm * | prj,
|  | const char * | prefix )

Print error messages from a prjprm struct.

prjperr() prints the error message(s) (if any) stored in a prjprm struct. If there are no errors then nothing is printed. It uses wcserr_prt(), q.v.

Parameters

  [in] | prj | Projection parameters.
  [in] | prefix | If non-NULL, each output line will be prefixed with this string.

Returns
  Status return value:
  - 0: Success.
  - 1: Null prjprm pointer passed.

## ◆ prjbchk()

int prjbchk | ( | double | tol,
|  | int | nphi,
|  | int | ntheta,
|  | int | spt,
|  | double | phi[],
|  | double | theta[],
|  | int | stat[] )

Bounds checking on native coordinates.

prjbchk() performs bounds checking on native spherical coordinates. As returned by the deprojection (x2s) routines, native longitude is expected to lie in the closed interval , with latitude in .

A tolerance may be specified to provide a small allowance for numerical imprecision. Values that lie outside the allowed range by not more than the specified tolerance will be adjusted back into range.

If prjprm::bounds&4 is set, as it is by prjini(), then prjbchk() will be invoked automatically by the Cartesian-to-spherical deprojection (x2s) routines with an appropriate tolerance set for each projection.

Parameters

  [in] | tol | Tolerance for the bounds check [deg].
  [in] | nphi,ntheta | Vector lengths.
  [in] | spt | Vector stride.
  [in,out] | phi,theta | Native longitude and latitude [deg].
  [out] | stat | Status value for each vector element: 0: Valid value of . 1: Invalid value.

Returns
  Status return value:
  - 0: Success.
  - 1: One or more of the coordinates were, invalid, as indicated by the stat vector.

## ◆ prjset()

int prjset | ( | struct prjprm * | prj | ) |

Generic setup routine for the prjprm struct.

prjset() sets up a prjprm struct according to information supplied within it.

The one important distinction between prjset() and the setup routines for the specific projections is that the projection code must be defined in the prjprm struct in order for prjset() to identify the required projection. Once prjset() has initialized the prjprm struct, prjx2s() and prjs2x() use the pointers to the specific projection and deprojection routines contained therein.

Note that this routine need not be called directly; it will be invoked by prjx2s() and prjs2x() if prj.flag is anything other than a predefined magic value.

prjset() normally operates regardless of the value of prjprm::flag; i.e. even if a struct was previously set up it will be reset unconditionally. However, a prjprm struct may be put into "bypass" mode by invoking prjset() initially with prjprm::flag == 1 (rather than 0). prjset() will return immediately if invoked on a struct in that state. To take a struct out of bypass mode, simply reset prjprm::flag to zero. See also prjenq().

Parameters

  [in,out] | prj | Projection parameters.

Returns
  Status return value:
  - 0: Success.
  - 1: Null prjprm pointer passed.
  - 2: Invalid projection parameters.
  For returns > 1, a detailed error message is set in prjprm::err if enabled, see wcserr_enable().

## ◆ prjx2s()

int prjx2s | ( | PRJX2S_ARGS |  | ) |

Generic Cartesian-to-spherical deprojection.

Deproject Cartesian coordinates in the plane of projection to native spherical coordinates .

The projection is that specified by prjprm::code.

Parameters

  [in,out] | prj | Projection parameters.
  [in] | nx,ny | Vector lengths.
  [in] | sxy,spt | Vector strides.
  [in] | x,y | Projected coordinates.
  [out] | phi,theta | Longitude and latitude of the projected point in native spherical coordinates [deg].
  [out] | stat | Status value for each vector element: 0: Success. 1: Invalid value of .

Returns
  Status return value:
  - 0: Success.
  - 1: Null prjprm pointer passed.
  - 2: Invalid projection parameters.
  - 3: One or more of the coordinates were invalid, as indicated by the stat vector.
  For returns > 1, a detailed error message is set in prjprm::err if enabled, see wcserr_enable().

## ◆ prjs2x()

int prjs2x | ( | PRJS2X_ARGS |  | ) |

Generic spherical-to-Cartesian projection.

Project native spherical coordinates to Cartesian coordinates in the plane of projection.

The projection is that specified by prjprm::code.

Parameters

  [in,out] | prj | Projection parameters.
  [in] | nphi,ntheta | Vector lengths.
  [in] | spt,sxy | Vector strides.
  [in] | phi,theta | Longitude and latitude of the projected point in native spherical coordinates [deg].
  [out] | x,y | Projected coordinates.
  [out] | stat | Status value for each vector element: 0: Success. 1: Invalid value of .

Returns
  Status return value:
  - 0: Success.
  - 1: Null prjprm pointer passed.
  - 2: Invalid projection parameters.
  - 4: One or more of the coordinates were, invalid, as indicated by the stat vector.
  For returns > 1, a detailed error message is set in prjprm::err if enabled, see wcserr_enable().

## ◆ azpset()

int azpset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the zenithal/azimuthal perspective (AZP) projection.

azpset() sets up a prjprm struct for a zenithal/azimuthal perspective (AZP) projection.

See prjset() for a description of the API.

## ◆ azpx2s()

int azpx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the zenithal/azimuthal perspective (AZP) projection.

azpx2s() deprojects Cartesian coordinates in the plane of a zenithal/azimuthal perspective (AZP) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ azps2x()

int azps2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the zenithal/azimuthal perspective (AZP) projection.

azps2x() projects native spherical coordinates to Cartesian coordinates in the plane of a zenithal/azimuthal perspective (AZP) projection.

See prjs2x() for a description of the API.

## ◆ szpset()

int szpset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the slant zenithal perspective (SZP) projection.

szpset() sets up a prjprm struct for a slant zenithal perspective (SZP) projection.

See prjset() for a description of the API.

## ◆ szpx2s()

int szpx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the slant zenithal perspective (SZP) projection.

szpx2s() deprojects Cartesian coordinates in the plane of a slant zenithal perspective (SZP) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ szps2x()

int szps2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the slant zenithal perspective (SZP) projection.

szps2x() projects native spherical coordinates to Cartesian coordinates in the plane of a slant zenithal perspective (SZP) projection.

See prjs2x() for a description of the API.

## ◆ tanset()

int tanset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the gnomonic (TAN) projection.

tanset() sets up a prjprm struct for a gnomonic (TAN) projection.

See prjset() for a description of the API.

## ◆ tanx2s()

int tanx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the gnomonic (TAN) projection.

tanx2s() deprojects Cartesian coordinates in the plane of a gnomonic (TAN) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ tans2x()

int tans2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the gnomonic (TAN) projection.

tans2x() projects native spherical coordinates to Cartesian coordinates in the plane of a gnomonic (TAN) projection.

See prjs2x() for a description of the API.

## ◆ stgset()

int stgset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the stereographic (STG) projection.

stgset() sets up a prjprm struct for a stereographic (STG) projection.

See prjset() for a description of the API.

## ◆ stgx2s()

int stgx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the stereographic (STG) projection.

stgx2s() deprojects Cartesian coordinates in the plane of a stereographic (STG) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ stgs2x()

int stgs2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the stereographic (STG) projection.

stgs2x() projects native spherical coordinates to Cartesian coordinates in the plane of a stereographic (STG) projection.

See prjs2x() for a description of the API.

## ◆ sinset()

int sinset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the orthographic/synthesis (SIN) projection.

stgset() sets up a prjprm struct for an orthographic/synthesis (SIN) projection.

See prjset() for a description of the API.

## ◆ sinx2s()

int sinx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the orthographic/synthesis (SIN) projection.

sinx2s() deprojects Cartesian coordinates in the plane of an orthographic/synthesis (SIN) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ sins2x()

int sins2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the orthographic/synthesis (SIN) projection.

sins2x() projects native spherical coordinates to Cartesian coordinates in the plane of an orthographic/synthesis (SIN) projection.

See prjs2x() for a description of the API.

## ◆ arcset()

int arcset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the zenithal/azimuthal equidistant (ARC) projection.

arcset() sets up a prjprm struct for a zenithal/azimuthal equidistant (ARC) projection.

See prjset() for a description of the API.

## ◆ arcx2s()

int arcx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the zenithal/azimuthal equidistant (ARC) projection.

arcx2s() deprojects Cartesian coordinates in the plane of a zenithal/azimuthal equidistant (ARC) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ arcs2x()

int arcs2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the zenithal/azimuthal equidistant (ARC) projection.

arcs2x() projects native spherical coordinates to Cartesian coordinates in the plane of a zenithal/azimuthal equidistant (ARC) projection.

See prjs2x() for a description of the API.

## ◆ zpnset()

int zpnset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the zenithal/azimuthal polynomial (ZPN) projection.

zpnset() sets up a prjprm struct for a zenithal/azimuthal polynomial (ZPN) projection.

See prjset() for a description of the API.

## ◆ zpnx2s()

int zpnx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the zenithal/azimuthal polynomial (ZPN) projection.

zpnx2s() deprojects Cartesian coordinates in the plane of a zenithal/azimuthal polynomial (ZPN) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ zpns2x()

int zpns2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the zenithal/azimuthal polynomial (ZPN) projection.

zpns2x() projects native spherical coordinates to Cartesian coordinates in the plane of a zenithal/azimuthal polynomial (ZPN) projection.

See prjs2x() for a description of the API.

## ◆ zeaset()

int zeaset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the zenithal/azimuthal equal area (ZEA) projection.

zeaset() sets up a prjprm struct for a zenithal/azimuthal equal area (ZEA) projection.

See prjset() for a description of the API.

## ◆ zeax2s()

int zeax2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the zenithal/azimuthal equal area (ZEA) projection.

zeax2s() deprojects Cartesian coordinates in the plane of a zenithal/azimuthal equal area (ZEA) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ zeas2x()

int zeas2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the zenithal/azimuthal equal area (ZEA) projection.

zeas2x() projects native spherical coordinates to Cartesian coordinates in the plane of a zenithal/azimuthal equal area (ZEA) projection.

See prjs2x() for a description of the API.

## ◆ airset()

int airset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for Airy's (AIR) projection.

airset() sets up a prjprm struct for an Airy (AIR) projection.

See prjset() for a description of the API.

## ◆ airx2s()

int airx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for Airy's (AIR) projection.

airx2s() deprojects Cartesian coordinates in the plane of an Airy (AIR) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ airs2x()

int airs2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for Airy's (AIR) projection.

airs2x() projects native spherical coordinates to Cartesian coordinates in the plane of an Airy (AIR) projection.

See prjs2x() for a description of the API.

## ◆ cypset()

int cypset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the cylindrical perspective (CYP) projection.

cypset() sets up a prjprm struct for a cylindrical perspective (CYP) projection.

See prjset() for a description of the API.

## ◆ cypx2s()

int cypx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the cylindrical perspective (CYP) projection.

cypx2s() deprojects Cartesian coordinates in the plane of a cylindrical perspective (CYP) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ cyps2x()

int cyps2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the cylindrical perspective (CYP) projection.

cyps2x() projects native spherical coordinates to Cartesian coordinates in the plane of a cylindrical perspective (CYP) projection.

See prjs2x() for a description of the API.

## ◆ ceaset()

int ceaset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the cylindrical equal area (CEA) projection.

ceaset() sets up a prjprm struct for a cylindrical equal area (CEA) projection.

See prjset() for a description of the API.

## ◆ ceax2s()

int ceax2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the cylindrical equal area (CEA) projection.

ceax2s() deprojects Cartesian coordinates in the plane of a cylindrical equal area (CEA) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ ceas2x()

int ceas2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the cylindrical equal area (CEA) projection.

ceas2x() projects native spherical coordinates to Cartesian coordinates in the plane of a cylindrical equal area (CEA) projection.

See prjs2x() for a description of the API.

## ◆ carset()

int carset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the plate carrée (CAR) projection.

carset() sets up a prjprm struct for a plate carrée (CAR) projection.

See prjset() for a description of the API.

## ◆ carx2s()

int carx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the plate carrée (CAR) projection.

carx2s() deprojects Cartesian coordinates in the plane of a plate carrée (CAR) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ cars2x()

int cars2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the plate carrée (CAR) projection.

cars2x() projects native spherical coordinates to Cartesian coordinates in the plane of a plate carrée (CAR) projection.

See prjs2x() for a description of the API.

## ◆ merset()

int merset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for Mercator's (MER) projection.

merset() sets up a prjprm struct for a Mercator (MER) projection.

See prjset() for a description of the API.

## ◆ merx2s()

int merx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for Mercator's (MER) projection.

merx2s() deprojects Cartesian coordinates in the plane of a Mercator (MER) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ mers2x()

int mers2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for Mercator's (MER) projection.

mers2x() projects native spherical coordinates to Cartesian coordinates in the plane of a Mercator (MER) projection.

See prjs2x() for a description of the API.

## ◆ sflset()

int sflset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the Sanson-Flamsteed (SFL) projection.

sflset() sets up a prjprm struct for a Sanson-Flamsteed (SFL) projection.

See prjset() for a description of the API.

## ◆ sflx2s()

int sflx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the Sanson-Flamsteed (SFL) projection.

sflx2s() deprojects Cartesian coordinates in the plane of a Sanson-Flamsteed (SFL) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ sfls2x()

int sfls2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the Sanson-Flamsteed (SFL) projection.

sfls2x() projects native spherical coordinates to Cartesian coordinates in the plane of a Sanson-Flamsteed (SFL) projection.

See prjs2x() for a description of the API.

## ◆ parset()

int parset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the parabolic (PAR) projection.

parset() sets up a prjprm struct for a parabolic (PAR) projection.

See prjset() for a description of the API.

## ◆ parx2s()

int parx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the parabolic (PAR) projection.

parx2s() deprojects Cartesian coordinates in the plane of a parabolic (PAR) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ pars2x()

int pars2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the parabolic (PAR) projection.

pars2x() projects native spherical coordinates to Cartesian coordinates in the plane of a parabolic (PAR) projection.

See prjs2x() for a description of the API.

## ◆ molset()

int molset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for Mollweide's (MOL) projection.

molset() sets up a prjprm struct for a Mollweide (MOL) projection.

See prjset() for a description of the API.

## ◆ molx2s()

int molx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for Mollweide's (MOL) projection.

molx2s() deprojects Cartesian coordinates in the plane of a Mollweide (MOL) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ mols2x()

int mols2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for Mollweide's (MOL) projection.

mols2x() projects native spherical coordinates to Cartesian coordinates in the plane of a Mollweide (MOL) projection.

See prjs2x() for a description of the API.

## ◆ aitset()

int aitset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the Hammer-Aitoff (AIT) projection.

aitset() sets up a prjprm struct for a Hammer-Aitoff (AIT) projection.

See prjset() for a description of the API.

## ◆ aitx2s()

int aitx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the Hammer-Aitoff (AIT) projection.

aitx2s() deprojects Cartesian coordinates in the plane of a Hammer-Aitoff (AIT) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ aits2x()

int aits2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the Hammer-Aitoff (AIT) projection.

aits2x() projects native spherical coordinates to Cartesian coordinates in the plane of a Hammer-Aitoff (AIT) projection.

See prjs2x() for a description of the API.

## ◆ copset()

int copset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the conic perspective (COP) projection.

copset() sets up a prjprm struct for a conic perspective (COP) projection.

See prjset() for a description of the API.

## ◆ copx2s()

int copx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the conic perspective (COP) projection.

copx2s() deprojects Cartesian coordinates in the plane of a conic perspective (COP) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ cops2x()

int cops2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the conic perspective (COP) projection.

cops2x() projects native spherical coordinates to Cartesian coordinates in the plane of a conic perspective (COP) projection.

See prjs2x() for a description of the API.

## ◆ coeset()

int coeset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the conic equal area (COE) projection.

coeset() sets up a prjprm struct for a conic equal area (COE) projection.

See prjset() for a description of the API.

## ◆ coex2s()

int coex2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the conic equal area (COE) projection.

coex2s() deprojects Cartesian coordinates in the plane of a conic equal area (COE) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ coes2x()

int coes2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the conic equal area (COE) projection.

coes2x() projects native spherical coordinates to Cartesian coordinates in the plane of a conic equal area (COE) projection.

See prjs2x() for a description of the API.

## ◆ codset()

int codset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the conic equidistant (COD) projection.

codset() sets up a prjprm struct for a conic equidistant (COD) projection.

See prjset() for a description of the API.

## ◆ codx2s()

int codx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the conic equidistant (COD) projection.

codx2s() deprojects Cartesian coordinates in the plane of a conic equidistant (COD) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ cods2x()

int cods2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the conic equidistant (COD) projection.

cods2x() projects native spherical coordinates to Cartesian coordinates in the plane of a conic equidistant (COD) projection.

See prjs2x() for a description of the API.

## ◆ cooset()

int cooset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the conic orthomorphic (COO) projection.

cooset() sets up a prjprm struct for a conic orthomorphic (COO) projection.

See prjset() for a description of the API.

## ◆ coox2s()

int coox2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the conic orthomorphic (COO) projection.

coox2s() deprojects Cartesian coordinates in the plane of a conic orthomorphic (COO) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ coos2x()

int coos2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the conic orthomorphic (COO) projection.

coos2x() projects native spherical coordinates to Cartesian coordinates in the plane of a conic orthomorphic (COO) projection.

See prjs2x() for a description of the API.

## ◆ bonset()

int bonset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for Bonne's (BON) projection.

bonset() sets up a prjprm struct for a Bonne (BON) projection.

See prjset() for a description of the API.

## ◆ bonx2s()

int bonx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for Bonne's (BON) projection.

bonx2s() deprojects Cartesian coordinates in the plane of a Bonne (BON) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ bons2x()

int bons2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for Bonne's (BON) projection.

bons2x() projects native spherical coordinates to Cartesian coordinates in the plane of a Bonne (BON) projection.

See prjs2x() for a description of the API.

## ◆ pcoset()

int pcoset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the polyconic (PCO) projection.

pcoset() sets up a prjprm struct for a polyconic (PCO) projection.

See prjset() for a description of the API.

## ◆ pcox2s()

int pcox2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the polyconic (PCO) projection.

pcox2s() deprojects Cartesian coordinates in the plane of a polyconic (PCO) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ pcos2x()

int pcos2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the polyconic (PCO) projection.

pcos2x() projects native spherical coordinates to Cartesian coordinates in the plane of a polyconic (PCO) projection.

See prjs2x() for a description of the API.

## ◆ tscset()

int tscset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the tangential spherical cube (TSC) projection.

tscset() sets up a prjprm struct for a tangential spherical cube (TSC) projection.

See prjset() for a description of the API.

## ◆ tscx2s()

int tscx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the tangential spherical cube (TSC) projection.

tscx2s() deprojects Cartesian coordinates in the plane of a tangential spherical cube (TSC) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ tscs2x()

int tscs2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the tangential spherical cube (TSC) projection.

tscs2x() projects native spherical coordinates to Cartesian coordinates in the plane of a tangential spherical cube (TSC) projection.

See prjs2x() for a description of the API.

## ◆ cscset()

int cscset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the COBE spherical cube (CSC) projection.

cscset() sets up a prjprm struct for a COBE spherical cube (CSC) projection.

See prjset() for a description of the API.

## ◆ cscx2s()

int cscx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the COBE spherical cube (CSC) projection.

cscx2s() deprojects Cartesian coordinates in the plane of a COBE spherical cube (CSC) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ cscs2x()

int cscs2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the COBE spherical cube (CSC) projection.

cscs2x() projects native spherical coordinates to Cartesian coordinates in the plane of a COBE spherical cube (CSC) projection.

See prjs2x() for a description of the API.

## ◆ qscset()

int qscset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the quadrilateralized spherical cube (QSC) projection.

qscset() sets up a prjprm struct for a quadrilateralized spherical cube (QSC) projection.

See prjset() for a description of the API.

## ◆ qscx2s()

int qscx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the quadrilateralized spherical cube (QSC) projection.

qscx2s() deprojects Cartesian coordinates in the plane of a quadrilateralized spherical cube (QSC) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ qscs2x()

int qscs2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the quadrilateralized spherical cube (QSC) projection.

qscs2x() projects native spherical coordinates to Cartesian coordinates in the plane of a quadrilateralized spherical cube (QSC) projection.

See prjs2x() for a description of the API.

## ◆ hpxset()

int hpxset | ( | struct prjprm * | prj | ) |

Set up a prjprm struct for the HEALPix (HPX) projection.

hpxset() sets up a prjprm struct for a HEALPix (HPX) projection.

See prjset() for a description of the API.

## ◆ hpxx2s()

int hpxx2s | ( | PRJX2S_ARGS |  | ) |

Cartesian-to-spherical transformation for the HEALPix (HPX) projection.

hpxx2s() deprojects Cartesian coordinates in the plane of a HEALPix (HPX) projection to native spherical coordinates .

See prjx2s() for a description of the API.

## ◆ hpxs2x()

int hpxs2x | ( | PRJS2X_ARGS |  | ) |

Spherical-to-Cartesian transformation for the HEALPix (HPX) projection.

hpxs2x() projects native spherical coordinates to Cartesian coordinates in the plane of a HEALPix (HPX) projection.

See prjs2x() for a description of the API.

## ◆ xphset()

int xphset | ( | struct prjprm * | prj | ) |

## ◆ xphx2s()

int xphx2s | ( | PRJX2S_ARGS |  | ) |

## ◆ xphs2x()

int xphs2x | ( | PRJS2X_ARGS |  | ) |

## Variable Documentation

## ◆ prj_errmsg

const char* prj_errmsg[]
| extern

Status return messages.

Error messages to match the status value returned from each function.

## ◆ CONIC

const int CONIC
| extern

Identifier for conic projections.

Identifier for conic projections, see prjprm::category.

## ◆ CONVENTIONAL

const int CONVENTIONAL

Identifier for conventional projections.

Identifier for conventional projections, see prjprm::category.

## ◆ CYLINDRICAL

const int CYLINDRICAL

Identifier for cylindrical projections.

Identifier for cylindrical projections, see prjprm::category.

## ◆ POLYCONIC

const int POLYCONIC

Identifier for polyconic projections.

Identifier for polyconic projections, see prjprm::category.

## ◆ PSEUDOCYLINDRICAL

const int PSEUDOCYLINDRICAL

Identifier for pseudocylindrical projections.

Identifier for pseudocylindrical projections, see prjprm::category.

## ◆ QUADCUBE

const int QUADCUBE

Identifier for quadcube projections.

Identifier for quadcube projections, see prjprm::category.

## ◆ ZENITHAL

const int ZENITHAL

Identifier for zenithal/azimuthal projections.

Identifier for zenithal/azimuthal projections, see prjprm::category.

## ◆ HEALPIX

const int HEALPIX

Identifier for the HEALPix projection.

Identifier for the HEALPix projection, see prjprm::category.

## ◆ prj_categories

const char prj_categories[9][32]
| extern

Projection categories.

Names of the projection categories, all in lower-case except for "HEALPix".

Provided for information only, not used by the projection routines.

## ◆ prj_ncode

const int prj_ncode
| extern

The number of recognized three-letter projection codes.

The number of recognized three-letter projection codes (currently 27), see prj_codes.

## ◆ prj_codes

const char prj_codes[28][4]
| extern

Recognized three-letter projection codes.

List of all recognized three-letter projection codes (currently 27), e.g. SIN, TAN, etc.