Package skyview.geometry

# Class Projection

java.lang.Object
skyview.geometry.Projection

public class Projection extends Object
This class implements projection algorithms to/from a projection plane and the unit sphere. Data on the unit sphere is normally represented as a unit-three vector. Data in a projection plane is normally represented as a two-ple. Note that the projection is usually broken into two pieces: a transformation to a convenient location on the celestial sphere (e.g., for a TAN projection, the unit vectors are rotated so that the reference pixel is at the pole), and a functional transformation from the sphere to the plane. The project and deproject functions address this later element, while the rotation needed is encoded in in the eulerRotationMatrix.

## Constructor Summary

Constructors
Constructor
Description
`Projection(String type)`
Get the correct projection
`Projection(String type, double[] reference)`
Create the specified projection.

## Method Summary

Modifier and Type
Method
Description
`static double[]`
`fixedPoint(String proj)`
This static method returns the location of the default projection center for fixed point projections.
`Distorter`
`getDistorter()`
Get any distortion in the plane associated with this projection.
`Projecter`
`getProjecter()`
Get the projection algorithm associated with this rotation.
`double[]`
`getReferencePoint()`
Get the current reference position
`Rotater`
`getRotater()`
Get the rotation that needs to be performed before the rotation.
`boolean`
`isFixedProjection()`
Is this a fixed point projection?
`void`
`setDistorter(Distorter dist)`
`void`
`setReference(double lon, double lat)`
`void`
`setRotater(Rotater rot)`
Update the Rotater...
`protected double[]`
`specialReference()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Projection

public Projection(String type) throws TransformationException
Get the correct projection

Throws:
  `TransformationException`

### Projection

public Projection(String type, double[] reference) throws TransformationException
Create the specified projection.

Parameters:
  `type` - The three character string defining the projection.
  `reference` - The reference point for the projection (as a coordinate pair)
Throws:
  `TransformationException` - when the requested projection cannot be found or does not have an appropriate constructor.

## Method Details

### setReference

public void setReference(double lon, double lat)

### fixedPoint

public static double[] fixedPoint(String proj)
This static method returns the location of the default projection center for fixed point projections. It returns a null if the projection is not normally used as a fixed point projection where the projection is expanded around some fixed point on the sphere regardless of the location of the image data.

Parameters:
  `proj` - The three letter string denoting the projection.
Returns:
  The fixed point for the projection or null if not a fixed point projection.

### getRotater

public Rotater getRotater()
Get the rotation that needs to be performed before the rotation.

### setRotater

public void setRotater(Rotater rot)
Update the Rotater...

### getProjecter

public Projecter getProjecter()
Get the projection algorithm associated with this rotation.

### getDistorter

public Distorter getDistorter()
Get any distortion in the plane associated with this projection.

### setDistorter

public void setDistorter(Distorter dist)

### specialReference

protected double[] specialReference()

### isFixedProjection

public boolean isFixedProjection()
Is this a fixed point projection?

### getReferencePoint

public double[] getReferencePoint()
Get the current reference position