pe_vtmethod_new

Creates a new vertical transformation method

Usage syntax

PE_VTMETHOD pe_vtmethod_new (const char *name, PE_VTMETHFUNC forward, PE_VTMETHFUNC inverse);

Parameters
name Name of the new vertical transformation method
forward Forward transformation function for the new vertical transformation method
inverse Inverse transformation function for the new vertical transformation method
Description

Pe_vtmethod_new defines a new vertical transformation method with the specified attributes. The PE_VTMETHFUNC structure is:

typedef int PE_VTMETHFUNC_T(
double sph[2],
double unit_factor,
double longitude,
double axes_direction,
const double * parm,
const char * chrstr,
const int * iconst,
const float * fconst,
const double * dconst,
int n,
/* const */ double coord[][2],
double h[]);
typedef PE_VTMETHFUNC_T *PE_VTMETHFUNC;

Many vertical transformation methods require a geographic coordinate system so the spheroid parameters (semimajor axis and e2, eccentricity squared) are included. The unit_factor, longitude (prime meridian), and axes_direction are used to store information from the associated geographic or projected coordinate system. They could be used to convert the values in the vertical transformation into what is required by the transformation method. The iconst, fconst, and dconst arrays are used to store values that are constant for a particular vertical transformation. For instance, you might load file-based information into one of the arrays to improve processing. The n parameter is the number of points to be transformed, while the coord and h arrays contain the X,Y-values and Z-values.

Returns

On success, the new vertical transformation method with the attributes equal to the corresponding arguments; on failure, returns a null pointer

Examples

PE_VTMETHOD my_vtm = pe_vtmethod_new("My_VTM", &myvtm_f, &myvtm_i);