GsHandleGetCoords - geostan_1 - 2024.01

GeoStan Geocoding Suite Reference for Windows, Linux, and z/OS

Product type
Software
Portfolio
Locate
Product family
GeoStan Geocoding Suite
Product
GeoStan Geocoding Suite > GeoStan
Version
2024.01
Language
English
Product name
GeoStan
Title
GeoStan Geocoding Suite Reference for Windows, Linux, and z/OS
Copyright
2024
First publish date
1994
Last updated
2024-07-29
Published on
2024-07-29T23:01:18.924000

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]);