24.16 SDO_GCDR.GEOCODE_AS_GEOMETRY
Format
SDO_GCDR.GEOCODE_AS_GEOMETRY( username IN VARCHAR2, addr_lines IN SDO_KEYWORDARRAY, country IN VARCHAR2 ) RETURN SDO_GEOMETRY;
Description
Geocodes an unformatted address and returns the result as an SDO_GEOMETRY object.
Parameters
- username
-
Name of the user that owns the tables containing the geocoding data.
- addr_lines
-
An array of quoted strings representing the unformatted address to be geocoded. The SDO_KEYWORDARRAY type is described in SDO_KEYWORDARRAY Type.
- country
-
Country name or ISO country code.
Usage Notes
This function returns an object of type SDO_GEOMETRY. It performs the same operation as the SDO_GCDR.GEOCODE function; however, that function returns an SDO_GEOR_ADDR object.
This function uses a match mode of 'DEFAULT'
for the geocoding operation. Match modes are explained in Match Modes.
Examples
The following example geocodes the address of City Hall in San Francisco, California. It returns an SDO_GEOMETRY object in which the longitude and latitude coordinates of this address are -122.41815 and 37.7784183, respectively.
SELECT SDO_GCDR.GEOCODE_AS_GEOMETRY('SCOTT', SDO_KEYWORDARRAY('1 Carlton B Goodlett Pl', 'San Francisco, CA 94102'), 'US') FROM DUAL; SDO_GCDR.GEOCODE_AS_GEOMETRY('SCOTT',SDO_KEYWORDARRAY('1CARLTONBGOODLETTPL',' -------------------------------------------------------------------------------- SDO_GEOMETRY(2001, 8307, SDO_POINT_TYPE(-122.41815, 37.7784183, NULL), NULL, NUL L)
Parent topic: SDO_GCDR Package (Geocoding)