SRM Reference Manual
Functions
SRM ChangeCoordinateArraySRF
extern SRM_Status_Code
SRM_ChangeCoordinateArraySRF
(
constSRM_SRF_Parameters_Pair convert_params_ptr, (notes)
SRM_Integer_Positive array_size, (notes)
constSRM_Coordinate *source_coord_array, (notes)
SRM_Coordinate *dest_coord_array (notes)
);

Definition

This function converts an array of coordinates in one SRF to an equivalent array of coordinates in another SRF.


Returns

SRM_STAT_CODE_SUCCESS and all the coordinates in dest_coord_array are set to the appropriate operation result, if valid parameters were passed in and the coordinate operation succeeded.
SRM_STAT_CODE_EXTENDED_SOURCE_COORD and all the coordinates in dest_coord_array are set to the appropriate operation result, if the operation succeeded, but one or more source coordinates fell within the "extended" range of the source SRF.
SRM_STAT_CODE_EXTENDED_DEST_COORD and all the coordinates in dest_coord_array are set to the appropriate operation result, if the operation succeeded, but one or more source coordinates (after being converted) fell within the "extended" range for the destination SRF, e.g. a GD coordinate converted to a UTM SRF and fell just outside the specified UTM zone, but not so far outside as to become invalid.
SRM_STAT_CODE_EXTENDED_SOURCE_AND_DEST_COORD and all the coordinates in dest_coord_array are set to the appropriate operation result, if the operation succeeded, but one or more source coordinates fell within the "extended" range of the source SRF, and after being converted also fell within the "extended" range for the destination SRF.

NOTE: if either ( SRM_STAT_CODE_EXTENDED_SOURCE_COORD and SRM_STAT_CODE_EXTENDED_DEST_COORD) or SRM_STAT_CODE_EXTENDED_SOURCE_AND_DEST_COORD occurs, then SRM_STAT_CODE_EXTENDED_SOURCE_AND_DEST_COORD will be returned, else either SRM_STAT_CODE_EXTENDED_SOURCE_COORD or SRM_STAT_CODE_EXTENDED_DEST_COORD will be returned accordingly

SRM_STAT_CODE_UNSUPPORTED and *dest_coord_array is left unchanged, if the coordinate operation (conversion and/or transformation) is unsupported.
SRM_STAT_CODE_INVALID_SRF_PAIR and *dest_coord_array is left unchanged, if convert_params_ptr was NULL or invalid.
SRM_STAT_CODE_INVALID_SOURCE_COORD and *dest_coord_array is left unchanged. There are two situations when this condition is returned:
  1. if source_coord_array is NULL or points to an array containing an invalid value with respect to the source SRF. If source_coord_array was not NULL, then the invalid coordinate(s) can be identified by repeatedly calling SRM_ChangeCoordinateSRF(), once for each coordinate in the array, and examining the status code for each operation.
  2. if the array_size has value zero (0).
SRM_STAT_CODE_INVALID_DEST_COORD if dest_coord_array is NULL, or points to an array containing a coordinate which after being converted is invalid for for the destination SRF, e.g. a GD coordinate of latitude 85 degrees to a UTM SRF. In this case, *dest_coord_array is left unchanged. If the dest_coord_array was not NULL, then the invalid coordinate(s) can be identified by repeatedly calling SRM_ChangeCoordinateSRF(), once for each coordinate in the array, and examining the status code for each operation.
SRM_STAT_CODE_FAILURE and *dest_coord_array is left unchanged, if the coordinate operation failed for reasons unspecified.


Parameters Notes


convert_params_ptr

 a pointer to the optimized coordinate
    operations parameters.

array_size

 the number of entries in the source and destination
    coordinate arrays, which must have the same number of entries

source_coord_array

 the array of incoming coordinates, the coordinates
    to convert

dest_coord_array

 the array where the converted coordinates will be
    stored. This can be the same location/array that source_coord_array
    points to, but it does not have to be.


Next: SRM_ChangeCoordinateArraySRFUnvalidated. Up:Index.

Last updated: May 15, 2003 Copyright © 2003 SEDRIS™