O'Reilly logo

Applying and Extending Oracle Spatial by Siva Ravada, Simon Gerard Greener

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. Use of TREAT and IS OF TYPE with ST_GEOMETRY

Understanding the TREAT operator

Chapter 11, SQL/MM – A Basis for Cross-platform, Inter-operable, and Reusable SQL introduced the Oracle MDSYS ST_GEOMETRY type hierarchy. In that chapter, the Oracle TREAT operator was required to ensure that a subtype object such as a point, when created by the ST_GEOMETRY type's GET_WKT method, was correctly understood to be an instance of that subtype (that is, ST_POINT), so that the methods particular to its subtype (for example, ST_X) can be called. This appendix examines the need for TREAT in more detail.

In the ST_GEOMETRY hierarchy, a POINT object can be created in the following two ways:

MDSYS.ST_GEOMETRY.FROM_WKT('POINT(6012578.005 2116495.361)',2872) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required