ocssw
V2022
|
Go to the source code of this file.
Classes | |
struct | EPR_SProductId |
struct | EPR_SDatasetId |
struct | EPR_SDSD |
struct | EPR_SRecord |
struct | EPR_SField |
struct | EPR_SRaster |
struct | EPR_SDatasetRef |
struct | EPR_SFlagDef |
struct | EPR_SBandId |
struct | EPR_STime |
Macros | |
#define | EPR_PRODUCT_API_NAME_STR "ENVISAT Product Reader API" |
#define | EPR_PRODUCT_API_VERSION_STR "2.3" |
#define | EPR_MAGIC_PRODUCT_ID 0xCAFFEE64 |
#define | EPR_MAGIC_DATASET_ID 0xEFEABDCA |
#define | EPR_MAGIC_BAND_ID 0xFEC21ABD |
#define | EPR_MAGIC_RECORD 0x7BABACAE |
#define | EPR_MAGIC_FIELD 0xBA0BABBA |
#define | EPR_MAGIC_RASTER 0x0BABA0EB |
#define | EPR_MAGIC_FLAG_DEF 0xCABA11AD |
#define | EPR_TRUE 1 |
#define | EPR_FALSE 0 |
#define | EPR_PRODUCT_ID_STRLEN 48 |
Typedefs | |
typedef enum EPR_DataTypeId | EPR_EDataTypeId |
typedef enum EPR_ErrCode | EPR_EErrCode |
typedef enum EPR_LogLevel | EPR_ELogLevel |
typedef enum EPR_SampleModel | EPR_ESampleModel |
typedef enum EPR_ScalingMethod | EPR_EScalingMethod |
typedef struct EPR_BitmaskTerm | EPR_SBitmaskTerm |
typedef struct EPR_FlagSet | EPR_SFlagSet |
typedef void(* | EPR_FErrHandler) (EPR_EErrCode err_code, const char *err_message) |
typedef void(* | EPR_FLogHandler) (EPR_ELogLevel log_level, const char *log_message) |
typedef int | epr_boolean |
typedef unsigned char | epr_uchar |
typedef unsigned short | epr_ushort |
typedef unsigned int | epr_uint |
typedef unsigned long | epr_ulong |
typedef int | EPR_Magic |
Functions | |
int | epr_init_api (EPR_ELogLevel log_level, EPR_FLogHandler log_handler, EPR_FErrHandler err_handler) |
void | epr_close_api () |
int | epr_set_log_level (EPR_ELogLevel log_level) |
void | epr_set_log_handler (EPR_FLogHandler log_handler) |
void | epr_log_message (EPR_ELogLevel log_level, const char *log_message) |
void | epr_set_err_handler (EPR_FErrHandler err_handler) |
EPR_EErrCode | epr_get_last_err_code () |
const char * | epr_get_last_err_message () |
void | epr_clear_err () |
EPR_SProductId * | epr_open_product (const char *product_file_path) |
int | epr_close_product (EPR_SProductId *product_id) |
void | epr_print_record (const EPR_SRecord *record, FILE *ostream) |
void | epr_print_field (const EPR_SField *field, FILE *ostream) |
void | epr_print_element (const EPR_SRecord *record, epr_uint field_index, epr_uint element_index, FILE *ostream) |
void | epr_dump_record (const EPR_SRecord *record) |
void | epr_dump_field (const EPR_SField *field) |
void | epr_dump_element (const EPR_SRecord *record, epr_uint field_index, epr_uint element_index) |
epr_uint | epr_get_scene_width (const EPR_SProductId *product_id) |
epr_uint | epr_get_scene_height (const EPR_SProductId *product_id) |
epr_uint | epr_get_num_datasets (EPR_SProductId *product_id) |
EPR_SDatasetId * | epr_get_dataset_id_at (EPR_SProductId *product_id, epr_uint index) |
EPR_SDatasetId * | epr_get_dataset_id (EPR_SProductId *product_id, const char *dataset_name) |
const char * | epr_get_dataset_name (EPR_SDatasetId *dataset_id) |
const char * | epr_get_dsd_name (const EPR_SDatasetId *dataset_id) |
EPR_SRecord * | epr_get_mph (const EPR_SProductId *product_id) |
EPR_SRecord * | epr_get_sph (const EPR_SProductId *product_id) |
const EPR_SDSD * | epr_get_dsd (const EPR_SDatasetId *dataset_id) |
epr_uint | epr_get_num_records (const EPR_SDatasetId *dataset_id) |
epr_uint | epr_get_num_dsds (const EPR_SProductId *product_id) |
EPR_SDSD * | epr_get_dsd_at (const EPR_SProductId *product_id, epr_uint dsd_index) |
EPR_SRecord * | epr_create_record (EPR_SDatasetId *dataset_id) |
EPR_SRecord * | epr_read_record (EPR_SDatasetId *dataset_id, epr_uint record_index, EPR_SRecord *record) |
void | epr_free_record (EPR_SRecord *record) |
const EPR_SField * | epr_get_field (const EPR_SRecord *record, const char *field_name) |
epr_uint | epr_get_num_fields (const EPR_SRecord *record) |
const EPR_SField * | epr_get_field_at (const EPR_SRecord *record, epr_uint field_index) |
const char * | epr_get_field_unit (const EPR_SField *field) |
const char * | epr_get_field_description (const EPR_SField *field) |
epr_uint | epr_get_field_num_elems (const EPR_SField *field) |
const char * | epr_get_field_name (const EPR_SField *field) |
EPR_EDataTypeId | epr_get_field_type (const EPR_SField *field) |
char | epr_get_field_elem_as_char (const EPR_SField *field, epr_uint elem_index) |
epr_uchar | epr_get_field_elem_as_uchar (const EPR_SField *field, epr_uint elem_index) |
short | epr_get_field_elem_as_short (const EPR_SField *field, epr_uint elem_index) |
epr_ushort | epr_get_field_elem_as_ushort (const EPR_SField *field, epr_uint elem_index) |
int | epr_get_field_elem_as_int (const EPR_SField *field, epr_uint elem_index) |
epr_uint | epr_get_field_elem_as_uint (const EPR_SField *field, epr_uint elem_index) |
float | epr_get_field_elem_as_float (const EPR_SField *field, epr_uint elem_index) |
double | epr_get_field_elem_as_double (const EPR_SField *field, epr_uint elem_index) |
const EPR_STime * | epr_get_field_elem_as_mjd (const EPR_SField *field) |
const char * | epr_get_field_elem_as_str (const EPR_SField *field) |
const char * | epr_get_field_elems_char (const EPR_SField *field) |
const epr_uchar * | epr_get_field_elems_uchar (const EPR_SField *field) |
const short * | epr_get_field_elems_short (const EPR_SField *field) |
const epr_ushort * | epr_get_field_elems_ushort (const EPR_SField *field) |
const int * | epr_get_field_elems_int (const EPR_SField *field) |
const epr_uint * | epr_get_field_elems_uint (const EPR_SField *field) |
const float * | epr_get_field_elems_float (const EPR_SField *field) |
const double * | epr_get_field_elems_double (const EPR_SField *field) |
epr_uint | epr_copy_field_elems_as_ints (const EPR_SField *field, int *buffer, epr_uint num_elems) |
epr_uint | epr_copy_field_elems_as_uints (const EPR_SField *field, epr_uint *buffer, epr_uint num_elems) |
epr_uint | epr_copy_field_elems_as_floats (const EPR_SField *field, float *buffer, epr_uint num_elems) |
epr_uint | epr_copy_field_elems_as_doubles (const EPR_SField *field, double *buffer, epr_uint num_elems) |
EPR_SRaster * | epr_create_compatible_raster (EPR_SBandId *band_id, epr_uint source_width, epr_uint source_height, epr_uint source_step_x, epr_uint source_step_y) |
EPR_SRaster * | epr_create_raster (EPR_EDataTypeId data_type, epr_uint source_width, epr_uint source_height, epr_uint source_step_x, epr_uint source_step_y) |
EPR_SRaster * | epr_create_bitmask_raster (epr_uint source_width, epr_uint source_height, epr_uint source_step_x, epr_uint source_step_y) |
int | epr_read_band_raster (EPR_SBandId *band_id, int offset_x, int offset_y, EPR_SRaster *raster) |
epr_uint | epr_get_raster_elem_size (const EPR_SRaster *raster) |
void * | epr_get_raster_elem_addr (const EPR_SRaster *raster, epr_uint offset) |
void * | epr_get_raster_pixel_addr (const EPR_SRaster *raster, epr_uint x, epr_uint y) |
void * | epr_get_raster_line_addr (const EPR_SRaster *raster, epr_uint y) |
epr_uint | epr_get_raster_width (EPR_SRaster *raster) |
epr_uint | epr_get_raster_height (EPR_SRaster *raster) |
epr_uint | epr_get_num_bands (EPR_SProductId *product_id) |
EPR_SBandId * | epr_get_band_id_at (EPR_SProductId *product_id, epr_uint index) |
EPR_SBandId * | epr_get_band_id (EPR_SProductId *product_id, const char *band_name) |
const char * | epr_get_band_name (EPR_SBandId *band_id) |
void | epr_free_raster (EPR_SRaster *raster) |
epr_uint | epr_get_pixel_as_uint (const EPR_SRaster *raster, int x, int y) |
int | epr_get_pixel_as_int (const EPR_SRaster *raster, int x, int y) |
float | epr_get_pixel_as_float (const EPR_SRaster *raster, int x, int y) |
double | epr_get_pixel_as_double (const EPR_SRaster *raster, int x, int y) |
int | epr_read_bitmask_raster (EPR_SProductId *product_id, const char *bm_expr, int offset_x, int offset_y, EPR_SRaster *raster) |
epr_uint | epr_get_data_type_size (EPR_EDataTypeId data_type_id) |
const char * | epr_data_type_id_to_str (EPR_EDataTypeId data_type_id) |
Macro Definition Documentation
◆ EPR_FALSE
◆ EPR_MAGIC_BAND_ID
◆ EPR_MAGIC_DATASET_ID
◆ EPR_MAGIC_FIELD
◆ EPR_MAGIC_FLAG_DEF
◆ EPR_MAGIC_PRODUCT_ID
◆ EPR_MAGIC_RASTER
◆ EPR_MAGIC_RECORD
◆ EPR_PRODUCT_API_NAME_STR
#define EPR_PRODUCT_API_NAME_STR "ENVISAT Product Reader API" |
◆ EPR_PRODUCT_API_VERSION_STR
◆ EPR_PRODUCT_ID_STRLEN
◆ EPR_TRUE
Typedef Documentation
◆ epr_boolean
typedef int epr_boolean |
◆ EPR_EDataTypeId
typedef enum EPR_DataTypeId EPR_EDataTypeId |
◆ EPR_EErrCode
typedef enum EPR_ErrCode EPR_EErrCode |
◆ EPR_ELogLevel
typedef enum EPR_LogLevel EPR_ELogLevel |
◆ EPR_ESampleModel
typedef enum EPR_SampleModel EPR_ESampleModel |
◆ EPR_EScalingMethod
typedef enum EPR_ScalingMethod EPR_EScalingMethod |
◆ EPR_FErrHandler
typedef void(* EPR_FErrHandler) (EPR_EErrCode err_code, const char *err_message) |
◆ EPR_FLogHandler
typedef void(* EPR_FLogHandler) (EPR_ELogLevel log_level, const char *log_message) |
◆ EPR_Magic
◆ EPR_SBitmaskTerm
typedef struct EPR_BitmaskTerm EPR_SBitmaskTerm |
◆ EPR_SFlagSet
typedef struct EPR_FlagSet EPR_SFlagSet |
◆ epr_uchar
◆ epr_uint
◆ epr_ulong
◆ epr_ushort
typedef unsigned short epr_ushort |
Enumeration Type Documentation
◆ EPR_DataTypeId
enum EPR_DataTypeId |
The EPR_DataTypeId
enumeration lists all possible data types for field elements in ENVISAT dataset records.
Enumerator | |
---|---|
e_tid_unknown | The ID for unknown types. |
e_tid_uchar | An array of unsigned 8-bit integers, C type is |
e_tid_char | An array of signed 8-bit integers, C type is |
e_tid_ushort | An array of unsigned 16-bit integers, C type is |
e_tid_short | An array of signed 16-bit integers, C type is |
e_tid_uint | An array of unsigned 32-bit integers, C type is |
e_tid_int | An array of signed 32-bit integers, C type is |
e_tid_float | An array of 32-bit floating point numbers, C type is |
e_tid_double | An array of 64-bit floating point numbers, C type is |
e_tid_string | A zero-terminated ASCII string, C type is |
e_tid_spare | An array of unsigned character, C type is |
e_tid_time | A time (MJD) structure, C type is |
◆ EPR_ErrCode
enum EPR_ErrCode |
The EPR_ErrCode
enumeration lists all possible error codes for the ENVISAT product reader API.
◆ EPR_LogLevel
enum EPR_LogLevel |
◆ EPR_SampleModel
enum EPR_SampleModel |
◆ EPR_ScalingMethod
enum EPR_ScalingMethod |
Function Documentation
◆ epr_copy_field_elems_as_doubles()
epr_uint epr_copy_field_elems_as_doubles | ( | const EPR_SField * | field, |
double * | buffer, | ||
epr_uint | num_elems | ||
) |
Copies the data of the given field into the given buffer of double
elements. The actual number of elements copied is the minimum of the given number of elements (the buffer's size) and the actual number of elements contained in the field.
If the actual field data type is not double
the function automatically performs the conversion.
- Parameters
-
field the field from which to copy the elements buffer the buffer in which to copy the data num_elems the number of elements in the given buffer
- Returns
- the actual number of elements copied
Definition at line 657 of file epr_typconv.c.
◆ epr_copy_field_elems_as_floats()
epr_uint epr_copy_field_elems_as_floats | ( | const EPR_SField * | field, |
float * | buffer, | ||
epr_uint | num_elems | ||
) |
Copies the data of the given field into the given buffer of float
elements. The actual number of elements copied is the minimum of the given number of elements (the buffer's size) and the actual number of elements contained in the field.
If the actual field data type is not float
the function automatically performs the conversion.
- Parameters
-
field the field from which to copy the elements buffer the buffer in which to copy the data num_elems the number of elements in the given buffer
- Returns
- the actual number of elements copied
Definition at line 729 of file epr_typconv.c.
◆ epr_copy_field_elems_as_ints()
epr_uint epr_copy_field_elems_as_ints | ( | const EPR_SField * | field, |
int * | buffer, | ||
epr_uint | num_elems | ||
) |
◆ epr_copy_field_elems_as_uints()
epr_uint epr_copy_field_elems_as_uints | ( | const EPR_SField * | field, |
epr_uint * | buffer, | ||
epr_uint | num_elems | ||
) |
Copies the data of the given field into the given buffer of uint
elements. The actual number of elements copied is the minimum of the given number of elements (the buffer's size) and the actual number of elements contained in the field.
If the actual field data type is not uint
the function automatically performs the conversion.
- Parameters
-
field the field from which to copy the elements buffer the buffer in which to copy the data num_elems the number of elements in the given buffer
- Returns
- the actual number of elements copied
Definition at line 857 of file epr_typconv.c.
◆ epr_get_field_elem_as_char()
Interpretes a memory as a char
value
- Parameters
-
field the pointer at the array to convert elem_index the index of the element in the given array to convert
- Returns
- the
char
typed element orerror_code
if an error occured.
Definition at line 41 of file epr_typconv.c.
◆ epr_get_field_elem_as_double()
Interpretes a memory as a double
value
- Parameters
-
field the pointer at the array to convert elem_index the index of the element in the given array to convert
- Returns
- the
double
typed element orerror_code
if an error occured.
Definition at line 514 of file epr_typconv.c.
◆ epr_get_field_elem_as_float()
Interpretes a memory as a float
value
- Parameters
-
field the pointer at the array to convert elem_index the index of the element in the given array to convert
- Returns
- the
float
typed element orerror_code
if an error occured.
Definition at line 435 of file epr_typconv.c.
◆ epr_get_field_elem_as_int()
Interpretes a memory as a int
value.
If an error occurs the method returns 0
(zero). Whether an error really occured when zero is returned can by determined by using the epr_get_last_err_code
function.
- Parameters
-
field the pointer at the array to convert elem_index the index of the element in the given array to convert
- Returns
- a
int
value
Definition at line 291 of file epr_typconv.c.
◆ epr_get_field_elem_as_mjd()
Interpretes a memory data as a short
data
- Parameters
-
field the pointer at the array to convert time the pointer at the time structure to get
- Returns
- the time [days, seconds, microseconds] or
NULL
if an error occured.
Definition at line 596 of file epr_typconv.c.
◆ epr_get_field_elem_as_short()
Interpretes a memory as a short
value
- Parameters
-
field the pointer at the array to convert elem_index the index of the element in the given array to convert
- Returns
- the
short
typed element orerror_code
if an error occured.
Definition at line 155 of file epr_typconv.c.
◆ epr_get_field_elem_as_str()
Interpretes a memory data as a string.
- Parameters
-
field the pointer at the array to convert
- Returns
- the
char
typed element orNULL
if an error occured.
Definition at line 624 of file epr_typconv.c.
◆ epr_get_field_elem_as_uchar()
Interpretes a memory as a uchar
value
- Parameters
-
field the pointer at the array to convert elem_index the index of the element in the given array to convert
- Returns
- the
uchar
typed element orerror_code
if an error occured.
Definition at line 98 of file epr_typconv.c.
◆ epr_get_field_elem_as_uint()
Interpretes a memory as a uint
value
- Parameters
-
field the pointer at the array to convert elem_index the index of the element in the given array to convert
- Returns
- the
uint
typed element orerror_code
if an error occured.
Definition at line 363 of file epr_typconv.c.
◆ epr_get_field_elem_as_ushort()
epr_ushort epr_get_field_elem_as_ushort | ( | const EPR_SField * | field, |
epr_uint | elem_index | ||
) |
Interpretes a memory as a ushort
value
- Parameters
-
field the pointer at the array to convert elem_index the index of the element in the given array to convert
- Returns
- the
ushort
typed element orerror_code
if an error occured.
Definition at line 222 of file epr_typconv.c.
◆ epr_get_field_elems_char()
Interpretes a memory data as a char
data
- Parameters
-
field the pointer at the array to convert
- Returns
- the
char
typed element orNULL
if an error occured.
Definition at line 71 of file epr_typconv.c.
◆ epr_get_field_elems_double()
Interpretes a memory data as a double
data
- Parameters
-
field the pointer at the array to convert
- Returns
- the
double
typed element orNULL
if an error occured.
Definition at line 569 of file epr_typconv.c.
◆ epr_get_field_elems_float()
Interpretes a memory data as a float
data
- Parameters
-
field the pointer at the array to convert
- Returns
- the
float
typed element orNULL
if an error occured.
Definition at line 487 of file epr_typconv.c.
◆ epr_get_field_elems_int()
Interpretes a memory data as a int
data
- Parameters
-
field the pointer at the array to convert
- Returns
- the
int
typed element orNULL
if an error occured.
Definition at line 336 of file epr_typconv.c.
◆ epr_get_field_elems_short()
Interpretes a memory data as a short
data
- Parameters
-
field the pointer at the array to convert
- Returns
- the
short
typed element orNULL
if an error occured.
Definition at line 195 of file epr_typconv.c.
◆ epr_get_field_elems_uchar()
Interpretes a memory data as a uchar
data
- Parameters
-
field the pointer at the array to convert
- Returns
- the
uchar
typed element orNULL
if an error occured.
Definition at line 128 of file epr_typconv.c.
◆ epr_get_field_elems_uint()
Interpretes a memory data as a uint
data
- Parameters
-
field the pointer at the array to convert
- Returns
- the
uint
typed element orNULL
if an error occured.
Definition at line 408 of file epr_typconv.c.
◆ epr_get_field_elems_ushort()
const epr_ushort* epr_get_field_elems_ushort | ( | const EPR_SField * | field | ) |
Interpretes a memory data as a ushort
data
- Parameters
-
field the pointer at the array to convert
- Returns
- the
ushort
typed element orNULL
if an error occured.
Definition at line 261 of file epr_typconv.c.