How to: |
GIS_GEOCODE_ADDR uses a GIS geocoding service to obtain the geometry point for a complete address.
Note: This function uses GIS services and requires an Esri ArcGIS adapter connection with named credentials.
GIS_GEOCODE_ADDR(address[, country])
where:
Fixed length alphanumeric
Is the complete address to be geocoded.
Fixed length alphanumeric
Is a country name, which is optional if the country is the United States.
The following request creates a complete address by concatenating the street address, city, state, and ZIP code. It then uses GIS_GEOCODE_ADDR to create a GIS point for the address.
DEFINE FILE WF_RETAIL_LITE GADDRESS/A200 =ADDRESS_LINE_1 || ' ' | CITY_NAME || ' ' | STATE_PROV_NAME || ' ' | POSTAL_CODE; GEOCODE1/A200 = GIS_GEOCODE_ADDR(GADDRESS); 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.