473,915 Members | 4,411 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 5187

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

Similar topics

125
15544
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 DB2 but have never used Oracle so I can't make any meaningful comparisons for him. He does not have...
2
3167
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 chromosomes. The database and even some tables include data on all chromosomes of several species. I am...
56
4996
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
14266
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 Precompilers: Fix Execution Plan in Pro*C/C++ and Pro*COBOL Precompilers: Flexible B Area Length...
3
1700
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
1895
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 table test (shape MDSYS.SDO_GEOMETRY);
5
4164
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 (/dev/sdb1, /dev/sdb2),then I add 4 new tablespaces with datafiles of 2GB each autoextend on 10MB,...
2
2485
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 use a database with spatial query support and write spatial queries. I'm told the other, Old Skool...
0
9881
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
11066
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
10542
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9732
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8100
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7256
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4778
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
2
4344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.