pe_horizon_gcs_raster_generate

Returns the horizon for a projected coordinate system for use with raster data.

Usage syntax

PE_HORIZON pe_horizon_gcs_raster_generate(PE_PROJCS projcs);

Parameters
projcs A valid projected coordinate system object.
Description

Currently, this function only works with the Cube and Fuller projections.

A projection horizon defines the valid area of use for a particular projected coordinate system. The pe_horizon_gcs_generate
returns a horizon in the geographic coordinate system so that the horizon can be used to clip features. 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. 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, a pointer to an array of horizons. On failure, a null pointer.

Examples

PE_PROJCS pcs1 = pe_factory_projcs(PE_PCS_WORLD_FULLER);
PE_HORIZON *gcs_horz = pe_horizon_gcs_raster_generate(pcs1);