24.8 SDO_GCDR.GEOCODE_ADDR_ALL
Format
SDO_GCDR.GEOCODE_ADDR_ALL( gc_username IN VARCHAR2, address IN SDO_GEO_ADDR, max_res_num IN NUMBER DEFAULT 4000 ) RETURN SDO_ADDR_ARRAY;
Description
Geocodes an input address using attributes in an SDO_GEO_ADDR object, and returns matching addresses as an SDO_ADDR_ARRAY object (described in SDO_ADDR_ARRAY Type).
Parameters
- gc_username
-
Name of the user that owns the tables containing the geocoding data.
- address
-
An SDO_GEO_ADDR object with one or more attributes set. The SDO_GEO_ADDR type is described in SDO_GEO_ADDR Type.
- max_res_num
-
Maximum number of results to return in the SDO_ADDR_ARRAY object. The default value is 4000.
Usage Notes
This function enables you to specify as many attributes in the input SDO_GEO_ADDR object as you can or want to set. It finds matching addresses (up to 4000 or the limit specified in the max_res_num
parameter), and returns an SDO_ADDR_ARRAY object in which each geocoded result has all possible attributes set.
This function performs the same operation as the SDO_GCDR.GEOCODE_ADDR function, except that it can return more than one address. See the Usage Notes for the SDO_GCDR.GEOCODE_ADDR function for more information.
Examples
The following example returns up to three geocoded results for a point of interest named CALIFORNIA PACIFIC MEDICAL CTR
. (In this case only one result is returned, because the geocoding data contains only one address matching that point of interest.) The example uses a user-defined function named create_addr_from_placename
(as defined in Example 12-2 in Geocoding from a Place Name) to construct the input SDO_GEO_ADDR object.
SELECT sdo_gcdr.geocode_addr_all('SCOTT', create_addr_from_placename('CALIFORNIA PACIFIC MEDICAL CTR', 'US'), 3) FROM DUAL; SDO_GCDR.GEOCODE_ADDR_ALL('SCOTT',CREATE_ADDR_FROM_PLACENAME('CALIFORNIAPACIF -------------------------------------------------------------------------------- SDO_ADDR_ARRAY(SDO_GEO_ADDR(0, SDO_KEYWORDARRAY(), 'CALIFORNIA PACIFIC MEDICAL C TR-SF', 'BUCHANAN ST', NULL, NULL, 'SAN FRANCISCO', NULL, 'CA', 'US', '94115', N ULL, '94115', NULL, '2333', NULL, NULL, 'F', 'F', NULL, NULL, 'L', 0, 23599031, '??????????B281CP?', 4, 'DEFAULT', -122.43097, 37.79138, '????4141114??404?'))
Parent topic: SDO_GCDR Package (Geocoding)