pe_factory_coderanges_geogcs

Creates a list of code ranges for the predefined geographic coordinate systems.

Usage syntax

const PE_CODERANGES_T * pe_factory_coderanges_geogcs (void);

Parameters
Description

Each predefined object has a code or ID. An particular object will have a code in a specific range. For instance, one of the code ranges for spheroids is 6000-6999.

The function returns the following structure:

struct pe_coderanges_t
{
   int                numranges; /* number of entries in the ranges structure */
   const PE_RANGE_T * ranges;    /* range entries                             */
} PE_CODERANGES_T;

In turn, the ranges structure is:

struct pe_range_t
{
   int  min_code;               /* starting code in this range */
   int  max_code;               /* ending code in this range   */
   char auth_name[PE_NAME_MAX]; /* authority name              */
   char auth_ver[PE_NAME_MAX];  /* authority version           */
} PE_RANGE_T;
Returns

On success, the structure. On failure, a null pointer.

Examples
const PE_CODERANGES_T *geogcs_ranges;
int num, i;

geogcs_ranges = pe_factory_coderanges_geogcs();
num = geogcs_ranges->numranges;

for ( i=0; i<num; i++ )
{
   printf("%8s\t%8s\n",geogcs_ranges->ranges[i].auth_name,geogcs_ranges->ranges[i].auth_ver);
   printf("%d - %d\n",geogcs_ranges->ranges[i].min_code,geogcs_ranges->ranges[i].max_code);
}