# MI - Fimex: MetNoFimex::GridDefinition Class Reference

# MetNoFimex::GridDefinition Class Reference

`#include <GridDefinition.h>`

List of all members.

## Public Types

enum | OrientationFlags { ScanStartRight = binary<010000000>::value, ScanStartBottom = binary<001000000>::value, ScanIsVertical = binary<000100000>::value, ScanIsAlternating = binary<000010000>::value }

enum

Orientation {
LeftUpperHorizontal = binary<000000000>::value, RightUpperHorizontal = binary<010000000>::value, LeftLowerHorizontal = binary<001000000>::value, RightLowerHorizontal = binary<011000000>::value,
LeftUpperVertical = binary<000100000>::value, RightUpperVertical = binary<010100000>::value, LeftLowerVertical = binary<001100000>::value, RightLowerVertical = binary<011100000>::value,
LeftUpperHorizontalAlternating = binary<000010000>::value, RightUpperHorizontalAlternating = binary<010010000>::value, LeftLowerHorizontalAlternating = binary<001010000>::value, RightLowerHorizontalAlternating = binary<011010000>::value,
LeftUpperVerticalAlternating = binary<000110000>::value, RightUpperVerticalAlternating = binary<010110000>::value, LeftLowerVerticalAlternating = binary<001110000>::value, RightLowerVerticalAlternating = binary<011110000>::value
}

## Public Member Functions

| GridDefinition ()
| GridDefinition (std::string projDefinition, size_t xSize, size_t ySize, double xIncr, double yIncr, double xStart, double yStart, Orientation orient)
virtual | ~GridDefinition ()
virtual std::string | getProjDefinition () const
| return a proj4 string
virtual void | setProjDefinition (std::string proj)
virtual size_t | getXSize () const
| number of points in x or longitude direction
virtual void | setXSize (size_t xSize)
virtual size_t | getYSize () const
| number of points in y or latitude direction
virtual void | setYSize (size_t ySize)
virtual double | getXIncrement () const
| x or longitude increment in m or degree
virtual void | setXIncrement (double xIncr)
virtual double | getYIncrement () const
| y or latitude increment in m or degree
virtual void | setYIncrement (double yIncr)
virtual double | getXStart () const
| x or longitude start in m or degree
virtual void | setXStart (double startX)
virtual double | getYStart () const
| y or latitude start in m or degree
virtual void | setYStart (double startY)
virtual Orientation | getScanMode () const
virtual void | setScanMode (Orientation orient)
virtual bool | comparableTo (const GridDefinition &rhs, double delta=0.) const

## Member Enumeration Documentation

enum MetNoFimex::GridDefinition::OrientationFlags

Use these flags to build an Orientation. Left, Upper, Horizontal and not Alternating are defaults and don't require flags.

Enumerator:

  ScanStartRight |
  ScanStartBottom |
  ScanIsVertical |
  ScanIsAlternating | change direction between succeeding rows (horizontal) or columns (vertical)

enum MetNoFimex::GridDefinition::Orientation

Enumerator:

  LeftUpperHorizontal |
  RightUpperHorizontal |
  LeftLowerHorizontal |
  RightLowerHorizontal |
  LeftUpperVertical |
  RightUpperVertical |
  LeftLowerVertical |
  RightLowerVertical |
  LeftUpperHorizontalAlternating |
  RightUpperHorizontalAlternating |
  LeftLowerHorizontalAlternating |
  RightLowerHorizontalAlternating |
  LeftUpperVerticalAlternating |
  RightUpperVerticalAlternating |
  LeftLowerVerticalAlternating |
  RightLowerVerticalAlternating |

## Constructor & Destructor Documentation

MetNoFimex::GridDefinition::GridDefinition | ( |  | ) |

MetNoFimex::GridDefinition::GridDefinition | ( | std::string | projDefinition,
|  | size_t | xSize,
|  | size_t | ySize,
|  | double | xIncr,
|  | double | yIncr,
|  | double | xStart,
|  | double | yStart,
|  | Orientation | orient |
| ) |  |  |

virtual MetNoFimex::GridDefinition::~GridDefinition | ( |  | ) | `[virtual]`

## Member Function Documentation

virtual std::string MetNoFimex::GridDefinition::getProjDefinition | ( |  | ) | const`[virtual]`

return a proj4 string

virtual void MetNoFimex::GridDefinition::setProjDefinition | ( | std::string | proj | ) | `[virtual]`

virtual size_t MetNoFimex::GridDefinition::getXSize | ( |  | ) | const`[virtual]`

number of points in x or longitude direction

virtual void MetNoFimex::GridDefinition::setXSize | ( | size_t | xSize | ) | `[virtual]`

virtual size_t MetNoFimex::GridDefinition::getYSize | ( |  | ) | const`[virtual]`

number of points in y or latitude direction

virtual void MetNoFimex::GridDefinition::setYSize | ( | size_t | ySize | ) | `[virtual]`

virtual double MetNoFimex::GridDefinition::getXIncrement | ( |  | ) | const`[virtual]`

x or longitude increment in m or degree

virtual void MetNoFimex::GridDefinition::setXIncrement | ( | double | xIncr | ) | `[virtual]`

virtual double MetNoFimex::GridDefinition::getYIncrement | ( |  | ) | const`[virtual]`

y or latitude increment in m or degree

virtual void MetNoFimex::GridDefinition::setYIncrement | ( | double | yIncr | ) | `[virtual]`

virtual double MetNoFimex::GridDefinition::getXStart | ( |  | ) | const`[virtual]`

x or longitude start in m or degree

virtual void MetNoFimex::GridDefinition::setXStart | ( | double | startX | ) | `[virtual]`

virtual double MetNoFimex::GridDefinition::getYStart | ( |  | ) | const`[virtual]`

y or latitude start in m or degree

virtual void MetNoFimex::GridDefinition::setYStart | ( | double | startY | ) | `[virtual]`

virtual Orientation MetNoFimex::GridDefinition::getScanMode | ( |  | ) | const`[virtual]`

virtual void MetNoFimex::GridDefinition::setScanMode | ( | Orientation | orient | ) | `[virtual]`

virtual bool MetNoFimex::GridDefinition::comparableTo | ( | const GridDefinition & | rhs,
|  | double | delta = `0.` |
| ) |  |  | const`[virtual]`

Compare two GridDefinitions. They are comparable if they have

- same size(XY)
- same incr(XY) within the delta
- same start(XY) within the delta

Parameters:

  | rhs | the other gridDefinition
  | delta | the relative delta to compare to (a == 0) ? (abs(b) <= delta) : abs((b-a)/a) <= delta

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

- include/fimex/GridDefinition.h