O'Reilly logo

Pro Oracle Spatial for Oracle Database 11g by Ravi Kothuri, Euro Beinat, Albert Godfrind

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

CHAPTER 7Manipulating SDO_GEOMETRY in Application Programs

So far, you have seen how to define and load spatial objects using the SDO_GEOMETRY type. You have also seen how to read spatial objects from SQL using SQL*Plus. In this chapter, we cover how to manipulate SDO_GEOMETRY types in the PL/SQL and Java programming languages.

Note that there are actually few occasions when you need to write explicit code to manipulate SDO_GEOMETRY types in your application. In most cases, you can directly examine the contents of an SDO_GEOMETRY in SQL. For instance, you can obtain the geographical coordinates from an SDO_GEOMETRY object as shown in Listing 7-1.

Listing 7-1. Extracting Coordinates

SQL> SELECT b.name, b.location.sdo_point.x b_long, b.location.sdo_point.y ...

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