To get this to work, I think you have to create a function-based index on the output of the SDO_UTIL.POLYGONTOLINE function.What tripped me up was that you have to fully qualify the function name when you inset the row into the sdo_geom_metadata view. If you don't, you can't create the index.good luckTravis
create view view_outline as select objectid, sdo_util.polygontoline(shape) shape from data_table;
View created.
select count(*) from view_outline where sdo_filter(shape,
SDO_GEOMETRY(2003, NULL, null, SDO_ELEM_INFO_ARRAY(1,1003,2), SDO_ORDINATE_ARRAY (1, 1, 30, 30))) = 'TRUE';
ERROR at line 1:
ORA-13226: interface not supported without a spatial index
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 8
ORA-06512: at "MDSYS.SDO_3GL", line 1248
ORA-06512: at "MDSYS.SDO_3GL", line 1393
insert into user_sdo_geom_metadata values ('data_table', 'MDSYS.SDO_UTIL.POLYGONTOLINE(SHAPE)', SDO_DIM_ARRAY(SDO_DIM_ELEMENT('Lat', -180, 180, 0.05), SDO_DIM_ELEMENT('Long', -90, 90, 0.05)), NULL);
1 row created.
create index base_table_fidx on base_table(sdo_util.polygontoline(shape)) indextype is mdsys.spatial_index;
Index created.
select count(*) from view_outline where sdo_filter(shape,
SDO_GEOMETRY(2003, NULL, null, SDO_ELEM_INFO_ARRAY(1,1003,2), SDO_ORDINATE_ARRAY (1, 1, 30, 30))) = 'TRUE';
COUNT(*)
----------
9