Package skyview.geometry
Class Projection
java.lang.Object
skyview.geometry.Projection
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
ConstructorsConstructorDescriptionProjection
(String type) Get the correct projectionProjection
(String type, double[] reference) Create the specified projection. -
Method Summary
Modifier and TypeMethodDescriptionstatic double[]
fixedPoint
(String proj) This static method returns the location of the default projection center for fixed point projections.Get any distortion in the plane associated with this projection.Get the projection algorithm associated with this rotation.double[]
Get the current reference positionGet the rotation that needs to be performed before the rotation.boolean
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[]
-
Constructor Details
-
Projection
Get the correct projection- Throws:
TransformationException
-
Projection
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
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
Get the rotation that needs to be performed before the rotation. -
setRotater
Update the Rotater... -
getProjecter
Get the projection algorithm associated with this rotation. -
getDistorter
Get any distortion in the plane associated with this projection. -
setDistorter
-
specialReference
protected double[] specialReference() -
isFixedProjection
public boolean isFixedProjection()Is this a fixed point projection? -
getReferencePoint
public double[] getReferencePoint()Get the current reference position
-