I trying to execute a next query on Oracle Database 11g Enterprise Edition (11.1.0.6.0):
SELECT "__ItemId"FROM "Cities"WHERE "Longitude" IS NOT NULL AND "Latitude" IS NOT NULL AND SDO_ANYINTERACT(SDO_GEOMETRY('POINT(' || "Longitude" || ' ' || "Latitude" || ')'), SDO_UTIL.FROM_WKTGEOMETRY('POLYGON ((-100 80, 100 80, 100 -80, -100 -80, -100 80))')) = 'TRUE'Where "Longitude" and "Latitude" - numeric [NUMBER(28,5)] columns in the "Cities" table.
I get an error:
Error report -SQL Error: ORA-13226: interface not supported without a spatial indexORA-06512: at "MDSYS.MD", line 1723ORA-06512: at "MDSYS.MDERR", line 8ORA-06512: at "MDSYS.SDO_3GL", line 71ORA-06512: at "MDSYS.SDO_3GL", line 23913226. 00000 - "interface not supported without a spatial index" *Cause: The geometry table does not have a spatial index. *Action: Verify that the geometry table referenced in the spatial operator has a spatial index on it.Questions:
How can I check, that point with specified "Longitude" and "Latitude" in the specified polygon? Polygon in not always simple, it can be any.How can I create a spatial index on a table without any spatial column?It's really, I can not just call a spatial operator?
ليست هناك تعليقات:
إرسال تعليق