ENVISAT Product Reader API for C |
![]() |
Modules | |
Bitmask | |
Utility Functions | |
Functions | |
uint | epr_get_pixel_as_uint (const EPR_SRaster *raster, int x, int y) |
This group of functions is for getting the values of the elements of a raster (i.e. | |
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) |
Variables | |
EPR_Magic | EPR_ProductId::magic |
The magic number for this structure. | |
char * | EPR_ProductId::file_path |
The file's path including the file name. | |
FILE * | EPR_ProductId::istream |
The input stream as returned by the ANSI C fopen function for the given file path. | |
uint | EPR_ProductId::tot_size |
The total size in bytes of the product file. | |
uint | EPR_ProductId::scene_width |
The total width of product's scene raster in pixels. | |
uint | EPR_ProductId::scene_height |
The total height of product's scene raster in pixels. | |
char | EPR_ProductId::id_string [EPR_PRODUCT_ID_STRLEN+1] |
The product identifier string obtained from the MPH parameter 'PRODUCT'. | |
EPR_SRecord * | EPR_ProductId::mph_record |
The record representing the main product header (MPH). | |
EPR_SRecord * | EPR_ProductId::sph_record |
The record representing the specific product header (SPH). | |
EPR_SPtrArray * | EPR_ProductId::dsd_array |
An array containing all (!) DSDs read from the product's specific product header (SPH). | |
EPR_SPtrArray * | EPR_ProductId::record_info_cache |
Cache for record infos. | |
EPR_SPtrArray * | EPR_ProductId::param_table |
A table containing dynamic field info parameters. | |
EPR_SPtrArray * | EPR_ProductId::dataset_ids |
Contains and array of all dataset IDs for the product (type EPR_SDatasetId*) | |
EPR_SPtrArray * | EPR_ProductId::band_ids |
Contains and array of all band IDs for the product (type EPR_SBandId*) | |
int | EPR_ProductId::meris_iodd_version |
For MERIS L1b and RR and FR to provide backward compatibility. | |
EPR_Magic | EPR_DatasetId::magic |
The magic number for this structure. | |
EPR_SProductId * | EPR_DatasetId::product_id |
The ID of the product to which this dataset belongs to. | |
char * | EPR_DatasetId::dsd_name |
The name as presented to the user in a dsd selection dialog. | |
const EPR_SDSD * | EPR_DatasetId::dsd |
The dataset descriptor obtained from the current product. | |
char * | EPR_DatasetId::dataset_name |
The name as presented to the user in a dataset selection dialog. | |
const struct RecordDescriptor * | EPR_DatasetId::record_descriptor |
The record descriptor found in the DDDB for this dataset. | |
EPR_SRecordInfo * | EPR_DatasetId::record_info |
The record info which describes a record of this dataset. | |
char * | EPR_DatasetId::description |
A short description of the band's contents. | |
EPR_Magic | EPR_DSD::magic |
The magic number for this structure. | |
int | EPR_DSD::index |
The index of this DSD (zero-based) | |
char * | EPR_DSD::ds_name |
The dataset name. | |
char * | EPR_DSD::ds_type |
The dataset type descriptor. | |
char * | EPR_DSD::filename |
The filename in the DDDB with the description of this dataset. | |
uint | EPR_DSD::ds_offset |
The offset of dataset-information the product file. | |
uint | EPR_DSD::ds_size |
The size of dataset-information in dataset product file. | |
uint | EPR_DSD::num_dsr |
The number of dataset records for the given dataset name. | |
uint | EPR_DSD::dsr_size |
The size of dataset record for the given dataset name. | |
EPR_Magic | EPR_Record::magic |
The magic number for this structure. | |
EPR_SRecordInfo * | EPR_Record::info |
The corresponding record info for this record (a 'soft' pointer). | |
uint | EPR_Record::num_fields |
The number of fields contained in this record. | |
EPR_SField ** | EPR_Record::fields |
The record fields. | |
EPR_Magic | EPR_Field::magic |
The magic number for this structure. | |
EPR_SFieldInfo * | EPR_Field::info |
The corresponding field info for this field. | |
void * | EPR_Field::elems |
The elements of this field. | |
EPR_Magic | EPR_Raster::magic |
The magic number for this structure. | |
EPR_EDataTypeId | EPR_Raster::data_type |
The data type of the band's pixel values. | |
uint | EPR_Raster::elem_size |
The size in byte of a single element (sample) of this raster's buffer. | |
uint | EPR_Raster::source_width |
The width of the source . | |
uint | EPR_Raster::source_height |
The height of the source. | |
uint | EPR_Raster::source_step_x |
The sub-sampling for the across-track direction in pixel. | |
uint | EPR_Raster::source_step_y |
The sub-sampling for the along-track direction in pixel. | |
uint | EPR_Raster::raster_width |
The width of the raster in pixel. | |
uint | EPR_Raster::raster_height |
The height of the raster in pixel. | |
void * | EPR_Raster::buffer |
The elements of this raster. | |
EPR_SDatasetId * | EPR_DatasetRef::dataset_id |
int | EPR_DatasetRef::field_index |
int | EPR_DatasetRef::elem_index |
EPR_Magic | EPR_FlagDef::magic |
The magic number for this structure. | |
char * | EPR_FlagDef::name |
The flag name. | |
uint | EPR_FlagDef::bit_mask |
The bit mask describing this flag. | |
char * | EPR_FlagDef::description |
The flag description. | |
EPR_Magic | EPR_BandId::magic |
The magic number for this structure. | |
EPR_SProductId * | EPR_BandId::product_id |
The ID of the product to which this band belongs to. | |
char * | EPR_BandId::band_name |
The name as presented to the user in a band selection dialog (also known as spectral subset) | |
int | EPR_BandId::spectr_band_index |
The (zero-based) spectral band index. | |
EPR_SDatasetRef | EPR_BandId::dataset_ref |
The reference of the source dataset containing the raw data used to create the band's pixel values. | |
EPR_ESampleModel | EPR_BandId::sample_model |
The sample model operation applied to the source dataset for getting the correct samples from the MDS (for example MERIS L2). | |
EPR_EDataTypeId | EPR_BandId::data_type |
The data type of the band's pixel values. | |
EPR_EScalingMethod | EPR_BandId::scaling_method |
The scaling method which must be applied to the raw source data in order to get the 'real' pixel values in geo-physical units. | |
float | EPR_BandId::scaling_offset |
The scaling offset. | |
float | EPR_BandId::scaling_factor |
The scaling factor. | |
char * | EPR_BandId::bm_expr |
A bit-mask expression used to filter valid pixels. | |
EPR_SPtrArray * | EPR_BandId::flag_coding |
The flag coding is a list of EPR_SFlag instances. | |
char * | EPR_BandId::unit |
The geophysical unit for the band's pixel values. | |
char * | EPR_BandId::description |
A short description of the band's contents. | |
epr_boolean | EPR_BandId::lines_mirrored |
If true (=1) lines will be mirrored (flipped) after read into a raster in order to ensure a pixel ordering in raster X direction from WEST to EAST. | |
int | EPR_Time::days |
uint | EPR_Time::seconds |
uint | EPR_Time::microseconds |
uint epr_get_pixel_as_uint | ( | const EPR_SRaster * | raster, |
int | x, | ||
int | y | ||
) |
This group of functions is for getting the values of the elements of a raster (i.e.
pixel) in a type-safe way.
raster | the raster which contains the pixel, must not be NULL |
x | the (zero-based) X co-ordinate of the pixel |
y | the (zero-based) Y co-ordinate of the pixel |
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 | ||
) |
EPR_Magic EPR_ProductId::magic |
The magic number for this structure.
IMPORTANT: This must always be the first member of this structure.
char* EPR_ProductId::file_path |
The file's path including the file name.
FILE* EPR_ProductId::istream |
The input stream as returned by the ANSI C fopen
function for the given file path.
uint EPR_ProductId::tot_size |
The total size in bytes of the product file.
uint EPR_ProductId::scene_width |
The total width of product's scene raster in pixels.
uint EPR_ProductId::scene_height |
The total height of product's scene raster in pixels.
char EPR_ProductId::id_string[EPR_PRODUCT_ID_STRLEN+1] |
The product identifier string obtained from the MPH parameter 'PRODUCT'.
The first 10 characters of this string identify the the product type, e.g. "MER_1P__FR" for a MERIS Level 1b full resolution product. The rest of the string decodes product instance properties.
EPR_SRecord* EPR_ProductId::mph_record |
The record representing the main product header (MPH).
EPR_SRecord* EPR_ProductId::sph_record |
The record representing the specific product header (SPH).
EPR_SPtrArray* EPR_ProductId::dsd_array |
An array containing all (!) DSDs read from the product's specific product header (SPH).
EPR_SPtrArray* EPR_ProductId::record_info_cache |
Cache for record infos.
Contains all record infos read from the database for this file so far.
The reason for caching record infos on a per-file-base is that a some record infos instances can contain file related content such as the number of pixels in a measurecment dataset record (MDSR).
EPR_SPtrArray* EPR_ProductId::param_table |
A table containing dynamic field info parameters.
Dynamic field info parameters are created at runtime because the are derived from the product file contents and can not be staically stored in the record info database.
EPR_SPtrArray* EPR_ProductId::dataset_ids |
Contains and array of all dataset IDs for the product (type EPR_SDatasetId*)
EPR_SPtrArray* EPR_ProductId::band_ids |
Contains and array of all band IDs for the product (type EPR_SBandId*)
int EPR_ProductId::meris_iodd_version |
For MERIS L1b and RR and FR to provide backward compatibility.
EPR_Magic EPR_DatasetId::magic |
The magic number for this structure.
IMPORTANT: This must always be the first member of this structure.
EPR_SProductId* EPR_DatasetId::product_id |
The ID of the product to which this dataset belongs to.
char* EPR_DatasetId::dsd_name |
The name as presented to the user in a dsd selection dialog.
const EPR_SDSD* EPR_DatasetId::dsd |
The dataset descriptor obtained from the current product.
char* EPR_DatasetId::dataset_name |
The name as presented to the user in a dataset selection dialog.
const struct RecordDescriptor* EPR_DatasetId::record_descriptor |
The record descriptor found in the DDDB for this dataset.
EPR_SRecordInfo* EPR_DatasetId::record_info |
The record info which describes a record of this dataset.
char* EPR_DatasetId::description |
A short description of the band's contents.
EPR_Magic EPR_DSD::magic |
The magic number for this structure.
IMPORTANT: This must always be the first member of this structure.
int EPR_DSD::index |
The index of this DSD (zero-based)
char* EPR_DSD::ds_name |
The dataset name.
char* EPR_DSD::ds_type |
The dataset type descriptor.
char* EPR_DSD::filename |
The filename in the DDDB with the description of this dataset.
uint EPR_DSD::ds_offset |
The offset of dataset-information the product file.
uint EPR_DSD::ds_size |
The size of dataset-information in dataset product file.
uint EPR_DSD::num_dsr |
The number of dataset records for the given dataset name.
uint EPR_DSD::dsr_size |
The size of dataset record for the given dataset name.
EPR_Magic EPR_Record::magic |
The magic number for this structure.
IMPORTANT: This must always be the first member of this structure.
EPR_SRecordInfo* EPR_Record::info |
The corresponding record info for this record (a 'soft' pointer).
uint EPR_Record::num_fields |
The number of fields contained in this record.
The value is always equal info->field_infos->length
and is provided here for convenience only.
EPR_SField** EPR_Record::fields |
The record fields.
An array of EPR_Field*
of length info->num_fields
EPR_Magic EPR_Field::magic |
The magic number for this structure.
IMPORTANT: This must always be the first member of this structure.
EPR_SFieldInfo* EPR_Field::info |
The corresponding field info for this field.
supplierCardinality 1
void* EPR_Field::elems |
The elements of this field.
In order to use the data, this member must be casted to one of the following array data types:
unsigned char*
- array of unsigned 8-bit integer elementschar*
- array of signed 8-bit integer fieldsunsigned short*
- array of unsigned 16-bit integer elementsshort*
- array of signed 16-bit integer elementsunsigned int*
- array of unsigned 32-bit integer elementsint*
- array of signed 32-bit integer elementsfloat*
- array of signed 32-bit floating point elementsdouble*
- array of signed 64-bit floating point elementsEPR_STime*
- array of MJD elementsDedicated access routine are available The element type is given by info->data_type_id
and the array length by info->num_elems
.
EPR_Magic EPR_Raster::magic |
The magic number for this structure.
IMPORTANT: This must always be the first member of this structure.
EPR_EDataTypeId EPR_Raster::data_type |
The data type of the band's pixel values.
All corresponding with EPR_DataTypeId types are possible
uint EPR_Raster::elem_size |
The size in byte of a single element (sample) of this raster's buffer.
uint EPR_Raster::source_width |
The width of the source .
uint EPR_Raster::source_height |
The height of the source.
uint EPR_Raster::source_step_x |
The sub-sampling for the across-track direction in pixel.
uint EPR_Raster::source_step_y |
The sub-sampling for the along-track direction in pixel.
uint EPR_Raster::raster_width |
The width of the raster in pixel.
raster_width = (source_width - 1) / source_step_x + 1
uint EPR_Raster::raster_height |
The height of the raster in pixel.
raster_height = (source_height - 1) / source_step_y + 1
void* EPR_Raster::buffer |
The elements of this raster.
Its volume is raster_width * raster_height * sizeof(data_type) in bytes.
EPR_SDatasetId* EPR_DatasetRef::dataset_id |
int EPR_DatasetRef::field_index |
int EPR_DatasetRef::elem_index |
EPR_Magic EPR_FlagDef::magic |
The magic number for this structure.
IMPORTANT: This must always be the first member of this structure.
char* EPR_FlagDef::name |
The flag name.
uint EPR_FlagDef::bit_mask |
The bit mask describing this flag.
char* EPR_FlagDef::description |
The flag description.
EPR_Magic EPR_BandId::magic |
The magic number for this structure.
IMPORTANT: This must always be the first member of this structure.
EPR_SProductId* EPR_BandId::product_id |
The ID of the product to which this band belongs to.
char* EPR_BandId::band_name |
The name as presented to the user in a band selection dialog (also known as spectral subset)
int EPR_BandId::spectr_band_index |
The (zero-based) spectral band index.
-1 if this is not a spectral band.
EPR_SDatasetRef EPR_BandId::dataset_ref |
The reference of the source dataset containing the raw data used to create the band's pixel values.
The external format used in the DDDB is MDS-name.field
, where field
is a one-based index (field=1 corresponds to the first field)
EPR_ESampleModel EPR_BandId::sample_model |
The sample model operation applied to the source dataset for getting the correct samples from the MDS (for example MERIS L2).
Possible values are:
*
--> no operation (direct copy)1OF2
--> first byte of 2-byte interleaved MDS2OF2
--> second byte of 2-byte interleaved MDS0123
--> combine 3-bytes interleaved to 4-byte integer EPR_EDataTypeId EPR_BandId::data_type |
The data type of the band's pixel values.
Possible values are:
*
--> the datatype remains unchanged.uint8_t
--> 8-bit unsigned integeruint32_t
--> 32-bit unsigned integerFloat
--> 32-bit IEEE floating point EPR_EScalingMethod EPR_BandId::scaling_method |
The scaling method which must be applied to the raw source data in order to get the 'real' pixel values in geo-physical units.
Possible values are:
*
--> no scaling appliedLinear_Scale
--> linear scaling applied: y = offset + scale * xLog_Scale
--> logarithmic scaling applied: y = log10(offset + scale * x) float EPR_BandId::scaling_offset |
The scaling offset.
Possible values are:
*
--> no offset provided (implies scaling_method=*)const
--> a floating point constantGADS.field[.field2]
--> value is provided in global annotation dataset with name GADS
in field field
. Optionally a second element index for multiple-element fields can be given too float EPR_BandId::scaling_factor |
The scaling factor.
Possible values are:
*
--> no factor provided (implies scaling_method=*)const
--> a floating point constantGADS.field[.field2]
--> value is provided in global annotation dataset with name GADS
in field field
. Optionally a second element index for multiple-element fields can be given too char* EPR_BandId::bm_expr |
A bit-mask expression used to filter valid pixels.
All others are set to zero.
EPR_SPtrArray* EPR_BandId::flag_coding |
The flag coding is a list of EPR_SFlag instances.
It determines each of the flags used in this band (= flags dataset). Each flag has a name, a bit-index and a description.
char* EPR_BandId::unit |
The geophysical unit for the band's pixel values.
char* EPR_BandId::description |
A short description of the band's contents.
epr_boolean EPR_BandId::lines_mirrored |
If true (=1) lines will be mirrored (flipped) after read into a raster in order to ensure a pixel ordering in raster X direction from WEST to EAST.
int EPR_Time::days |
uint EPR_Time::seconds |
uint EPR_Time::microseconds |
Generated on Sun Nov 26 2023 08:06:45
ENVISAT Product Reader C API
Written by
Brockmann Consult,
© 2002