Problems with function-based spatial indexing.
354254Nov 20 2002 — edited Jan 16 2003It seems bug in oracle spatial.(I am currently running Ora9i)
I have two tables, one is line table , the other is node table. Location information is stored as array type in node table. But line has 1:n relationship with node. the following is one simple case:
create table line(
line_id NUMBER,
stnd NUMBER, --start node id
endnd NUMBER --end node id
)
create type coordinates as varray(2) of NUMBER(9,6);
create table node(
nd_id NUMBER,
location coordinates
)
--one function is used to get mdsys.sdo_geometry object for line
get_line_geometry(8265, stnd, endnd);
--8265 is srid
--in user_sdo_geom_metadata , I insert one row
insert into user_sdo_geom_metadata values('LINE','get_line_geometry(8265,stnd,endnd)',MDSYS.SDO_DIM_ARRAY(
MDSYS.SDO_DIM_ELEMENT(Longitude, -180, 180, 0.005),
MDSYS.SDO_DIM_ELEMENT(Latitude, -90, 90, 0.005)), 8265);
--create index then as following,
CREATE INDEX line_ind ON
line(get_line_geometry(8265,stnd,endnd))
INDEXTYPE IS MDSYS.SPATIAL_INDEX
--until now everything seems fine.
But when I use sdo_filter, oracle give me the following error messages:
ERROR at line 1:
ORA-13268: error obtaining dimension from USER_SDO_GEOM_METADATA
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 8
ORA-06512: at "MDSYS.SDO_3GL", line 365
I think there must be something with setting up sdo_dim_element when I insert data into user_sdo_geom_metadata.
But I don't reallly know how to correct.
Is anybody able to figure out? thanks first.