Spatial (MOSC)

MOSC Banner

Extract Latitude / Longitude from SDO_POINT

edited Jan 27, 2011 3:44AM in Spatial (MOSC) 2 commentsAnswered ✓
 Oracle 11G Enterprise Edition

SQL> desc mps
 Name                                      Null?    Type
 ----------------------------------------- -------- -------------------
 NAME                                      NOT NULL VARCHAR2(30)
 GEOMETRY                                           MDSYS.SDO_GEOMETRY

SQL> select * from mps where name = '1';

NAME
------------------------------
GEOMETRY(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES
------------------------------------------------------------------------------

1
SDO_GEOMETRY(2001, 8307, SDO_POINT_TYPE(42.9138, -85.5287, NULL), NULL, NULL)

I want to perform a select to show the 42.9138 for example ... so something to the effect

select geometry.x from mps where name = 1;

How is this done ?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center