dbTalk Databases Forums  

Oracle Spatial Selecting Overlaps returning no results (when itshould)?

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Oracle Spatial Selecting Overlaps returning no results (when itshould)? in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
john.e.major.jr@gmail.com
 
Posts: n/a

Default Oracle Spatial Selecting Overlaps returning no results (when itshould)? - 07-11-2008 , 04:26 PM






Hello-

I'm looking for advice on a problem I've hit with Oracle 10g spatial.
I am storing a large number of rows with a feature_rectangle column
defined for each entry(which is just a variable sized solid 2d
rectangle).

I have followed a table & index creation scenario like this:
http://www.oreillynet.com/pub/a/netw...e_spatial.html

and have populated my database with no errors.

When I select * from the table, I return entries which look like this:
feature_rectangle
--------------------------
(2003, , , (1, 1003,
3, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ),
(14949509, 3, 14949760,
3, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ))


However, a query like this returns no rows (even though i am defining
a rectangle which overlaps the rectangle above?!?!

select * from MYTABLENAME a where
SDO_ANYINTERACT(
a.feature_rectangle,
mdsys.SDO_GEOMETRY(2003,NULL,NULL,mdsys.SDO_ELEM_I NFO_ARRAY(1,1003,3),
mdsys.SDO_ORDINATE_ARRAY(14949508,3,14949510,3))
) = 'TRUE'

This returns no errors and no results..

any help would be greatly appreciated-thanks!
john

Reply With Quote
  #2  
Old   
Pedro Lopes
 
Posts: n/a

Default Re: Oracle Spatial Selecting Overlaps returning no results (whenit should)? - 08-05-2008 , 06:54 PM






john.e.major.jr (AT) gmail (DOT) com wrote:
Quote:
Hello-

I'm looking for advice on a problem I've hit with Oracle 10g spatial.
I am storing a large number of rows with a feature_rectangle column
defined for each entry(which is just a variable sized solid 2d
rectangle).

I have followed a table & index creation scenario like this:
http://www.oreillynet.com/pub/a/netw...e_spatial.html

and have populated my database with no errors.

When I select * from the table, I return entries which look like this:
feature_rectangle
--------------------------
(2003, , , (1, 1003,
3, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ),
(14949509, 3, 14949760,
3, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ))


However, a query like this returns no rows (even though i am defining
a rectangle which overlaps the rectangle above?!?!

select * from MYTABLENAME a where
SDO_ANYINTERACT(
a.feature_rectangle,
mdsys.SDO_GEOMETRY(2003,NULL,NULL,mdsys.SDO_ELEM_I NFO_ARRAY(1,1003,3),
mdsys.SDO_ORDINATE_ARRAY(14949508,3,14949510,3))
) = 'TRUE'

This returns no errors and no results..

any help would be greatly appreciated-thanks!
john

Hi john,
my 2 cents...

try to set the coordinate system first.

check view CS_SRS on schema MDSYS to find the appropriate SRID.
check USER_SDO_GEOM_METADATA to see if the SRID is set, otherwise try to
update
check if SDO_SRID on MYTABLENAME.feature_rectangle.sdo_srid (try this
SELECT T.FEATURE_RECTANGLE.SDO_SRID FROM MYTABLETABLE T WHERE ROWNUM <
2), if null returns, update the table.column.sdo_srid to reflect the
SRID found.
rebuild index
try again




hope it helps!

pedro










Reply With Quote
  #3  
Old   
Pedro Lopes
 
Posts: n/a

Default Re: Oracle Spatial Selecting Overlaps returning no results (whenit should)? - 08-05-2008 , 06:54 PM



john.e.major.jr (AT) gmail (DOT) com wrote:
Quote:
Hello-

I'm looking for advice on a problem I've hit with Oracle 10g spatial.
I am storing a large number of rows with a feature_rectangle column
defined for each entry(which is just a variable sized solid 2d
rectangle).

I have followed a table & index creation scenario like this:
http://www.oreillynet.com/pub/a/netw...e_spatial.html

and have populated my database with no errors.

When I select * from the table, I return entries which look like this:
feature_rectangle
--------------------------
(2003, , , (1, 1003,
3, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ),
(14949509, 3, 14949760,
3, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ))


However, a query like this returns no rows (even though i am defining
a rectangle which overlaps the rectangle above?!?!

select * from MYTABLENAME a where
SDO_ANYINTERACT(
a.feature_rectangle,
mdsys.SDO_GEOMETRY(2003,NULL,NULL,mdsys.SDO_ELEM_I NFO_ARRAY(1,1003,3),
mdsys.SDO_ORDINATE_ARRAY(14949508,3,14949510,3))
) = 'TRUE'

This returns no errors and no results..

any help would be greatly appreciated-thanks!
john

Hi john,
my 2 cents...

try to set the coordinate system first.

check view CS_SRS on schema MDSYS to find the appropriate SRID.
check USER_SDO_GEOM_METADATA to see if the SRID is set, otherwise try to
update
check if SDO_SRID on MYTABLENAME.feature_rectangle.sdo_srid (try this
SELECT T.FEATURE_RECTANGLE.SDO_SRID FROM MYTABLETABLE T WHERE ROWNUM <
2), if null returns, update the table.column.sdo_srid to reflect the
SRID found.
rebuild index
try again




hope it helps!

pedro










Reply With Quote
  #4  
Old   
Pedro Lopes
 
Posts: n/a

Default Re: Oracle Spatial Selecting Overlaps returning no results (whenit should)? - 08-05-2008 , 06:54 PM



john.e.major.jr (AT) gmail (DOT) com wrote:
Quote:
Hello-

I'm looking for advice on a problem I've hit with Oracle 10g spatial.
I am storing a large number of rows with a feature_rectangle column
defined for each entry(which is just a variable sized solid 2d
rectangle).

I have followed a table & index creation scenario like this:
http://www.oreillynet.com/pub/a/netw...e_spatial.html

and have populated my database with no errors.

When I select * from the table, I return entries which look like this:
feature_rectangle
--------------------------
(2003, , , (1, 1003,
3, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ),
(14949509, 3, 14949760,
3, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ))


However, a query like this returns no rows (even though i am defining
a rectangle which overlaps the rectangle above?!?!

select * from MYTABLENAME a where
SDO_ANYINTERACT(
a.feature_rectangle,
mdsys.SDO_GEOMETRY(2003,NULL,NULL,mdsys.SDO_ELEM_I NFO_ARRAY(1,1003,3),
mdsys.SDO_ORDINATE_ARRAY(14949508,3,14949510,3))
) = 'TRUE'

This returns no errors and no results..

any help would be greatly appreciated-thanks!
john

Hi john,
my 2 cents...

try to set the coordinate system first.

check view CS_SRS on schema MDSYS to find the appropriate SRID.
check USER_SDO_GEOM_METADATA to see if the SRID is set, otherwise try to
update
check if SDO_SRID on MYTABLENAME.feature_rectangle.sdo_srid (try this
SELECT T.FEATURE_RECTANGLE.SDO_SRID FROM MYTABLETABLE T WHERE ROWNUM <
2), if null returns, update the table.column.sdo_srid to reflect the
SRID found.
rebuild index
try again




hope it helps!

pedro










Reply With Quote
  #5  
Old   
Pedro Lopes
 
Posts: n/a

Default Re: Oracle Spatial Selecting Overlaps returning no results (whenit should)? - 08-05-2008 , 06:54 PM



john.e.major.jr (AT) gmail (DOT) com wrote:
Quote:
Hello-

I'm looking for advice on a problem I've hit with Oracle 10g spatial.
I am storing a large number of rows with a feature_rectangle column
defined for each entry(which is just a variable sized solid 2d
rectangle).

I have followed a table & index creation scenario like this:
http://www.oreillynet.com/pub/a/netw...e_spatial.html

and have populated my database with no errors.

When I select * from the table, I return entries which look like this:
feature_rectangle
--------------------------
(2003, , , (1, 1003,
3, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ),
(14949509, 3, 14949760,
3, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ))


However, a query like this returns no rows (even though i am defining
a rectangle which overlaps the rectangle above?!?!

select * from MYTABLENAME a where
SDO_ANYINTERACT(
a.feature_rectangle,
mdsys.SDO_GEOMETRY(2003,NULL,NULL,mdsys.SDO_ELEM_I NFO_ARRAY(1,1003,3),
mdsys.SDO_ORDINATE_ARRAY(14949508,3,14949510,3))
) = 'TRUE'

This returns no errors and no results..

any help would be greatly appreciated-thanks!
john

Hi john,
my 2 cents...

try to set the coordinate system first.

check view CS_SRS on schema MDSYS to find the appropriate SRID.
check USER_SDO_GEOM_METADATA to see if the SRID is set, otherwise try to
update
check if SDO_SRID on MYTABLENAME.feature_rectangle.sdo_srid (try this
SELECT T.FEATURE_RECTANGLE.SDO_SRID FROM MYTABLETABLE T WHERE ROWNUM <
2), if null returns, update the table.column.sdo_srid to reflect the
SRID found.
rebuild index
try again




hope it helps!

pedro










Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.