|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcds.astro.Proj3
public class Proj3
Class defining the Mathematical Projections of the Celestial Sphere. This class contains only the mathematical projections --- WCS and Aladin projections are in a derived class.
The available projections are defined by the formulae, where
l,b = longitude and latitude theta = angle to center of projection x,y = projections (cartesian) along x (East) and y (North) r,phi = projections (polar) TAN / Standard = Gnomonic r = tan(theta) phi TAN2 / Stereographic r = 2.tan(theta/2) phi SIN / Orthographic r = sin(theta) phi SIN2 / Equal-area r = 2.sin(theta/2) phi ARC / Schmidt proj. r = theta phi AITOFF / Aitoff (equal area) if D = sqrt(0.5*(1+cos(b)cos(l/2))) x = 2cos(b)sin(l/2)/D y = sin(b)/D SANSON / Global Sinusoidal (equal area) x = l cos(b) y = b MERCATOR / with poles at infinity x = l y = atanh(b) LAMBERT / equal area projection x = l y = sin(b)
The typical usage of the Proj3 class consists in:
Field Summary | |
---|---|
static int |
AITOFF
|
static int |
ARC
|
static int |
LAMBERT
|
static int |
MERCATOR
|
static java.lang.String[] |
name
|
static int |
NONE
|
static int |
SANSON
|
static int |
SIN
|
static int |
SIN2
|
static int |
TAN
|
static int |
TAN2
|
Constructor Summary | |
---|---|
Proj3(double lon,
double lat)
Standard projection. |
|
Proj3(int type)
Projection at the Origin. |
|
Proj3(int type,
double lon,
double lat)
Creation of object used for Projections. |
|
Proj3(int type,
java.lang.String text)
Creation of object used for Projections from a String. |
Method Summary | |
---|---|
boolean |
computeAngles(double px,
double py)
Reverse projection: compute the polar angle corresponding to (x,y) Rem : the rotation matrix was computed at Constructor a la creation de l'objet |
boolean |
computeXY(double lon,
double lat)
Compute a projection from initial coordinates. |
double |
getLat()
Get only the Y from the object |
double |
getLon()
Get only the longitude from the object |
double |
getX()
Get only the X from the object |
double |
getY()
Get only the Y from the object |
java.lang.String |
toString()
Returns a definition of this projection |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NONE
public static final int TAN
public static final int TAN2
public static final int SIN
public static final int SIN2
public static final int ARC
public static final int AITOFF
public static final int SANSON
public static final int MERCATOR
public static final int LAMBERT
public static final java.lang.String[] name
Constructor Detail |
---|
public Proj3(int type, double lon, double lat)
type
- projection type -- default (standard) = TANlon
- longitude of the center of projection (coordinates of the tangent point)
expressed in degrees.lat
- latitude of the center of projection (coordinates of the tangent point)
expressed in degrees.public Proj3(int type, java.lang.String text) throws java.text.ParseException
type
- projection typetext
- the center in a string
java.text.ParseException
public Proj3(int type)
type
- projection typepublic Proj3(double lon, double lat)
lon
- longitude of the center of projection.
(coordinates of the tangent point)lat
- latitude of the center of projection.
(coordinates of the tangent point)Method Detail |
---|
public final double getX()
public final double getY()
public final double getLon()
public final double getLat()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean computeXY(double lon, double lat)
lon
- longitudelat
- latitude
public boolean computeAngles(double px, double py)
px
- x projection valuespy
- y projection values
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |