# MI - Fimex: MetNoFimex::CoordinateSystem Class Reference

# MetNoFimex::CoordinateSystem Class Reference

`#include <fimex/coordSys/CoordinateSystem.h>`

List of all members.

## Public Types

typedef boost::shared_ptr < const CoordinateAxis > | ConstAxisPtr
typedef boost::shared_ptr < CoordinateAxis > | AxisPtr
typedef std::vector< ConstAxisPtr > | ConstAxisList

## Public Member Functions

| CoordinateSystem ()
| CoordinateSystem (const std::string &conventionName)
virtual | ~CoordinateSystem ()
virtual std::string | id () const
virtual std::string | getConventionName () const
virtual void | setConventionName (const std::string &conventionName)
virtual bool | isComplete (const std::string &varName) const
virtual void | setComplete (const std::string &varName, bool set=true)
virtual bool | isCSFor (const std::string &varName) const
virtual void | setCSFor (const std::string &varName, bool set=true)
virtual bool | isSimpleSpatialGridded () const
virtual void | setSimpleSpatialGridded (bool set=true)
virtual bool | hasProjection () const
virtual boost::shared_ptr < const Projection > | getProjection () const
virtual void | setProjection (boost::shared_ptr< const Projection > proj)
virtual bool | hasAxisType (CoordinateAxis::AxisType type) const
virtual ConstAxisPtr | findAxisOfType (CoordinateAxis::AxisType type) const
virtual ConstAxisPtr | findAxisOfType (const std::vector< CoordinateAxis::AxisType > &types) const
virtual ConstAxisPtr | getGeoXAxis () const
virtual ConstAxisPtr | getGeoYAxis () const
virtual ConstAxisPtr | getGeoZAxis () const
virtual ConstAxisPtr | getTimeAxis () const
virtual ConstAxisList | getAxes () const
virtual void | setAxis (AxisPtr axis)

## Detailed Description

CoordinateSystems are usually created using the listCoordinateSystems(const CDM& cdm) function, see example there.

To investigate the coordinate systems of a file, use {fimex --printCS}.

## Member Typedef Documentation

typedef boost::shared_ptr<const CoordinateAxis> MetNoFimex::CoordinateSystem::ConstAxisPtr

a garbage collected pointer to a constant coordinateAxis

typedef boost::shared_ptr<CoordinateAxis> MetNoFimex::CoordinateSystem::AxisPtr

a garbage collected pointer to a CoordinateAxis

typedef std::vector<ConstAxisPtr> MetNoFimex::CoordinateSystem::ConstAxisList

a list to constant axis pointer

## Constructor & Destructor Documentation

MetNoFimex::CoordinateSystem::CoordinateSystem | ( |  | ) |

CoordinateSystems are usually created within the listCoordinateSystems(const CDM& cdm) funcion.

MetNoFimex::CoordinateSystem::CoordinateSystem | ( | const std::string & | conventionName | ) | `[explicit]`

virtual MetNoFimex::CoordinateSystem::~CoordinateSystem | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

virtual std::string MetNoFimex::CoordinateSystem::id | ( |  | ) | const`[virtual]`

unique identifier for a coordinate system

virtual std::string MetNoFimex::CoordinateSystem::getConventionName | ( |  | ) | const`[virtual]`

Returns:
  the name of convention used to build the CS

virtual void MetNoFimex::CoordinateSystem::setConventionName | ( | const std::string & | conventionName | ) | `[virtual]`

set the convention name

Parameters:

  | conventionName |

virtual bool MetNoFimex::CoordinateSystem::isComplete | ( | const std::string & | varName | ) | const`[virtual]`

All axes of this system are used by the variable varName

Parameters:

  | varName | variable name

virtual void MetNoFimex::CoordinateSystem::setComplete | ( | const std::string & | varName,
|  | bool | set = `true` |
| ) |  |  | `[virtual]`

set or unset if the coordinate system is complete for the variable

