Home » Server Options » Spatial » spatial query
spatial query [message #75811] Wed, 30 July 2003 16:20 Go to next message
Kevin
Messages: 45
Registered: February 2000
Member
Hello,
I would like to retrieve a column from a spatial table using x,y coordinates from a point. How do I reference the sdo_geometry for that point?
Thank you,
Kev
Re: spatial query [message #75813 is a reply to message #75811] Fri, 15 August 2003 04:09 Go to previous message
Muhammad Azam
Messages: 2
Registered: August 2003
Junior Member
hi
1)if you want to retrieve the x or y or both coordinates from sdo_geometry column you can do it this way

select c.LOCATION.SDO_POINT.X,c.LOCATION.SDO_POINT.Y
from CITIES c

in above query LOCATION is the spatial (sdo_geometry) column of the table cities.

2) to get the specific cordinate apply the following query

select c.city
from cities c
where c.LOCATION.SDO_POINT.X = -71.322141
AND c.LOCATION.SDO_POINT.Y = 38.483

hope i answered your question correctly
Previous Topic: Oracle Spatial in 9i
Next Topic: please help me
Goto Forum:
  


Current Time: Thu Jul 02 15:01:13 CDT 2020