casa::DS9Coordinate Class Reference

Class to represent a single coordinate (value + unit). More...

#include <DS9FileReader.h>

List of all members.

Public Member Functions

 DS9Coordinate (DS9::CoordinateSystem s, DS9::CoordinateUnit u=DS9::UNSET)
 Constructor which takes a system and a unit.
 ~DS9Coordinate ()
 Destructor.
void set (DS9::CoordinateSystem system)
 Sets the coordinate system to the given.
void set (DS9::CoordinateUnit unit)
 Sets the coordinate unit to the given.
void set (double value)
 Sets the single value to the given.
void set (double val1, double val2, double val3, bool minusZero=false)
 Sets the HMS/DMS value to the given.
DS9::CoordinateSystem system () const
 Returns the coordinate system.
DS9::CoordinateUnit unit () const
 Returns the unit.
double value () const
 Returns the first value.
vector< double > values () const
 Returns the value(s).
unsigned int size () const
 Returns 1 for normal coordinates or 3 for HMS/DMS.
bool isValid () const
 Returns true if this coordinate is valid, false otherwise.
String toPrintString () const
 Returns a String version for use with DS9Region::toPrintString.
double toDegrees () const
 Returns the value in degrees.

Private Attributes

DS9::CoordinateSystem m_system
DS9::CoordinateUnit m_unit
vector< double > m_values
bool m_minusZero

Detailed Description

Class to represent a single coordinate (value + unit).

Definition at line 304 of file DS9FileReader.h.


Constructor & Destructor Documentation

casa::DS9Coordinate::DS9Coordinate ( DS9::CoordinateSystem  s,
DS9::CoordinateUnit  u = DS9::UNSET 
)

Constructor which takes a system and a unit.

casa::DS9Coordinate::~DS9Coordinate (  ) 

Destructor.


Member Function Documentation

bool casa::DS9Coordinate::isValid (  )  const

Returns true if this coordinate is valid, false otherwise.

If the coordinate is invalid (such as an unset unit), the method will attempt to fix it.

void casa::DS9Coordinate::set ( double  val1,
double  val2,
double  val3,
bool  minusZero = false 
)

Sets the HMS/DMS value to the given.

minusZero is used when the first value is zero, but the whole value is negative.

void casa::DS9Coordinate::set ( double  value  ) 

Sets the single value to the given.

void casa::DS9Coordinate::set ( DS9::CoordinateUnit  unit  ) 

Sets the coordinate unit to the given.

void casa::DS9Coordinate::set ( DS9::CoordinateSystem  system  ) 

Sets the coordinate system to the given.

unsigned int casa::DS9Coordinate::size (  )  const

Returns 1 for normal coordinates or 3 for HMS/DMS.

DS9::CoordinateSystem casa::DS9Coordinate::system (  )  const

Returns the coordinate system.

double casa::DS9Coordinate::toDegrees (  )  const

Returns the value in degrees.

String casa::DS9Coordinate::toPrintString (  )  const

Returns a String version for use with DS9Region::toPrintString.

DS9::CoordinateUnit casa::DS9Coordinate::unit (  )  const

Returns the unit.

double casa::DS9Coordinate::value (  )  const

Returns the first value.

No conversion is used.

vector<double> casa::DS9Coordinate::values (  )  const

Returns the value(s).

Size will be 1 for normal coordinates, 3 for HMS/DMS. No conversion is used.


Member Data Documentation

Definition at line 357 of file DS9FileReader.h.

Definition at line 354 of file DS9FileReader.h.

Definition at line 355 of file DS9FileReader.h.

vector<double> casa::DS9Coordinate::m_values [private]

Definition at line 356 of file DS9FileReader.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1