GsCityDataGet - 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

Retrieves data located with GsCityFindFirst() or GsCityFindNext().

Syntax

GsFunStat GsCityDataGet (GsId gs, intlu rec, GsEnum which,pstr pbuffer, int bufSize);

Arguments

GsIdgs   ID returned by GsInitWithProps() for the current instance of GeoStan. Input.

intlurec   City record number, as returned by GsCityFindFirst() or GsCityFindNext(). Input.

GsEnumwhich    Symbolic constant for the data item to retrieve. Input.

The following table lists the valid GsEnums for most languages and the returned data sizes (including NULL characters).

GsEnum

Size

Description

GS_CITY_CARRTSORT

(2)

•Y – Carrier Route Sort

•N – No Carrier Route Sort

GS_CITY_CITYDELV

(2)

•Y – Post Office has city-delivery carrier routes

•N – Post Office does not have city-delivery carrier routes

GS_CITY_CLASS

(2)

ZIP Classification Code.

GS_CITY_CTYSTKEY

(7)

Returns the 6-character USPS City State Key, which uniquely identifies a locale in the city/state file.

GS_CITY_FACILITY

(2)

Returns the USPS City State Name Facility Code:

•A – Airport Mail Facility (AMF)

•B – Branch

•C – Community Post Office (CPO)

•D – Area Distribution Center (ADC)

•E – Sectional Center Facility (SCF)

•F – Delivery Distribution Center (DDC)

•G – General Mail Facility (GMF)

•K – Bulk Mail Center (BMC)

•M – Money Order Unit

•N – Non-Postal Community Name, Former Postal Facility, or Place Name

•P – Post Office

•S – Station

•U – Urbanization

GS_CITY_IS_ABBREV

(2)

•Y -  If the current record is the 13-character USPS city name.

•N - If the full city name.

GS_CITY_MAILIND

(2)

•Y – Can use City State Name as last line on a mail piece

•N – Cannot use City State Name as last line on a mail piece

GS_CITY_NAME

(30)

City name. May be an alternative name.

GS_CITY_PREFNAME

(30)

Returns the USPS preferred city name.

GS_CITY_QCITY

(10)

City number; using the format ssffffccc, where s=state number, f=finance number, and c=city number.

GS_CITY_UNIQUE

(2)

•Y – Unique ZIP Code (ZIP assigned to a single organization.)

•Blank – Not applicable

GS_CITY_STATE

(3)

State abbreviation

GS_CITY_ZIP

(6)

ZIP Code

pstrpbuffer   Location to store the returned data. Output.

intbufSize   Maximum size of data to return in the buffer. If bufSize is shorter than the data returned by GeoStan, GeoStan truncates the data and does not generate an error. Input.

Return Values

GS_SUCCESS

GS_ERROR

Prerequisites

GsCityFindFirst() or GsCityFindNext()

Notes

The GsCityDataGet() function retrieves data about the city located with GsCityFindFirst() or GsCityFindNext(). GeoStan derives city information from the USPS City/State file.

Example

See GsCityFindFirst for an example.