pe_horizon_pcs_raster_generate |
Returns the projected horizon for a projected coordinate system for use with raster data.
PE_HORIZON pe_horizon_pcs_raster_generate(PE_PROJCS projcs);
projcs | A valid projected coordinate system object. |
Currently, this function only works with the Cube and Fuller projections.
A projected horizon defines the valid area of use for a particular projected
coordinate system. The pe_horizon_pcs_raster_generate function returns a horizon
in the projected coordinate system. One use might be to identify whether a
user's click in a display is within the valid area of current projected
coordinate system. The horizon structure is:
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. Projected horizons are returned in the units of the
projected coordinate system.
Size is the number of coordinates in the part while coord is a pointer to the
array of coordinate values.
On success, a pointer to an array of horizons. On failure, a null pointer.
PE_PROJCS pcs1 = pe_factory_projcs(PE_PCS_WORLD_FULLER);
PE_HORIZON *pcs_horz = pe_horizon_pcs_raster_generate(pcs1);