virtual bool MetNoFimex::CoordinateSystem::isCSFor | ( | const std::string & | varName | ) | const`[virtual]`

All dimensions of the variable are described by CoordinateSystem

Parameters:

  | varName | variable name

virtual void MetNoFimex::CoordinateSystem::setCSFor | ( | const std::string & | varName,
|  | bool | set = `true` |
| ) |  |  | `[virtual]`

Set or unset if all dimensions are described by the CoordinateSystem

virtual bool MetNoFimex::CoordinateSystem::isSimpleSpatialGridded | ( |  | ) | const`[virtual]`

Check if coordinate system has direct spatial axes, i.e. 1-dim x,y axes or 1-dim lon,lat axes

virtual void MetNoFimex::CoordinateSystem::setSimpleSpatialGridded | ( | bool | set = `true` | ) | `[virtual]`

Set or unset if this coordinate system has spatial axes, i.e. 1-dim x,y or lon/lat axes

virtual bool MetNoFimex::CoordinateSystem::hasProjection | ( |  | ) | const`[virtual]`

Check if the coordinate-system has a projection (of GeoX, GeoY and optionally GeoZ)

virtual boost::shared_ptr<const Projection> MetNoFimex::CoordinateSystem::getProjection | ( |  | ) | const`[virtual]`

Get the projection of the coordinate-system (projection of GeoX, GeoY and optionally GeoZ)

Returns:
  projection, or null ptr

virtual void MetNoFimex::CoordinateSystem::setProjection | ( | boost::shared_ptr< const Projection > | proj | ) | `[virtual]`

Set the projection of the coordinate-system (projection of GeoX, GeoY and optionally GeoZ)

virtual bool MetNoFimex::CoordinateSystem::hasAxisType | ( | CoordinateAxis::AxisType | type | ) | const`[virtual]`

Check if the CoordinateSystem contains exactly the axis type

Parameters:

  | type | axis type to check against

virtual ConstAxisPtr MetNoFimex::CoordinateSystem::findAxisOfType | ( | CoordinateAxis::AxisType | type | ) | const`[virtual]`

find the first axis with exactly the types

Parameters:

  | type |

Returns:
  an axis or null

virtual ConstAxisPtr MetNoFimex::CoordinateSystem::findAxisOfType | ( | const std::vector< CoordinateAxis::AxisType > & | types | ) | const`[virtual]`

find the first axis with one of the types

Parameters:

  | types | list of types

Returns:
  an axis or null

virtual ConstAxisPtr MetNoFimex::CoordinateSystem::getGeoXAxis | ( |  | ) | const`[virtual]`

get the geographical x/lon-axis, that is one of GeoX, Longitude (in that order if several exist)

Returns:
  an axis or null

virtual ConstAxisPtr MetNoFimex::CoordinateSystem::getGeoYAxis | ( |  | ) | const`[virtual]`

Set/overwrite the geographic y axis, that is one of GeoY, Latitude (in that order if several exist)

Returns:
  an axis or null

virtual ConstAxisPtr MetNoFimex::CoordinateSystem::getGeoZAxis | ( |  | ) | const`[virtual]`

get the geographical z-axis, that is one of GeoZ, Height, Pressure (in that order if several exist)

Returns:
  an axis, or null

virtual ConstAxisPtr MetNoFimex::CoordinateSystem::getTimeAxis | ( |  | ) | const`[virtual]`

get the time-axis, or NULL/0

virtual ConstAxisList MetNoFimex::CoordinateSystem::getAxes | ( |  | ) | const`[virtual]`

get all axes

virtual void MetNoFimex::CoordinateSystem::setAxis | ( | AxisPtr | axis | ) | `[virtual]`

Set any axis.

Exceptions:

  | CDMException | if an axis with the same axistype (except undefined) exists

The documentation for this class was generated from the following file:

- include/fimex/coordSys/CoordinateSystem.h