crossing polygon and point as parameters

Hi all

I'm new on this excuse, so please, if this is a stupid question - but I need to write a function in Oracle, mySQL and SQLserver called via java to determine whether a given point is inside the specified polygon.
The call will be as follows in all databases:

SELECT point_in_polygon ('(6|2) ','(5|1) |(8| 1) |) (8: 6). (5: 7). (5|1)') = 1;


I have remove polygon and point settings above in my service and had hoped to make the select statement in Oracle to determine whether the point is inside the polygon:

Select 1 of the DOUBLE
where
SDO_RELATE (SDO_GEOMETRY ('POINT (6-2)'),
SDO_GEOMETRY (' POLYGON ((5.0 1.0, 8.0 1.0, 8,0 6,0, 5,0 7,0, 5,0 1.0)) ").
+ "(masque = anyinteract querytype = fenêtre ') = 'TRUE';" +

or something similar - but I get the error there is no spatial index:

ERROR on line 1:
ORA-13226: interface not supported without a spatial index
ORA-06512: at the 'MDSYS. MD", line 1723
ORA-06512: at the 'MDSYS. MDERR", line 8
ORA-06512: at the 'MDSYS. SDO_3GL', line 62

As I wanted to avoid the insertion of data in a table - I had hoped to make the comparison between the point and the polygon settings.
Someone can let me know if this is possible, or do I read my settings, insert into a column of type geometry in a table, create the spatial index, and then make the comparison?

Thanks in advance for your expertise.

Hello
You must use the function space sdo_geom.relate rather than the operator space sdo_relate, which requires the spatial index.
In your WKT constructor you must also pass a SRID (NULL values are used in the following example)

select 1 from dual  where sdo_geom.RELATE(SDO_GEOMETRY('POLYGON ((5.0 1.0, 8.0 1.0, 8.0 6.0, 5.0 7.0, 5.0 1.0))',null),'anyinteract',SDO_GEOMETRY('POINT(6 2)',null),0.001)  = 'TRUE';

Jack

Tags: Database

Similar Questions

Maybe you are looking for

  • Download file is frequently forgotten

    I started with 10 Firefox today after update my Kubuntu10.04 packages. Before I used 3.6. ?Since this change firefox often forget my last used download folder. It is one that I've used a few downlaodactions before, but had changed in the meantime, or

  • Airport link to new modem

    Do TTrying to connect my AirPort Extreme for a new modem, I have to reset the airport, doesn't seem to work with the old modem. Help?

  • Satellite U400-138 - how to activate special keys?

    Hello the problem for the subject [Satellite U400 - 138 Volume - software problem wheel | http://forums.computers.toshiba-europe.com/forums/thread.jspa?messageID=148001] I found a stupid bug in the software Toshiba Satellite U400-138 special keys. Th

  • HP Compaq 8200 Elite - XL510AV: need help to find the form factor small PCI Ethernet card

    Hi guys, I hope one of you can help me with this. I need a card PCI Ethernet single port for a HP Compaq 8200 Elite Small Form Factor computer. From what I see, the motherboard has a PCIe and two PCI card slots. Computer model is XL510AV Any help is

  • What is upper & lowercase for the password

    What is upper & lowercase for a password I'm having a problem trying to create pasword