473,399 Members | 3,656 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

[Q] oracle spatial functions

Hi,

I'm using Oracle 9i with the spatial option. It seems that the
spatial function, e.g., SDO_NN, does not consider the
3rd element in a point. I tried the following script to create
a table, insert 2 points, create an index, and to query
the table using SDO_NN.

-------------------< script for Oracle >----------------------
create table test (shape MDSYS.SDO_GEOMETRY);

insert into test values (
MDSYS.SDO_GEOMETRY(
3001,
NULL,
MDSYS.SDO_POINT_TYPE(3,4,10),
NULL,
NULL));
insert into test values (
MDSYS.SDO_GEOMETRY(
3001,
NULL,
MDSYS.SDO_POINT_TYPE(3,5,1),
NULL,
NULL));

insert into user_sdo_geom_metadata
values (
'test',
'shape',
mdsys.sdo_dim_array(
mdsys.sdo_dim_element('X', 0, 20, 0.005),
mdsys.sdo_dim_element('Y', 0, 20, 0.005),
mdsys.sdo_dim_element('Z', 0, 20, 0.005)
),
NULL
);

create index test_idx on test (shape)
indextype is mdsys.spatial_index;

select * from test c where
SDO_NN(c.shape, mdsys.sdo_geometry(3001, NULL, mdsys.sdo_point_type(3,4,0),
NULL, NULL), 'sdo_num_res=1')='TRUE';
## RESULT

SHAPE(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO,
SDO_ORDINATES)
---------------------------------------------------------------------------
-----
SDO_GEOMETRY(3001, NULL, SDO_POINT_TYPE(3, 4, 10), NULL, NULL)
-------------------< script for Oracle >----------------------

If the 3rd element of a point is considered, but result should be (3,5,1), I
guess. But, the query gives (3,4,10), instead. I'm wondering if the spatial
functions in Oracle really doesn't consider the 3rd element of a point, or
if there is something that I'm missing here. If Oracle doesn't support it,
is there a workaround or something like that?

Any comments would be appreciated.

Thanks in advance,
Kiyoung..
Jul 19 '05 #1
0 5137

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

125
by: Rhino | last post by:
One of my friends, Scott, is a consultant who doesn't currently have newsgroup access so I am asking these questions for him. I'll be telling him how to monitor the answers via Google Newsgroup...
2
by: Belinda | last post by:
Hi. I am just getting started with DB2's spatial extender and could really use some help. Pointers to good docs or examples are welcome. I am using DB2 version 8 on Sun. I have a database of...
56
by: Ashish Patankar | last post by:
I want to migrate my Oracle 10g database to Db2. I want some documentation for the comparision between these to databases. I also want to know which features of Oracle 10g are supported by Db2 and...
2
by: Vinod Sadanandan | last post by:
All, Below listed are the new features in Oracle 11g ,please join me in this discussion to generate a testcase and analyze each of the listed features . Precompilers:...
3
by: san1014 | last post by:
hi all, Iam new to Oracle Spatial iam using JBO:Oracle spatial data viewer to display the shape files of the polygons. iam able to get the manually but iam unable to display the polygon...
1
by: yneeraja | last post by:
hi all, Iam new to oracle spatial please suggest me an open source for displaying the .shp files ie spatial data using purely java swing and oracle. please help me out . thanks in advance.
0
by: Kiyoung Yang | last post by:
Hi, I'm using Oracle 9i with the spatial option. It seems that the spatial function, e.g., SDO_NN, does not consider the 3rd element in a point. I tried the following script to create a table,...
5
by: Martin Solveig | last post by:
Hello, SLES9 SP1 is on PIII with two 800MHz procesors and 2GB RAM, on four SATA 156GBhard disks are created two RAID1 arays, on one RAID is OS with 1GB swap and Oracle 10.1.0.4 enterprise edition,...
2
by: Ken Fine | last post by:
I have a database of lat/long positions. What I want to be able to do is to be able to filter that database based on a selection by the user. In other words the user picks point X and I want to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.