RAVE
|
Cartesian ODIM decorator. More...
#include "cartesian_odim_io.h"
#include "cartesianparam.h"
#include "rave_hlhdf_utilities.h"
#include "rave_debug.h"
#include "rave_alloc.h"
#include "raveobject_hashtable.h"
#include "odim_io_utilities.h"
#include <math.h>
#include <string.h>
#include "projection_pipeline.h"
#include <stdlib.h>
Classes | |
struct | CartesianOdimArg |
struct | _CartesianOdimIO_t |
Represents the adaptor. More... | |
Typedefs | |
typedef struct CartesianOdimArg | CartesianOdimArg |
Functions | |
int | CartesianOdimIOInternal_addLonLatExtentToAttributeList (RaveObjectList_t *attrs, Projection_t *projection, double llX, double llY, double urX, double urY) |
Adds the lon lat corner extent to the attribute list. | |
void | CartesianOdimIO_setVersion (CartesianOdimIO_t *self, RaveIO_ODIM_Version version) |
Sets the version that this io class should handle. | |
RaveIO_ODIM_Version | CartesianOdimIO_getVersion (CartesianOdimIO_t *self) |
Returns the version that this io class handles. | |
void | CartesianOdimIO_setStrict (CartesianOdimIO_t *self, int strict) |
If writing should be done strictly. | |
int | CartesianOdimIO_isStrict (CartesianOdimIO_t *self) |
If writing should be done strictly. | |
const char * | CartesianOdimIO_getErrorMessage (CartesianOdimIO_t *self) |
If an error occurs during writing, you might get an indication for why by checking the error message. | |
int | CartesianOdimIO_readCartesian (CartesianOdimIO_t *self, LazyNodeListReader_t *lazyReader, Cartesian_t *cartesian) |
Reads a cartesian from the nodelist and sets the data in the cartesian. | |
int | CartesianOdimIO_readVolume (CartesianOdimIO_t *self, LazyNodeListReader_t *lazyReader, CartesianVolume_t *volume) |
Reads a volume from the nodelist and sets the data in the volume. | |
int | CartesianOdimIO_fillImage (CartesianOdimIO_t *self, HL_NodeList *nodelist, Cartesian_t *cartesian) |
Fills a HL nodelist with information from a cartesian product. | |
int | CartesianOdimIO_fillVolume (CartesianOdimIO_t *self, HL_NodeList *nodelist, CartesianVolume_t *volume) |
Fills a HL nodelist with information from a cartesian volume. | |
int | CartesianOdimIO_isValidImageAddMsg (Cartesian_t *cartesian, char *msg, int maxlen) |
Validates an image in order to verify if it contains necessary information for writing. | |
int | CartesianOdimIO_isValidImage (Cartesian_t *cartesian) |
Validates an image in order to verify if it contains necessary information for writing. | |
int | CartesianOdimIO_isValidVolumeImageAddMsg (Cartesian_t *cartesian, char *msg, int maxlen) |
Validates an image belonging to a volume in order to verify if it contains necessary information for writing. | |
int | CartesianOdimIO_isValidVolumeImage (Cartesian_t *cartesian) |
Validates an image belonging to a volume in order to verify if it contains necessary information for writing. | |
int | CartesianOdimIO_isValidVolumeAddMsg (CartesianVolume_t *volume, char *msg, int maxlen) |
Validates an volume in order to verify if it contains necessary information for writing. | |
int | CartesianOdimIO_isValidVolume (CartesianVolume_t *volume) |
Validates an volume in order to verify if it contains necessary information for writing. | |
int | CartesianOdimIO_validateVolumeHowAttributes (CartesianOdimIO_t *self, CartesianVolume_t *volume) |
Validates a volume according to strictness and version in order to verify if it contains necessary information. | |
int | CartesianOdimIO_validateCartesianHowAttributes (CartesianOdimIO_t *self, Cartesian_t *image) |
Validates an image according to strictness and version in order to verify if it contains necessary information. | |
Variables | |
RaveCoreObjectType | CartesianOdimIO_TYPE |
Type definition to use when creating a rave object. | |
Cartesian ODIM decorator.
int CartesianOdimIO_fillImage | ( | CartesianOdimIO_t * | self, |
HL_NodeList * | nodelist, | ||
Cartesian_t * | cartesian ) |
Fills a HL nodelist with information from a cartesian product.
[in] | self | - self |
[in] | nodelist | - the node list |
[in] | cartesian | - the cartesian product |
int CartesianOdimIO_fillVolume | ( | CartesianOdimIO_t * | self, |
HL_NodeList * | nodelist, | ||
CartesianVolume_t * | volume ) |
Fills a HL nodelist with information from a cartesian volume.
[in] | self | - self |
[in] | nodelist | - the node list |
[in] | volume | - the cartesian volume |
const char * CartesianOdimIO_getErrorMessage | ( | CartesianOdimIO_t * | self | ) |
If an error occurs during writing, you might get an indication for why by checking the error message.
[in] | self | - self |
RaveIO_ODIM_Version CartesianOdimIO_getVersion | ( | CartesianOdimIO_t * | self | ) |
Returns the version that this io class handles.
[in] | self | - self |
int CartesianOdimIO_isStrict | ( | CartesianOdimIO_t * | self | ) |
If writing should be done strictly.
From ODIM H5 2.4 several how-attributes are mandatory. If any of these are missing and strict is set to true, then the writing will fail.
[in] | self | - self |
int CartesianOdimIO_isValidImage | ( | Cartesian_t * | cartesian | ) |
Validates an image in order to verify if it contains necessary information for writing.
[in] | self | - self |
[in] | cartesian | - the cartesian product to validate |
int CartesianOdimIO_isValidImageAddMsg | ( | Cartesian_t * | cartesian, |
char * | msg, | ||
int | maxlen ) |
Validates an image in order to verify if it contains necessary information for writing.
[in] | self | - self |
[in] | cartesian | - the cartesian product to validate |
[in] | msg | - message array to get indication what is wrong |
[in] | maxlen | - max length of message array |
int CartesianOdimIO_isValidVolume | ( | CartesianVolume_t * | volume | ) |
Validates an volume in order to verify if it contains necessary information for writing.
[in] | self | - self |
[in] | volume | - the volume to validate |
[in] | msg | - message array to get indication what is wrong |
[in] | maxlen | - max length of message array |
int CartesianOdimIO_isValidVolumeAddMsg | ( | CartesianVolume_t * | volume, |
char * | msg, | ||
int | maxlen ) |
Validates an volume in order to verify if it contains necessary information for writing.
[in] | self | - self |
[in] | volume | - the volume to validate |
int CartesianOdimIO_isValidVolumeImage | ( | Cartesian_t * | cartesian | ) |
Validates an image belonging to a volume in order to verify if it contains necessary information for writing.
[in] | self | - self |
[in] | cartesian | - the cartesian product to validate |
int CartesianOdimIO_isValidVolumeImageAddMsg | ( | Cartesian_t * | cartesian, |
char * | msg, | ||
int | maxlen ) |
Validates an image belonging to a volume in order to verify if it contains necessary information for writing.
[in] | self | - self |
[in] | cartesian | - the cartesian product to validate |
[in] | msg | - message array to get indication what is wrong |
[in] | maxlen | - max length of message array |
int CartesianOdimIO_readCartesian | ( | CartesianOdimIO_t * | self, |
LazyNodeListReader_t * | lazyReader, | ||
Cartesian_t * | cartesian ) |
Reads a cartesian from the nodelist and sets the data in the cartesian.
[in] | self | - self |
[in] | lazyReader | - the wrapper around the hdf5 node list |
[in] | cartesian | - the cartesian that should get the attribute and data set |
int CartesianOdimIO_readVolume | ( | CartesianOdimIO_t * | self, |
LazyNodeListReader_t * | lazyReader, | ||
CartesianVolume_t * | volume ) |
Reads a volume from the nodelist and sets the data in the volume.
[in] | self | - self |
[in] | lazyReader | - the wrapper around the hdf5 node list |
[in] | volume | - the volume that should get the attribute and data set |
void CartesianOdimIO_setStrict | ( | CartesianOdimIO_t * | self, |
int | strict ) |
If writing should be done strictly.
From ODIM H5 2.4 several how-attributes are mandatory. If any of these are missing and strict is set to true, then the writing will fail.
[in] | self | - self |
[in] | strict | - if writing should be performed strictly or not |
void CartesianOdimIO_setVersion | ( | CartesianOdimIO_t * | self, |
RaveIO_ODIM_Version | version ) |
Sets the version that this io class should handle.
[in] | self | - self |
[in] | version | - the odim version |
int CartesianOdimIO_validateCartesianHowAttributes | ( | CartesianOdimIO_t * | self, |
Cartesian_t * | image ) |
Validates an image according to strictness and version in order to verify if it contains necessary information.
[in] | self | - self |
[in] | image | - the image to validate |
int CartesianOdimIO_validateVolumeHowAttributes | ( | CartesianOdimIO_t * | self, |
CartesianVolume_t * | volume ) |
Validates a volume according to strictness and version in order to verify if it contains necessary information.
[in] | self | - self |
[in] | volume | - the volume to validate |
int CartesianOdimIOInternal_addLonLatExtentToAttributeList | ( | RaveObjectList_t * | attrs, |
Projection_t * | projection, | ||
double | llX, | ||
double | llY, | ||
double | urX, | ||
double | urY ) |
Adds the lon lat corner extent to the attribute list.
If llX, llY, urX and urY are all 0.0, then nothing will be added to the attribute list.
[in] | list | - the list to add the attributes to |
[in] | projection | - the projection to use for converting to corner coordinates |
[in] | llX | - the lower left X coordinate |
[in] | llY | - the lower left Y coordinate |
[in] | urX | - the upper right X coordinate |
[in] | urY | - the upper right Y coordinate |
RaveCoreObjectType CartesianOdimIO_TYPE |
Type definition to use when creating a rave object.