|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsky.coords.ImageCoords
public class ImageCoords
Class representing world coordinates (right-ascension, ylination, stored as J2000 internally).
Field Summary | |
---|---|
protected double |
x
The X coordinate |
protected double |
y
The Y coordinate |
Constructor Summary | |
---|---|
ImageCoords()
Default constructor: initialize null coordinates. |
|
ImageCoords(double x,
double y)
Initialize from x and y. |
|
ImageCoords(java.lang.Double x,
java.lang.Double y)
Initialize from x and y. |
|
ImageCoords(java.lang.String x,
java.lang.String y)
|
Method Summary | |
---|---|
ImageCoords[] |
box(double radius)
Given a radius, return an array {pos1, pos2} with the 2 endpoints that form a box with center at "this" position. |
double[] |
center(ImageCoords pos1,
ImageCoords pos2)
Given the endpoints of a box (pos1, pos2), return an array containing the center pos, as well as the width, height, and radius of the box. |
double |
dist(Coordinates pos)
Return the distance between this position and the given one. |
static double |
dist(double x0,
double y0,
double x1,
double y1)
Return the distance between the two points. |
double |
dist(ImageCoords pos)
Return the distance between this position and the given one. |
java.lang.String |
getCoordinateSystemName()
Returns the name of the coordinate system as a string. |
double |
getX()
return the X value |
double |
getY()
return the Y value |
static void |
main(java.lang.String[] args)
Test cases |
java.lang.String |
toString()
Return the coordinates as a string in h:m:s [+-]d:m:s format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected double x
protected double y
Constructor Detail |
---|
public ImageCoords()
public ImageCoords(double x, double y)
x
- The X coordinatey
- The Y coordinatepublic ImageCoords(java.lang.Double x, java.lang.Double y)
x
- The X coordinatey
- The Y coordinatepublic ImageCoords(java.lang.String x, java.lang.String y)
Method Detail |
---|
public double getX()
getX
in interface Coordinates
public double getY()
getY
in interface Coordinates
public java.lang.String toString()
toString
in interface Coordinates
toString
in class java.lang.Object
public static double dist(double x0, double y0, double x1, double y1)
x0
- The X coordinate of the first pointy0
- The Y coordinate of the first pointx1
- The X coordinate of the second pointy1
- The Y coordinate of the second point
public double dist(ImageCoords pos)
pos
- The other point.
public double dist(Coordinates pos)
dist
in interface Coordinates
pos
- The other point.
public ImageCoords[] box(double radius)
radius
- The radius.
public double[] center(ImageCoords pos1, ImageCoords pos2)
pos1
- The first endpoint of the box.pos2
- The second endpoint of the box.
public java.lang.String getCoordinateSystemName()
getCoordinateSystemName
in interface Coordinates
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |