How to: |
Given longitude and latitude values and the name of a geographic component, GIS_REVERSE_COORDINATE returns the specified geographic component values associated with those coordinates.
GIS_REVERSE_COORDINATE(longitude, latitude, component)
where:
Numeric
Is the longitude of the component to return.
Numeric
Is the latitude of the component to return.
Keyword
Is one of the following components:
The value is returned as text and can be assigned to a field with text or alphanumeric (fixed or variable length) format.
The following request uses city longitude and city latitude to return the matching address, postal code, region, and subregion.
TABLE FILE WF_RETAIL_GEOGRAPHY
SUM FST.CITY_LONGITUDE AS Longitude FST.CITY_LATITUDE AS Latitude
COMPUTE MatchingAddress/A250 = GIS_REVERSE_COORDINATE(CITY_LONGITUDE, CITY_LATITUDE, MATCH_ADDRESS);
PostalCode/A250 = GIS_REVERSE_COORDINATE(CITY_LONGITUDE, CITY_LATITUDE, POSTAL);
Region/A250 = GIS_REVERSE_COORDINATE(CITY_LONGITUDE, CITY_LATITUDE, REGION);
Subregion/A250 = GIS_REVERSE_COORDINATE(CITY_LONGITUDE, CITY_LATITUDE, SUBREGION);
BY CITY_NAME AS City
WHERE COUNTRY_NAME EQ 'United States'
WHERE TOTAL PostalCode NE ' '
WHERE RECORDLIMIT EQ 20
ON TABLE SET PAGE NOLEAD
END
The output is shown in the following image.
WebFOCUS | |
Feedback |