libprop: SourceGridFloat Class Reference

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# SourceGridFloat Class Reference

Interface to a data source. Sources can be asked to fill Point objects with any available data. Specifically handles data files in grid float format, usually ending with ".flt" extension. More...

`#include <source.h>`

Inheritance diagram for SourceGridFloat:

List of all members.

## Public Member Functions
| SourceGridFloat (Convert *convert, int type, string filename, bool cache)
| SourceGridFloat (Convert *convert, int type, string filename, int _ncols, int _nrows, double _left, double _bottom, double _cellsize)
| ~SourceGridFloat ()
void | resolve (Point *p)
## Protected Member Functions
double | value (int offset)
## Protected Attributes
double * | cache
| Internal cache of entire data file, if requested.

## Detailed Description

Interface to a data source. Sources can be asked to fill Point objects with any available data. Specifically handles data files in grid float format, usually ending with ".flt" extension.

## Constructor & Destructor Documentation

SourceGridFloat::SourceGridFloat | ( | Convert * | convert,
|  | int | type,
|  | string | filename,
|  | bool | cache |
| ) |  |  |

Create a new grid float data source.

Parameters:

  | convert | The conversion to apply to all incoming points
  | type | Enumeration value describing the type of data we provide
  | filename | Filename pointing to ".hdr" file for this data source
  | cache | Cache entire data file in memory if true, otherwise read directly from file when requested

SourceGridFloat::SourceGridFloat | ( | Convert * | convert,
|  | int | type,
|  | string | filename,
|  | int | _ncols,
|  | int | _nrows,
|  | double | _left,
|  | double | _bottom,
|  | double | _cellsize |
| ) |  |  |

Create a new grid float data source. This constructor is specifically used to bypass reading the ".hdr" header file, which can save time when using large numbers of data source tiles.

Parameters:

  | convert | The conversion to apply to all incoming points
  | type | Enumeration value describing the type of data we provide
  | filename | Filename pointing to ".hdr" file for this data source
  | _ncols | Number of columns in the data file
  | _nrows | Number of rows in the data file
  | _left | Left longitude of the data file
  | _bottom | Bottom latitude of the data file
  | _cellsize | Size of each cell in the data file

SourceGridFloat::~SourceGridFloat | ( |  | ) |

## Member Function Documentation

double SourceGridFloat::value | ( | int | offset | ) | `[protected]`

Retrieve a specific value, either from raw source file, or from cache if it exists.

Parameters:

  | offset | Offset into the data file to read

Returns:
  Value at offset location

void SourceGridFloat::resolve | ( | Point * | p | ) | `[virtual]`

Resolve a given Point by filling it with any new data this source can provide. Will ignore given point if this source can't provide data.

Parameters:

  | p | The point to try filling with data

Implements Source.

## Member Data Documentation

double* SourceGridFloat::cache`[protected]`

Internal cache of entire data file, if requested.

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

- source.h