GIS_GEOCODE_ADDR: Geocoding a Complete Address

How to:

GIS_GEOCODE_ADDR uses a GIS geocoding service to obtain the geometry point for a complete address.

Syntax: How to Geocode a Complete Address

GIS_GEOCODE_ADDR(address[, country])

where:

address

Fixed length alphanumeric

Is the complete address to be geocoded.

country

Fixed length alphanumeric

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

Example: Geocoding a Complete Address

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.

WebFOCUS

Feedback