10.12.2012 Views

Oracle Spatial User's Guide and Reference - InfoLab

Oracle Spatial User's Guide and Reference - InfoLab

Oracle Spatial User's Guide and Reference - InfoLab

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C<br />

Complex <strong>Spatial</strong> Queries: Examples<br />

This appendix provides examples, with explanations, of queries that are more<br />

complex than the examples in the reference chapters in Part II, "<strong>Reference</strong><br />

Information". This appendix focuses on operators that are frequently used in <strong>Spatial</strong><br />

applications, such as SDO_WITHIN_DISTANCE <strong>and</strong> SDO_NN.<br />

This appendix is based on input from <strong>Oracle</strong> personnel who provide support <strong>and</strong><br />

training to <strong>Spatial</strong> users. The <strong>Oracle</strong> <strong>Spatial</strong> training course covers many of these<br />

examples, <strong>and</strong> provides additional examples <strong>and</strong> explanations.<br />

Before you use any of the examples in this appendix, be sure you underst<strong>and</strong> the<br />

usage <strong>and</strong> reference information for the relevant operator or function in Part I,<br />

"Conceptual <strong>and</strong> Usage Information" <strong>and</strong> Part II, "<strong>Reference</strong> Information".<br />

This appendix contains the following major sections:<br />

■ Section C.1, "Tables Used in the Examples"<br />

■ Section C.2, "SDO_WITHIN_DISTANCE Examples"<br />

■ Section C.3, "SDO_NN Examples"<br />

■ Section C.4, "SDO_AGGR_UNION Example"<br />

C.1 Tables Used in the Examples<br />

The examples in this appendix refer to tables named GEOD_CITIES, GEOD_<br />

COUNTIES, <strong>and</strong> GEOD_INTERSTATES, which are defined as follows:<br />

CREATE TABLE GEOD_CITIES(<br />

LOCATION SDO_GEOMETRY,<br />

CITY VARCHAR2(42),<br />

STATE_ABRV VARCHAR2(2),<br />

POP90 NUMBER,<br />

Complex <strong>Spatial</strong> Queries: Examples C-1

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

Saved successfully!

Ooh no, something went wrong!