Projection.h
Classes
- Projection -- Geometric parameters needed for a sky projection to a plane (full description)
Types
- AZP
-
Zenithal/Azimuthal perspective.
- TAN
-
Gnomonic.
- SIN
-
Orthographics/synthesis.
- STG
-
Stereographic.
- ARC
-
zenith/azimuthal equidistant.
- ZPN
-
zenithal/azimuthal polynomial.
- ZEA
-
zenithal/azimuthal equal area.
- AIR
-
Airy.
- CYP
-
Cylindrical perspective.
- CAR
-
Cartesian.
- MER
-
Mercator.
- CEA
-
Cylindrical equal area.
- COP
-
Conic perspective.
- COD
-
Conic equidistant.
- COE
-
Conic equal area.
- COO
-
Conic orthomorphic.
- BON
-
Bonne.
- PCO
-
Polyconic.
- SFL
-
Sanson-Flamsteed (global sinusoidal).
The old GLS projection is now SFL. The 'GLS'
string will be converted to 'SFL'
- PAR
-
Parabolic.
- AIT
-
Hammer-Aitoff.
- MOL
-
Molweide.
- CSC
-
COBE quadrilateralized spherical cube.
- QSC
-
Quadrilateralized spherical cube.
- TSC
-
Tangential spherical cube.
- N_PROJ
-
N_PROJ gives the number of supported projections - it shouldn't be used
as a projection
Interface
- Public Members
- Projection(Projection::Type which=CAR)
- Projection(const String& ctypeLin, const String& ctypeLat, const Vector<Double>& parameters)
- Projection(Projection::Type which, const Vector<Double> ¶meters)
- Projection(const Projection &other)
- Projection &operator=(const Projection &other)
- ~Projection()
- Projection::Type type() const
- String name() const
- static String name(Projection::Type proj)
- static Projection::Type type(const String &name)
- static uInt nParameters(Projection::Type proj)
- const Vector<Double> ¶meters() const
- Bool near(const Projection &other, Double tol=1.0e-6) const
- static Bool isZenithal (Projection::Type proj)
- Private Members
- void validate()
- Projection::Type type (String& ctypeLong, String& ctypeLat) const
Review Status
- Reviewed By:
- Peter Barnes
- Date Reviewed:
- 1999/12/24
- Programs:
- Tests:
Prerequisite
- Knowledge of astronomical coordinate conversions in general. Probably the
best documents are the papers by Mark Calabretta and Eric Greisen.
The initial draft from 1996 can be found at
http://www.atnf.csiro.au/~mcalabre. It is this draft that the
Coordinate classes are based upon. Since then, this paper has evolved
into three which can be found at the above address, and will be published in the
Astronomy and Astrophysics Supplement Series (probably in 2000).
The design has changed since the initial draft. When these papers
are finalized, and the IAU has ratified the new standards, WCSLIB
(Mark Calabretta's implementation of these conventions) will be
revised for the new designs. At that time, the Coordinate classes
may also be revised.
Synopsis
This class is used to hold:
- The type of the projection (e.g. SIN); and
- The parameters of the projection, if any. These parameters are described
by Calabretta and Greisen (called PROJP) in the 1996 draft.
In the recent versions, this paper has split into three, and the
projection parameters have been reworked into the PV matrix.
However, these have not yet been implemented in WCSLIB so we
stick with the old ones for now.
Example
Projection proj(Projection::CAR);
cerr << proj.parameters() << endl;
This projection requires no parameters so the printed parameter
vector would be of zero length.
Thrown Exceptions
To Do
- Worry about projection parameters which are unit dependent (i.e.
radians vs. degrees).
- LONGPOLE should probably go in here.
Member Description
Hold all the known types of celestial projections.
Construct a projection which needs no parameters. SIN is unique in that
it can be created with 0 or 2 parameters.
Projection(const String& ctypeLin, const String& ctypeLat, const Vector<Double>& parameters)
Construct a projection from FITS CTYPE keywords
Projection(Projection::Type which, const Vector<Double> ¶meters)
Construct a projection which needs parameters. The parameter vector must be
the length of the required number of parameters.
Projection(const Projection &other)
Copy constructor (copy semantics).
Projection &operator=(const Projection &other)
Assignment (copy semantics)
Destructor
Projection::Type type() const
What is the Type of this projection?
What is the type of this projection as a String (e.g. "SIN").
static Projection::Type type(const String &name)
Turn a projection type name into a Type.
Returns N_PROJ if the projection is not known.
How many parameters does this projection have, and what are they?
Bool near(const Projection &other, Double tol=1.0e-6) const
Comparison to fractional tolerance.
static Bool isZenithal (Projection::Type proj)
Is this projection a 'zenithal' projection
Projection::Type type (String& ctypeLong, String& ctypeLat) const