pe_factory_gtlist

Creates a list of geographic transformations that transform between two coordinate systems

Usage syntax

PE_GTLIST_T * pe_factory_gtlist (PE_COORDSYS cs1, PE_COORDSYS cs2, int steps, int *n);

Parameters
cs1 The source coordinate system
cs2 The target coordinate system
steps The number of steps to return (1 or 2)
n The number of rows in the gtlist is returned in this parameter
Description

The gtlist is an array with the following structure: 

typedef struct pe_gtlist_t
{
int steps; /* number of geogtrans (1 or 2) in this entry */
int dir1; /* direction of 1st geogtran */
int dir2; /* direction of 2nd geogtran (or -1) */
int code1; /* 1st geogtran code */
int code2; /* 2nd geogtran code (or 0) */
char name1[PE_NAME_MAX]; /* 1st geogtran name */
char name2[PE_NAME_MAX]; /* 2nd geogtran name (or " " if steps is 1)*/
PE_GEOGTRAN geogtran1; /* 1st geogtran */
PE_GEOGTRAN geogtran2; /* 2nd geogtran (or NULL) */
};

The pe_factory_gtlist function creates a list of geographic transformations that will convert between the given coordinate systems. If a direct transformation is not available, it is often possible to link two transformations that use a common third transformation to convert between the two coordinate systems. If you set the steps parameter to one, only direct transformations are returned. If steps is set to two, both direct and two-step transformations are returned.

In the pe_gtlist_t structure, the steps value indicates whether the current entry is direct or two-step. Geographic transformations are always defined in a particular direction, so the dir1 and dir2 parameters show in which direction the first and second transformations should be applied. A value of zero indicates that the transformation should be applied in the same direction that it is defined.

If PEOBJEDITHOME is set, the table will include user-defined geographic transformation objects. Free the table with pe_factory_gtlist_del.

Returns

On success, returns the pe_gtlist_t structure; on failure, returns a null pointer