SE_shape_generate_polygon

Generates a polygon shape from an array of points.

Usage syntax

LONG SE_shape_generate_polygon (LONG num_pts, LONG num_parts, LONG *part_offsets, SE_POINT *point_array, LFLOAT *z, LFLOAT *measure, SE_SHAPE tgt_shape);

Parameters
num_pts The number of points to generate the polygon shape from
num_parts The number of parts contained in the point array
part_offsets An array of indices into the point_array delineating each shape part. This may be NULL if num_parts is 1.
point_array The array of x,y coordinates
z The array of z-coordinates, if needed
measure A pointer to the measures, if needed
tgt_shape A handle to an active shape object, returned as the new polygon shape
Description

Generates a polygon shape from an array of points. If the z or measure array values are null, the resulting shape won’t contain elevations or measures.

Returns

SE_SUCCESS
SE_COORD_OUT_OF_BOUNDS

SE_INVALID_PARAM_VALUE

SE_INVALID_PART_OFFSET

SE_INVALID_POINTER

SE_INVALID_SHAPE

SE_INVALID_SHAPE_OBJECT

SE_OUT_OF_CLMEM

SE_READ_ONLY_SHAPE

Notes

•  If you pass a shape returned from SE_stable_search or SE_stable_get_shape to ‘tgt_shape’, the SE_READ_ONLY_SHAPE error is returned.

•  Ignores any CAD data in the source shape, and removes any CAD data in the target shape.