OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022

#include <L3ShapeSMI.h>

Inheritance diagram for L3ShapeSMI:
[legend]
Collaboration diagram for L3ShapeSMI:
[legend]

Public Member Functions

 L3ShapeSMI (int32_t numRows, int32_t numCols, double north, double south, double east, double west)
 
virtual ~L3ShapeSMI ()
 
void constrainRowCol (int32_t &row, int32_t &col) const
 
virtual int64_t getBaseBin (int32_t row) const
 
virtual int32_t getNumCols (int32_t row) const
 
virtual int32_t bin2row (int64_t bin)
 
virtual void bin2rowcol (int64_t bin, int32_t &row, int32_t &col)
 
virtual int64_t rowcol2bin (int32_t row, int32_t col) const
 
virtual void rowcol2latlon (int32_t row, int32_t col, double &lat, double &lon) const
 
virtual int32_t lat2row (double lat) const
 
virtual double row2lat (int32_t row) const
 
virtual void latlon2rowcol (double lat, double lon, int32_t &row, int32_t &col) const
 
virtual int64_t latlon2bin (double lat, double lon) const
 
virtual void rowcol2bounds (int32_t row, int32_t col, double &north, double &south, double &east, double &west) const
 
- Public Member Functions inherited from L3Shape
 L3Shape (int32_t numRows)
 
virtual ~L3Shape ()
 
virtual int32_t getNumRows () const
 
virtual int64_t getNumBins () const
 
virtual void constrainRow (int32_t &row) const
 
virtual void rowcol2latlon (int32_t row, int32_t col, float &lat, float &lon) const
 
virtual void bin2latlon (int64_t bin, double &lat, double &lon)
 
virtual void bin2latlon (int64_t bin, float &lat, float &lon)
 
virtual void rowcol2bounds (int32_t row, int32_t col, float &north, float &south, float &east, float &west) const
 
virtual void bin2bounds (int64_t bin, double &north, double &south, double &east, double &west)
 
virtual void bin2bounds (int64_t bin, float &north, float &south, float &east, float &west)
 

Protected Attributes

int32_t totalCols
 
double north_
 
double south_
 
double east_
 
double west_
 
- Protected Attributes inherited from L3Shape
int64_t totalBins
 
int32_t totalRows
 
double seamLon
 

Detailed Description

Definition at line 15 of file L3ShapeSMI.h.

Constructor & Destructor Documentation

◆ L3ShapeSMI()

L3ShapeSMI ( int32_t  numRows,
int32_t  numCols,
double  north,
double  south,
double  east,
double  west 
)

constructor for a SMI shaped l3 bin file

Parameters
numRowsnumber of rows in the bin file

Definition at line 12 of file L3ShapeSMI.cpp.

◆ ~L3ShapeSMI()

~L3ShapeSMI ( )
virtual

destructor that frees the memory for this class

Definition at line 28 of file L3ShapeSMI.cpp.

Member Function Documentation

◆ bin2row()

int32_t bin2row ( int64_t  bin)
virtual

find the row that contains the given bin number

Parameters
binto look up
Returns
row this bin is in

Implements L3Shape.

Definition at line 77 of file L3ShapeSMI.cpp.

◆ bin2rowcol()

void bin2rowcol ( int64_t  bin,
int32_t &  row,
int32_t &  col 
)
virtual

get the row and col for the given bin

Parameters
binto look up
rowthat contains the bin
colfor the bin

Implements L3Shape.

Definition at line 91 of file L3ShapeSMI.cpp.

◆ constrainRowCol()

void constrainRowCol ( int32_t &  row,
int32_t &  col 
) const
virtual

keep row and col in the valid range

Parameters
rowto modify if necessary
colto modify if necessary

Implements L3Shape.

Definition at line 36 of file L3ShapeSMI.cpp.

◆ getBaseBin()

int64_t getBaseBin ( int32_t  row) const
virtual

get the bin number of the first column in the given row

Parameters
rowto look up
Returns
the first bin in this row

Implements L3Shape.

Definition at line 58 of file L3ShapeSMI.cpp.

◆ getNumCols()

int32_t getNumCols ( int32_t  row) const
virtual

get the number of columns in the given row

Parameters
rowto look up
Returns
the number of cols in this row

Implements L3Shape.

Definition at line 68 of file L3ShapeSMI.cpp.

◆ lat2row()

int32_t lat2row ( double  lat) const
virtual

get the row for the given lat

Parameters
latto look up
Returns
row of containing bin

Implements L3Shape.

Definition at line 136 of file L3ShapeSMI.cpp.

◆ latlon2bin()

int64_t latlon2bin ( double  lat,
double  lon 
) const
virtual

get the bin number containing the given lat/lon

Parameters
latto look up
lonto look up
Returns
bin number containing lat/lon

Implements L3Shape.

Definition at line 190 of file L3ShapeSMI.cpp.

◆ latlon2rowcol()

void latlon2rowcol ( double  lat,
double  lon,
int32_t &  row,
int32_t &  col 
) const
virtual

get the row/col that contains the given lat/lon

Parameters
latto look up
lonto look up
rowof containing bin
colof containing bin

Implements L3Shape.

Definition at line 167 of file L3ShapeSMI.cpp.

◆ row2lat()

double row2lat ( int32_t  row) const
virtual

get the center latitude of the given row

Parameters
rowof bin to look up
Returns
center latitude of the row

Implements L3Shape.

Definition at line 155 of file L3ShapeSMI.cpp.

◆ rowcol2bin()

int64_t rowcol2bin ( int32_t  row,
int32_t  col 
) const
virtual

get the bin at the given row/col

Parameters
rowof the bin
colof the bin
Returns
bin number at row/col

Implements L3Shape.

Definition at line 112 of file L3ShapeSMI.cpp.

◆ rowcol2bounds()

void rowcol2bounds ( int32_t  row,
int32_t  col,
double &  north,
double &  south,
double &  east,
double &  west 
) const
virtual

get the boundaries of the bin at row/col

Parameters
rowof bin
colof bin
northextent of bin
southextent of bin
eastextent of bin
westextent of bin

Implements L3Shape.

Definition at line 206 of file L3ShapeSMI.cpp.

◆ rowcol2latlon()

void rowcol2latlon ( int32_t  row,
int32_t  col,
double &  lat,
double &  lon 
) const
virtual

get the center lat/lon for the given row/col

Parameters
rowof bin
colof bin
latcenter lat
loncenter lon

Implements L3Shape.

Definition at line 124 of file L3ShapeSMI.cpp.

Member Data Documentation

◆ east_

double east_
protected

Definition at line 18 of file L3ShapeSMI.h.

◆ north_

double north_
protected

Definition at line 18 of file L3ShapeSMI.h.

◆ south_

double south_
protected

Definition at line 18 of file L3ShapeSMI.h.

◆ totalCols

int32_t totalCols
protected

Definition at line 17 of file L3ShapeSMI.h.

◆ west_

double west_
protected

Definition at line 18 of file L3ShapeSMI.h.


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