GIS_GEOCODE_ADDR_CITY: Geocoding an Address Line, City, and State

How to:

GIS_GEOCODE_ADDR_CITY uses a GIS geocoding service to obtain the geometry point for an address line, city, state, and optional country. The returned value is a fixed length alphanumeric format, large enough to hold the JSON describing the geographic location (for example, A200).

Note: This function uses GIS services and requires an Esri ArcGIS adapter connection with named credentials.

Syntax: How to Geocode an Address Line, City, and State

GIS_GEOCODE_ADDR_CITY( street_addr, city , state [, country])

where:

street_addr

Fixed length alphanumeric

Is the street address to be geocoded.

city

Fixed length alphanumeric

Is the city name associated with the street address.

state

Fixed length alphanumeric

Is the state name associated with the street address.

country

fixed length alphanumeric

Is a country name, which is optional if the country is the United States.

Example: Geocoding a Street Address, City, and State

The following request geocodes a street address using GIS_GEOCODE_ADDR_CITY.

DEFINE FILE WF_RETAIL_LITE
GEOCODE1/A200 = GIS_GEOCODE_ADDR_CITY(ADDRESS_LINE_1, CITY_NAME , STATE_PROV_NAME); 
END
TABLE FILE WF_RETAIL_LITE
PRINT ADDRESS_LINE_1 AS Address GEOCODE1
BY POSTAL_CODE AS Zip
WHERE CITY_NAME EQ 'New York'
WHERE POSTAL_CODE FROM '10013' TO '10020'
ON TABLE SET PAGE NOPAGE
END

The output is shown in the following image.