473,574 Members | 2,219 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[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_GEOME TRY);

insert into test values (
MDSYS.SDO_GEOME TRY(
3001,
NULL,
MDSYS.SDO_POINT _TYPE(3,4,10),
NULL,
NULL));
insert into test values (
MDSYS.SDO_GEOME TRY(
3001,
NULL,
MDSYS.SDO_POINT _TYPE(3,5,1),
NULL,
NULL));

insert into user_sdo_geom_m etadata
values (
'test',
'shape',
mdsys.sdo_dim_a rray(
mdsys.sdo_dim_e lement('X', 0, 20, 0.005),
mdsys.sdo_dim_e lement('Y', 0, 20, 0.005),
mdsys.sdo_dim_e lement('Z', 0, 20, 0.005)
),
NULL
);

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

select * from test c where
SDO_NN(c.shape, mdsys.sdo_geome try(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(30 01, 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 5157

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

Similar topics

125
15337
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 searches. Scott has heard a lot of hype about DB2 and Oracle and is trying to understand the pros and cons of each product. I'm quite familiar with...
2
3128
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 genomic data and believe the spatial extender will help in querying. I have to do intersections, subtractions, proximity, etc of ranges in the...
56
4902
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 which are not supported.
2
14220
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: Additional Array INSERT and SELECT Syntax Support by Pro*C/C++ and Pro*COBOL Precompilers: Dynamic SQL Statement Caching in Pro*C/C++ and Pro*COBOL ...
3
1673
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 there is a java file displayManager viz iam getting an error please check the code and answer me back here iam sending my code
1
1882
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
573
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, insert 2 points, create an index, and to query the table using SDO_NN. -------------------< script for Oracle >---------------------- create...
5
4145
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, on second RAID are two raw partitions each 70GB .... I start DBCA custom database and configure one ASM disk group by using two raw partitions...
2
2468
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 know all the locations in my DB that are within say, 50 feet or 500 feet of that point. I am told there are several ways to do this. One way is to...
0
7803
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7720
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8044
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7810
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8096
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5618
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3749
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2240
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1056
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.