OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
Collaboration diagram for Bitmask:

Functions

int epr_read_bitmask_raster (EPR_SProductId *product_id, const char *bm_expr, int offset_x, int offset_y, EPR_SRaster *raster)
 

Detailed Description

Function Documentation

◆ epr_read_bitmask_raster()

int epr_read_bitmask_raster ( EPR_SProductId *  product_id,
const char *  bm_expr,
int  offset_x,
int  offset_y,
EPR_SRaster *  bm_raster 
)

Calculates a bit-mask, composed of flags of the given product and combined as described in the given bit-mask expression, for the a certain dimension and sub-sampling as defined in the given raster.

Parameters
product_idIdentifier of the ENVISAT product for which the bit-mask shall be created. This is used by the function to retreive the needed flags.
bm_exprA string holding the logical expression for the defintion of the bit-mask. In a bit-mask expression, any number of the flag-names (found in the DDDB) can be composed with "(", ")", "NOT", "AND", "OR". Valid bit-mask expression are for example:
"flags.LAND OR flags.CLOUD" or "NOT flags.WATER AND flags.TURBID_S".
offset_xacross-track co-ordinate in pixel co-ordinates (zero-based) of the upper right corner of the source-region
offset_yalong-track co-ordinate in pixel co-ordinates (zero-based) of the upper right corner of the source-region
rasterthe raster for the bit-mask. The data type of the raster must be either e_tid_uchar or e_tid_char.
Returns
zero for success, an error code otherwise
See also
create_band_raster

Reads bit-mask pixels of the given product for the given bit-mask expression for the given region offset and raster.

Parameters
product_idthe product ID
bm_exprthe bit-mask expression
offset_xX-coordinate in pixel co-ordinates (zero-based) of the upper right raster corner to be searched for
offset_yY-coordinate in pixel co-ordinates (zero-based) of the upper right raster corner to be searched for
rasterthe instance to the buffer information was used
Returns
zero for success, an error code otherwise

Definition at line 99 of file epr_bitmask.c.