SE_shape_change_coordref

Projects a shape to a new coordinate system

Usage syntax

LONG SE_shape_change_coordref (const SE_SHAPE src_shape, SE_COORDREF coordref, PE_GEOGTRAN geogtran, SE_SHAPE tgt_shape);

Parameters
src_shape A handle to an active shape object
coordref A pointer to a coordinate reference structure that defines the new coordinate system for the shape
geogtran A pointer to a Projection Engine geographic (datum) transformation object. Can be a null pointer.
tgt_shape A handle to an active shape object, returned as the new shape
Description

Projects a shape to a new coordinate system. If geogtran is NULL, the two coordinate systems are assumed to be based on the same datum. If they are not and geogtran is NULL, the error SE_PROJECTION_ERROR is returned. If the two coordinate systems are on different datums, you must create a geographic transformation object which specifies how to convert the datums. Consider using the predefined transformations with the pe_factory functions.

For example,

PE_GEOGTRAN gt = pe_factory(PE_GT_NAD_1927_TO_WGS_1984_4);

creates a geographic transformation object that converts between NAD27 and WGS84 in the contiguous United States.

Returns

SE_SUCCESS
SE_CAD_EXISTS

SE_COORD_OUT_OF_BOUNDS

SE_INCOMPATIBLE_COORDREFS

SE_INVALID_COORDREF_OBJECT

SE_INVALID_SHAPE

SE_INVALID_SHAPE_OBJECT

SE_OUT_OF_CLMEM

SE_PROJECTION_ERROR

SE_READ_ONLY_SHAPE

SE_SHAPE_INTEGRITY_ERROR

SE_TOO_FEW_POINTS

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. See the Shape table functions for more information.

∙  If the source shape has a CAD entity, the SE_CAD_EXISTS error is returned.