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

Programming for cross-database deployment

The main mechanism for implementing object-relational querying is, of course, SQL. As such it is the principle element through which we should aim to use for maximal cross-database querying. In this section, we will first look at querying the basic geometry types, and then finish by putting all we have learned together to implement something of greater use in day-to-day spatial processing.

Querying ST_POINT geometries

The querying of points is quite simple:

– SQL Server 2012 Select a.geom.STX as x, a.geom.STY as y From (Select geometry::STPointFromText('POINT(301301.0 5201201.0)',28355) as geom) a; -- PostgreSQL Select ST_X(a.geom) as x, ST_Y(a.geom) as y From (Select ST_PointFromText('POINT(301301.0 5201201.0)',28355) ...

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