GetGTXLongitude returns a longitude and East/West position from the GeoTAX database look up.
Syntax
GetGTXLongitude (&stGTXAddr, szLongitude, &cLongDir, lFixedString);
Parameters
GEOTAXADDRESS stGTXAddr; /* input address information (see below) */
char* szLongitude; /* 7 character Longitude in degrees with 4 decimal positions */
char* cLongDir; /* Direction East/West */
long lFixedString; /* String termination flag */
Input Structure
Elements |
Data Type |
Description |
---|---|---|
szAddrLine1 |
char[100+1] |
Primary address line. |
szAddrLine2 |
char[100+1] |
Secondary address line. |
szAddrLine3 |
char[100+1] |
Tertiary address line. |
szCity |
char[50+1] |
City Line. |
szState |
char[50+1] |
State line. |
szZIP |
char[9+1] |
9-digit ZIP Code. |
Output Structure
Elements |
Data Type |
Description |
---|---|---|
szLongitude |
char[7+1] |
7-character longitude in degrees with 4 decimal positions. |
cLongDir |
char |
Direction: E EastW West |
Code Example
#include "geotax.h"
GEOTAXADDRESS stGTXAddr;
char szLongitude [7+1];
char cLongDir;
long lFixedString;
long lReturnCode;
.
.
.
strcpy (stGTXAddr.szAddrLine1, "4200 Parliament Place");
strcpy (stGTXAddr.szAddrLine2, "Suite 600");
strcpy (stGTXAddr.szAddrLine3, " ");
strcpy (stGTXAddr.szCity, "Lanham");
strcpy (stGTXAddr.szState, "MD");
strcpy (stGTXAddr.szZIP, "207061844");
lFixedString = 0;
lReturnCode = GetGTXLongitude(&stGTXAddr, szLongitude, &cLongDir, lFixedString);
if (lReturnCode == GTXAPI_SUCCESS)
printf ("Output Longitude is: %s%c\n ", szLongitude, cLongDir);