pe_method_new

Creates a new method.

Usage syntax

PE_METHOD pe_method_new (const char *name, PE_METHFUNC forward, PE_METHFUNC inverse);

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

Defines a new method with the specified attributes. The PE_METHFUNC structure is

     typedef int (*PE_METHFUNC)(
                      double sph1[2],
                      double sph2[2],
                      double parm[PE_PARM_MAX],
                      char   *chrstr,
                      int    n,
                      double coord[][2],
                      double h[],
                      int    iconst[],
                      float  fconst[],
                      double dconst[]);

We assume that new methods are designed for doing geographic transformations. The first two parameters are input and output spheroid parameters. The parm array contains any parameters that are needed. The n parameter is the number of points while the coord array contains the X-values and Y-values. The h array contains the Z-values. The last three parameters, iconst, fconst, and dconst arrays, store values that are constants for the life of a method object.

Returns

On success, the new method with the attributes equal to the corresponding arguments. On failure, a null pointer.

Examples

PE_METHOD cf = pe_method_new("Coord_Frame_2", &cf_f, &cf_i);