25.04.2013 Views

View PDF

View PDF

View PDF

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SDO_GCDR.GEOCODE<br />

SDO_GCDR.GEOCODE<br />

Format<br />

Description<br />

Parameters<br />

Usage Notes<br />

Examples<br />

SDO_GCDR.GEOCODE(<br />

username IN VARCHAR2,<br />

addr_lines IN SDO_KEYWORDARRAY,<br />

country IN VARCHAR2,<br />

match_mode IN VARCHAR2<br />

) RETURN SDO_GEO_ADDR;<br />

Geocodes an unformatted address and returns the result as an SDO_GEO_ADDR<br />

object.<br />

username<br />

Name of the user that owns the tables containing the geocoding data.<br />

addr_lines<br />

An array of quoted strings representing the unformatted address to be geocoded. The<br />

SDO_KEYWORDARRAY type is described in Section 11.2.3.<br />

country<br />

Country name or ISO country code.<br />

match_mode<br />

Match mode for the geocoding operation. Match modes are explained in Section 11.1.2.<br />

This function returns an object of type SDO_GEOR_ADDR, which is described in<br />

Section 11.2.1. It performs the same operation as the SDO_GCDR.GEOCODE_AS_<br />

GEOMETRY function; however, that function returns an SDO_GEOMETRY object.<br />

The following example geocodes the address of City Hall in San Francisco, California,<br />

using the RELAX_BASE_NAME match mode. It returns the longitude and latitude<br />

coordinates of this address as -122.41815 and 37.7784183, respectively.<br />

SELECT SDO_GCDR.GEOCODE('SCOTT', SDO_KEYWORDARRAY('1 Carlton B Goodlett Pl',<br />

'San Francisco, CA 94102'), 'US', 'RELAX_BASE_NAME') FROM DUAL;<br />

SDO_GCDR.GEOCODE('SCOTT',SDO_KEYWORDARRAY('1CARLTONBGOODLETTPL','SANFRANCISCO<br />

--------------------------------------------------------------------------------<br />

SDO_GEO_ADDR(0, SDO_KEYWORDARRAY(), NULL, 'CARLTON B GOODLETT PL', NULL, NULL, '<br />

SAN FRANCISCO', NULL, 'CA', 'US', '94102', NULL, '94102', NULL, '1', 'CARLTON B<br />

GOODLETT', 'PL', 'F', 'F', NULL, NULL, 'L', .01, 23614360, '????#ENUT?B281CP?',<br />

1, 'RELAX_BASE_NAME', -122.41815, 37.7784183, '????0101010??000?')<br />

23-2 Oracle Spatial Developer’s Guide

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!