GTXMatchLatLong - GeoTAX_Premium - 7 - 7.7

GeoTAX Premium for Windows, UNIX/Linux, and z/OS

Product type
Software
Portfolio
Verify
Product family
Geo Addressing
Product
GeoTAX Premium
Version
7.7
Language
English
Product name
GeoTAX Premium
Title
GeoTAX Premium for Windows, UNIX/Linux, and z/OS
Copyright
2023
First publish date
1998
ft:lastEdition
2023-10-19
ft:lastPublication
2023-10-19T16:49:54.924301

The GTXMatchLatLong function takes an input latitude/longitude coordinate, matches it to the GeoTAX database and returns information obtained about the coordinate.

Syntax

GTXMatchLatLong (&stLatLongMatIn, &stGTXOut, lFixedString);

Parameters

LATLONGMATCHINP stLatLongMatIn; /* input structure for LATLONGMATCHINP (see below) */
GTXOUTPUT stGTXOut;             /* output structure for GeoTAX information                     obtained for the input Lat/Long */
long lFixedString;              /* String termination flag */

Input Structure

Elements

Data Type

Required

Description

szLatitude

char[11+1]

Yes

Latitude of the input coordinate

Format is:"  90.000000" or "   90000000"

szLongitude

char[11+1]

Yes

Longitude of the input coordinate

Format is:"-180.000000" or " -180000000"

Output Structure

The information obtained for the input coordinates is stored in the GTXOUTPUT structure; refer to Table 5 on page 175 for the definition of the GTXOUTPUT structure.

Code Example

#include “geotax.h”
LATLONGMATCHINP stLatLongMatIn;
GTXOUTPUT stGTXOut;
long lFixedString;
long lReturnCode;
.
.
.
strcpy (&stLatLongMatIn.szLatitude, "  40.017985");
strcpy (&stLatLongMatIn.szLongitude, "-105.240762" );
lFixedString = 0;
 
lReturnCode = GTXMatchLatLong (&stLatLongMatIn, &stGTXOut, lFixedString);
 
if (lReturnCode == GTXAPI_SUCCESS)
   {
      printf (“\nLatitude: %s%c Longitude: %s%c\n”,
      stGTXOut.szLatitude,stGTXOut.cLatDir,
      stGTXOut.szLongitude, stGTXOut.cLongDir);
    printf (“County, state: %s, %s\n\n”, stGTXOut.szCountyName, stGTXOut.szState);
   }