jsky.catalog
Class RowCoordinates

java.lang.Object
  extended by jsky.catalog.RowCoordinates

public class RowCoordinates
extends java.lang.Object

Stores information about which columns in a table contain the coordinates for that row, and whether world coordinates or image coordinates are supported. In addition, the index of the id column may be stored here, if known.


Field Summary
protected  double equinox
          Value of the equinox for world coordinates, if it is known
protected  int equinoxCol
          Index of a column containing the equnox for each row, or -1 if it is constant.
protected  int idCol
          The column containing the object id, or -1 if there isn't one
protected  boolean isPix
          True if using image coordinates
protected  boolean isWcs
          True if the table has RA and DEC coordinate columns
protected  int xCol
          The column index for the X or RA coordinate
protected  int yCol
          The column index for the Y or DEC coordinate
 
Constructor Summary
RowCoordinates()
          This constructor should be used when there are no coordinate columns.
RowCoordinates(int xCol, int yCol)
          Create an object that will extract an ImageCoords object from a row using the given x,y indexes.
RowCoordinates(int raCol, int decCol, double equinox)
          Create an object that will extract a WorldCoords object from a row using the given ra,dec indexes and the given equinox.
RowCoordinates(int raCol, int decCol, int equinoxCol)
          Create an object that will extract a WorldCoords object from a row using the given ra,dec and equinox indexes.
 
Method Summary
 double equinox()
          Return the equinox used for world coordinates
 Coordinates getCoordinates(java.util.Vector row)
          Return a Coordinates object for the given row vector, or null if not found
 int getDecCol()
          Return the column index for the DEC coordinate, or -1 if not known.
 double getEquinox()
          Return the value of the equinox for world coordinates, if it is known (default: 2000).
 int getEquinoxCol()
          Return the Index of a column containing the equnox for each row, or -1 if it is constant.
 int getIdCol()
          Return the column containing the object id, or -1 if there isn't one.
 int getRaCol()
          Return the column index for the RA coordinate, or -1 if not known.
 int getXCol()
          Return the column index for the X coordinate, or -1 if not known.
 int getYCol()
          Return the column index for the Y coordinate, or -1 if not known.
 boolean hasCoordinates()
          Return true if coordinate columns, such as (ra, dec), were defined
 boolean isPix()
          Return true if the catalog has X and Y columns (assumed to be image pixel coordinates)
 boolean isWCS()
          Return true if the catalog has RA and DEC coordinate columns
 void setIdCol(int idCol)
          Set the column containing the object id (-1 if there isn't one).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

idCol

protected int idCol
The column containing the object id, or -1 if there isn't one


xCol

protected int xCol
The column index for the X or RA coordinate


yCol

protected int yCol
The column index for the Y or DEC coordinate


isWcs

protected boolean isWcs
True if the table has RA and DEC coordinate columns


equinox

protected double equinox
Value of the equinox for world coordinates, if it is known


equinoxCol

protected int equinoxCol
Index of a column containing the equnox for each row, or -1 if it is constant.


isPix

protected boolean isPix
True if using image coordinates

Constructor Detail

RowCoordinates

public RowCoordinates(int raCol,
                      int decCol,
                      double equinox)
Create an object that will extract a WorldCoords object from a row using the given ra,dec indexes and the given equinox.


RowCoordinates

public RowCoordinates(int raCol,
                      int decCol,
                      int equinoxCol)
Create an object that will extract a WorldCoords object from a row using the given ra,dec and equinox indexes.


RowCoordinates

public RowCoordinates(int xCol,
                      int yCol)
Create an object that will extract an ImageCoords object from a row using the given x,y indexes.


RowCoordinates

public RowCoordinates()
This constructor should be used when there are no coordinate columns.

Method Detail

hasCoordinates

public boolean hasCoordinates()
Return true if coordinate columns, such as (ra, dec), were defined


isWCS

public boolean isWCS()
Return true if the catalog has RA and DEC coordinate columns


equinox

public double equinox()
Return the equinox used for world coordinates


isPix

public boolean isPix()
Return true if the catalog has X and Y columns (assumed to be image pixel coordinates)


getCoordinates

public Coordinates getCoordinates(java.util.Vector row)
Return a Coordinates object for the given row vector, or null if not found


getXCol

public int getXCol()
Return the column index for the X coordinate, or -1 if not known.


getYCol

public int getYCol()
Return the column index for the Y coordinate, or -1 if not known.


getRaCol

public int getRaCol()
Return the column index for the RA coordinate, or -1 if not known.


getDecCol

public int getDecCol()
Return the column index for the DEC coordinate, or -1 if not known.


getEquinox

public double getEquinox()
Return the value of the equinox for world coordinates, if it is known (default: 2000).


getEquinoxCol

public int getEquinoxCol()
Return the Index of a column containing the equnox for each row, or -1 if it is constant.


getIdCol

public int getIdCol()
Return the column containing the object id, or -1 if there isn't one.


setIdCol

public void setIdCol(int idCol)
Set the column containing the object id (-1 if there isn't one).