Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

grid_type_ Struct Reference

#include <grid.h>

List of all members.

Public Attributes

char file [STRING_MAXLEN+1]
 field used as the file source or target (for the grid contents) by functions load_grid and save_grid
char input_dataset [STRING_MAXLEN+1]
 input dataset of the grid, in the input file (relevant for source and target grids)
char output_dataset [STRING_MAXLEN+1]
 output dataset of the grid, in the output file (relevant for source and target grids), should be equal to input_dataset by default
int ichannel
 only relevant for 3-dimensional input data (stacks of 2-dimensional planes), e.g. Modis. The first plane is numbered 1. Should be set to 0 when unused.
int rank
 rank of the grid buffers (should always be 2 for the time being)
int nrows
 number of rows of the grid buffers (common to all the buffers lat, lon, tim, data, distance_from_ref, time_from_ref)
int ncols
 number of columns of the grid (common to all the buffers lat, lon tim, data, distance_from_ref, time_from_ref)
coord_typelat
 buffer for latitudes (nrows*ncols elements)
coord_typelon
 buffer for longitudes (nrows*ncols elements)
time_typetim
 buffer for times of acquisition (nrows*ncols elements)
data_typedata
 buffer for measures, currently in 16-bit unsigned integer counts (nrows*ncols elements)
distance_typedistance_from_ref
 buffer for distances between pixels in the target (reference) grid and their nearest neighbour in the source grid (nrows*ncols elements)
time_typetime_from_ref
 buffer for time differences between pixels in the target (reference) grid and their nearest neighbour in the source grid (nrows*ncols elements)
float64 slope
 calibration scale factor (slope) to apply to a measure count to convert it into a physical value: phys_val = slope*(count - offset)
float64 offset
 calibration offset factor to apply to a measure count to convert it into a physical value: phys_val = slope*(count - offset)
bool is_target
int * src_irows
int * src_icols


Detailed Description

Grids are the main data structures handled by the software. They should have been designed as a class instead of a simple struct with functions to handle it, but by lack of time the software had to be delivered as is. A rewritten code with a grid class instead of a struct should be much clearer and easier to maintain, but will need a substantial amount of time to reimplement (and of course redocument !), that is not available today.

Grids are abstracts for reprojection. Their main purpose is to handle 2-dimensional buffers of geolocated data (measures along with their latitudes, longitudes and times of acquisition). The reprojection algorithm remaps a grid of data (from one instrument product) into another one. For convenience, origin and target of the data (files and datasets) are also maintained in the structure (although this is not a very clever design, I have to confess, I hope I'll have a chance to change this if more time is given to this project)


Member Data Documentation

data_type* grid_type_::data
 

buffer for measures, currently in 16-bit unsigned integer counts (nrows*ncols elements)

distance_type* grid_type_::distance_from_ref
 

buffer for distances between pixels in the target (reference) grid and their nearest neighbour in the source grid (nrows*ncols elements)

char grid_type_::file[STRING_MAXLEN+1]
 

field used as the file source or target (for the grid contents) by functions load_grid and save_grid

int grid_type_::ichannel
 

only relevant for 3-dimensional input data (stacks of 2-dimensional planes), e.g. Modis. The first plane is numbered 1. Should be set to 0 when unused.

char grid_type_::input_dataset[STRING_MAXLEN+1]
 

input dataset of the grid, in the input file (relevant for source and target grids)

bool grid_type_::is_target
 

specifies if a grid is a source (is_target == false) or a target (is_target == true) currently not used (intended as a future optimization of the reprojection code, in order to reuse precomputed source rows and cols instead of recomputing them again and again)

coord_type* grid_type_::lat
 

buffer for latitudes (nrows*ncols elements)

coord_type* grid_type_::lon
 

buffer for longitudes (nrows*ncols elements)

int grid_type_::ncols
 

number of columns of the grid (common to all the buffers lat, lon tim, data, distance_from_ref, time_from_ref)

int grid_type_::nrows
 

number of rows of the grid buffers (common to all the buffers lat, lon, tim, data, distance_from_ref, time_from_ref)

float64 grid_type_::offset
 

calibration offset factor to apply to a measure count to convert it into a physical value: phys_val = slope*(count - offset)

char grid_type_::output_dataset[STRING_MAXLEN+1]
 

output dataset of the grid, in the output file (relevant for source and target grids), should be equal to input_dataset by default

int grid_type_::rank
 

rank of the grid buffers (should always be 2 for the time being)

float64 grid_type_::slope
 

calibration scale factor (slope) to apply to a measure count to convert it into a physical value: phys_val = slope*(count - offset)

int* grid_type_::src_icols
 

buffer to store, for each pixel of the target grid, its nearest neighbour's column in the source grid (nrows*ncols elements); valid only if grid_type::is_target == true; currently not used (intended as a future optimization of the reprojection code, in order to reuse precomputed source rows and cols instead of recomputing them again and again)

int* grid_type_::src_irows
 

buffer to store, for each pixel of the target grid, its nearest neighbour's row in the source grid (nrows*ncols elements); valid only if grid_type::is_target == true; currently not used (intended as a future optimization of the reprojection code, in order to reuse precomputed source rows and cols instead of recomputing them again and again)

time_type* grid_type_::tim
 

buffer for times of acquisition (nrows*ncols elements)

time_type* grid_type_::time_from_ref
 

buffer for time differences between pixels in the target (reference) grid and their nearest neighbour in the source grid (nrows*ncols elements)


The documentation for this struct was generated from the following file:
Generated on Wed Apr 19 17:05:06 2006 for Remap by  doxygen 1.3.9.1