MI - Fimex
Public Types | Public Member Functions | List of all members
MetNoFimex::CoordinateSystem Class Reference

#include <fimex/coordSys/CoordinateSystem.h>

Public Types

typedef boost::shared_ptr< const CoordinateAxisConstAxisPtr
 
typedef boost::shared_ptr< CoordinateAxisAxisPtr
 
typedef std::vector< ConstAxisPtrConstAxisList
 

Public Member Functions

 CoordinateSystem ()
 
 CoordinateSystem (const std::string &conventionName)
 
virtual ~CoordinateSystem ()
 
virtual std::string id () const
 
virtual std::string horizontalId () 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 ProjectiongetProjection () const
 
virtual void setProjection (boost::shared_ptr< const Projection > proj)
 
virtual bool hasVerticalTransformation () const
 
virtual boost::shared_ptr< const VerticalTransformationgetVerticalTransformation () const
 
virtual void setVerticalTransformation (boost::shared_ptr< const VerticalTransformation > vtran)
 
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 (ConstAxisPtr axis)
 
virtual void setAuxiliaryAxis (ConstAxisPtr axis)
 
virtual std::set< std::stringgetDependencyVariables () const
 
virtual void addDependencyVariable (std::string varName)
 

Detailed Description

CoordinateSystems are usually created using the listCoordinateSystems(boost::shared_ptr<CDMReader>) function, see example there.

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

Member Typedef Documentation

a garbage collected pointer to a CoordinateAxis

a list to constant axis pointer

a garbage collected pointer to a constant coordinateAxis

Constructor & Destructor Documentation

MetNoFimex::CoordinateSystem::CoordinateSystem ( )

CoordinateSystems are usually created within the listCoordinateSystems(boost::shared_ptr<CDMReader>) funcion.

MetNoFimex::CoordinateSystem::CoordinateSystem ( const std::string conventionName)
explicit
virtual MetNoFimex::CoordinateSystem::~CoordinateSystem ( )
inlinevirtual

Member Function Documentation

virtual void MetNoFimex::CoordinateSystem::addDependencyVariable ( std::string  varName)
virtual

add a variable to the dependencies

Parameters
varName

Referenced by ~CoordinateSystem().

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

Referenced by ~CoordinateSystem().

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

find the first axis with one of the types

Parameters
typeslist of types
Returns
an axis or null
virtual ConstAxisList MetNoFimex::CoordinateSystem::getAxes ( ) const
virtual

get all axes, which are not duplicated (i.e. twice in auxiliary)

Referenced by ~CoordinateSystem().

virtual std::string MetNoFimex::CoordinateSystem::getConventionName ( ) const
virtual
Returns
the name of convention used to build the CS

Referenced by ~CoordinateSystem().

virtual std::set<std::string> MetNoFimex::CoordinateSystem::getDependencyVariables ( ) const
virtual

Get all dependency-variables for this Coordinate-System, i.e. axes, grid-mapping-variable, formula-terms, ...

Referenced by ~CoordinateSystem().

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

Referenced by ~CoordinateSystem().

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

Referenced by ~CoordinateSystem().

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

Referenced by ~CoordinateSystem().

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) This includes also coordinate-systems in latitude-longitude 'projection'.

Returns
projection, or null ptr

Referenced by ~CoordinateSystem().

virtual ConstAxisPtr MetNoFimex::CoordinateSystem::getTimeAxis ( ) const
virtual

get the time-axis, or NULL/0

Referenced by ~CoordinateSystem().

virtual boost::shared_ptr<const VerticalTransformation> MetNoFimex::CoordinateSystem::getVerticalTransformation ( ) const
virtual

Get the vertical transformation of the coordinate-system (GeoZ) This includes also height or pressure 'transformations'

Returns
vtrans, or null ptr

Referenced by ~CoordinateSystem().

virtual bool MetNoFimex::CoordinateSystem::hasAxisType ( CoordinateAxis::AxisType  type) const
virtual

Check if the CoordinateSystem contains exactly the axis type

Parameters
typeaxis type to check against

Referenced by ~CoordinateSystem().

virtual bool MetNoFimex::CoordinateSystem::hasProjection ( ) const
virtual

Check if the coordinate-system has a projection (of GeoX, GeoY and optionally GeoZ) This includes also coordinate-systems in latitude-longitude 'projection'.

Referenced by ~CoordinateSystem().

virtual bool MetNoFimex::CoordinateSystem::hasVerticalTransformation ( ) const
virtual

Check if the coordinate-system has a vertical transformation (of GeoZ) This includes also coordinate-systems in pressure or height.

Referenced by ~CoordinateSystem().

virtual std::string MetNoFimex::CoordinateSystem::horizontalId ( ) const
virtual

get an id for the horizontal part of the coordinate system, i.e. geoXAxis and geoYAxis

Referenced by ~CoordinateSystem().

virtual std::string MetNoFimex::CoordinateSystem::id ( ) const
virtual

unique identifier for a coordinate system

Referenced by ~CoordinateSystem().

virtual bool MetNoFimex::CoordinateSystem::isComplete ( const std::string varName) const
virtual

All axes of this system are used by the variable varName

Parameters
varNamevariable name

Referenced by ~CoordinateSystem().

virtual bool MetNoFimex::CoordinateSystem::isCSFor ( const std::string varName) const
virtual

All dimensions of the variable are described by CoordinateSystem

Parameters
varNamevariable name

Referenced by ~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

Referenced by ~CoordinateSystem().

virtual void MetNoFimex::CoordinateSystem::setAuxiliaryAxis ( ConstAxisPtr  axis)
virtual

Set an auxiliary axis. An auxiliary axis may be dropped silently if another axis with the axistype exists.

Referenced by ~CoordinateSystem().

virtual void MetNoFimex::CoordinateSystem::setAxis ( ConstAxisPtr  axis)
virtual

Set any axis.

Exceptions
CDMExceptionif an axis with the same axistype (except undefined) exists

Referenced by ~CoordinateSystem().

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

Referenced by ~CoordinateSystem().

virtual void MetNoFimex::CoordinateSystem::setConventionName ( const std::string conventionName)
virtual

set the convention name

Parameters
conventionName

Referenced by ~CoordinateSystem().

virtual void MetNoFimex::CoordinateSystem::setCSFor ( const std::string varName,
bool  set = true 
)
virtual

Set or unset if all dimensions are described by the CoordinateSystem

Referenced by ~CoordinateSystem().

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)

Referenced by ~CoordinateSystem().

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

Referenced by ~CoordinateSystem().

virtual void MetNoFimex::CoordinateSystem::setVerticalTransformation ( boost::shared_ptr< const VerticalTransformation vtran)
virtual

Set the vertical transformation of the coordinate-system (transformation of GeoZ)

Referenced by ~CoordinateSystem().


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