pe_projection_horizon

Retrieves a function that calculates the horizon for a map projection

Usage syntax

PE_HORFUNC pe_projection_horizon (PE_PROJECTION projection);

Parameters
projection Map projection object
Description

Returns a function that constructs the horizon, or limits, of a projection. Each map projection has a certain limit. Many projections can map the entire world, but a few, like Transverse Mercator, are good for a limited area only. PE_HORFUNC has this structure.

 

  typedef struct pe_horizon_t {
     int nump;
     int kind;
     int inclusive;
     int replicate;
     int size;
     double *coord[2];
} *PE_HORIZON;

The nump argument is the number of parts in the horizon, while kind describes the shape type. The kind values are:

   PE_HORIZON_RECT
PE_HORIZON_POLY
PE_HORIZON_LINE
PE_HORIZON_POINT

Inclusive can have a value of 1 or 0. If 1, the horizon is inclusive. if 0, the horizon is exclusive. Horizons are returned in the units of the geographic coordinate system of the projected coordinate system. You can return one main horizon shape and tell a developer that he needs to shift the horizon by a full circle (if the geogcs units are degrees, the shift is 360 degrees) to catch other data with the replicate argument. The replicate values are:

        enum replicate_enum {
     PE_HORIZON_REPLICATE_NONE,
     PE_HORIZON_REPLICATE_LEFT,
     PE_HORIZON_REPLICATE_RIGHT,
     PE_HORIZON_REPLICATE_BOTH};

Size is the number of coordinates in the part, while coord is a pointer to the array of coordinate values.

Returns

On success, the map projection horizon. On failure, a null pointer.