pe_horizon_pcs_generate |
Returns the projected horizon for a projected coordinate system.
PE_HORIZON pe_horizon_pcs_generate(PE_PROJCS projcs);
projcs | A valid projected coordinate system object. |
A projected horizon defines the valid area of use for a particular projected
coordinate system. The pe_generate_horizon returns a horizon in the geographic
coordinate system so that the horizon can be used to clip features. The
pe_horizon_pcs_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
Projected horizons are always inclusive and do not need to be replicated.
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_WGS_1984_UTM_11N);
PE_HORIZON *pcs_horz = pe_horizon_pcs_generate(pcs1);