Deprecated. Only used with GsGetCoords. If using GsGetCoordsEx, use GsHandleGetCoordsEx.
Syntax
ints GsHandleGetCoords( GsId gs, GsSegmentHandle *pHandle,pintl pCoords, intsu maxPoints );
Arguments
gs ID returned by GsInit_r for the current instance of GeoStan. Input.
*pHandle Handle of the segment object for the coordinates returned. Input.
pCoords Array of coordinates, in x,y (longitude, latitude) order. Output.
maxPoints Maximum number of points that GsGetCoords returns; used to prevent writing past the end of pCoords buffer. Input.
Return Values
Number of points assigned to the buffer.
Prerequisites
GsFindFirst
or GsFindNext
Notes
This function returns an array of coordinates for the segment to which handle points.
Example
/*This example retrieves coordinates for a street segment found using GsFindFirstSegment.*/
#define MAX_POINTS 50
.
.
.
ints NumCoords;
intl Coords[MAX_POINTS *2];
NumCoords = GsHandleGetCoords(gs, &hSegment, Coords, MAX_POINTS);
for (int i = 0; i < NumCoords * 2; i += 2)
printf("Lon = %ld, Lat = %ld\n", Coords[i], Coords[i+1]);