How to find a polygon that contains a point

I have a table that has the boundaries (polygones) for all the zip codes in my state and I want to find the zip code that contains the given LON/LAT
The following query is aparently not valid:
SELECT *
FROM ZIP_BOUNDARY b
WHERE sdo_relate(b.geom, SDO_POINT_TYPE(-122.079155, 37.392892, NULL),'mask=touch') = 'TRUE'
WHERE sdo_relate(b.geom, SDO_POINT_TYPE(-122.079155, 37.392892, NULL),'mask=touch') = 'TRUE'
ERROR at line 5:
ORA-29900: operator binding does not exist
ORA-06553: PLS-306: wrong number or types of arguments in call to 'SDO_RELATE'
What is the correct way to write such a query?

try the following:
SELECT *
FROM ZIP_BOUNDARY b
WHERE sdo_relate(b.geom, sdo_geometry(2001, YOUR_SRID, SDO_POINT_TYPE(-122.079155, 37.392892, NULL), NULL, NULL), 'mask=CONTAINS') = 'TRUE';

Similar Messages

  • How to find out which page contains a specific ITextFrame

    Hi all,<br /><br />I would like to ask if it is possible to find out which page contains a specific text frame?<br /><br />I used the following code to find the ITextFrame that contains the caret<br />ISelectionManager* mgr = activeContext->GetContextSelection();<br />InterfacePtr<ITextEditSuite> esuite(mgr, UseDefaultIID());<br />InterfacePtr<ITextTrackerAccess> tracker(esuite, UseDefaultIID());<br />ITextFocus* focus = tracker->QueryTextFocus();<br />ITextModel* model = focus->QueryTextModel();<br />IFrameList* flist = model->QueryFrameList();<br />RangeData range = textFocus->GetCurrentRange();<br />TextIndex cposition = range.Start(0);<br />int32 fidx;<br />ITextFrame* frm = flist->QueryFrameContaining(cposition, &fidx);<br />UIDRef frmUIDRef = ::GetUIDRef(frm);<br /><br />However, when I use the following code to iterate through the pages, I cannot find any UID that matches the ITextFrame<br />for (int32 sIdx = 0; sIdx < spreadList->GetSpreadCount(); sIdx++) {<br />  UIDRef spreadUIDRef(database, spreadList->GetNthSpreadUID(sIdx));<br />  InterfacePtr<ISpread> spread(spreadUIDRef, UseDefaultIID());<br />  for (int32 pIdx = 0; pIdx < spread->GetNumPages(); pIdx++) {<br />    spread->GetItemsOnPage(pageIndex, &uidList);<br />    if (uidList.Contains(frmUIDRef.GetUID()) == kTrue) {<br />      ...<br />    }<br />  }<br />}<br /><br />Any help is appreciate. Thank you.<br /><br />Ikki

    I think your frmUIDRef is too far down the hierarchy to show up in GetItemsOnPage(). Try getting the IHierarchy interface from frmUIDRef and calling QueryParent(). That should get you from the kFrameItemBoss to the kMultiColumnItemBoss. Do the same again and you'll get to the kSplineItemBoss, which should appear in GetItemsOnPage().
    If you're running the debug version of InDesign, you can use the Test menu to run the Diagnostics > Document Structure > Trace Content Hierarchy command, which will print out the UIDs of all the items on a page and let you see what's happening.
    Charles

  • How to find out the textframe contains "stroke color" (or) "fillcolor"?

    How to find out the textframe contains "stroke color" (or) "fillcolor" via javascript. Kindly advise me with sample.

    I know, this post is quite a while ago, but: This simply does not work for me. Neither for simple PathItems, nor for the characters of a TextFrame.
    Working on: Illustrator CS5.5, Mac OS, Javascript
    Simple example:
    var numSelectedObjects = app.activeDocument.selection.length;
    // If any objects selected: Get fill and stroke color of the first one
    if(numSelectedObjects > 0){
    alert("Fill Color: " + app.activeDocument.selection[0].fillColor + " / Stroke Color: " + app.activeDocument.selection[0].fillColor);
    This returns always CMYKColor, RGBColor or GrayColor, even if there is no Color assigned to the objects stroke or fill!!
    For PathItems there is the attribute ".filled" or ".stroked", which returns "true" or "false" and is reliable.
    if(app.activeDocument.selection[i].filled){ // works fine with PathItems!
    Is there anything similar for Characters? I tried this one, but it does not work (because I think it does not exist):
    if(app.activeDocument.selection[i].textRange.filled){ // does not work!
    I just need to find out, if the characters in a textfield have got a fill or stroke color. Reliable.
    It would be very nice to get help from anybody!
    Thanks a lot in advance!

  • HT4995 How to find iphone 4s, that was stolen?

    How to find iphone 4s, that was stolen? Is it real to see location of it?

    You can see its location if all of the following are true:
    - You enabled Find my iPhone on the phone before it disappeared
    - You set up an iCloud account
    - The thief did not turn the phone off, remove the SIM, restore the phone or wrap it in aluminum foil
    - The phone has cellular data coverage
    If you enabled Find my iPhone just log in to iCloud and click the Find my iPhone icon.

  • I have a new computer and downloaded the latest version of itunes.I now need to authorise my computer but cannot find the bar that contains " store windows help" any suggestions please?

    i have a new computer and downloaded the latest version of itunes.I now need to authorise my computer but cannot find the bar that contains " store windows help" any suggestions please?

    Press Alt or Ctrl+B.
    tt2

  • How to find form descriptor, that attribute is a collection

    Hi, simple question. How to find form descriptor, that attribute is a collection?
    I got a class name and attribute name (java attribute name not the name of a column in db). I need to decide if attribute is a collection = many_to_many/one_to_many mapping. I can use a reflection but I find using Toplink metadata better, because I need this information for qenerating Toplink query.
    This is how I can get mapping for attribute. How to continue? Is it a flag or what?
    Descriptor d = serverSession.getDescriptor(MyClazz.class);
    DatabaseMapping m = d.getMappingForAttributeName("attributeName");
    Thanks
    Fero

    I found this solution:
    Descriptor d = serverSession.getDescriptor(MyClazz.class);
    DatabaseMapping m = d.getMappingForAttributeName("attributeName");
    boolean isCollection = m instanceof OneToManyMapping || m instanceof ManyToManyMapping;
    Is it OK? Or is there something better?

  • How to find the TCODE that is created for the table maintanance generator

    Hi ,
    How to find the TCODE that is created for the table maintanance generator of particular table,if we only know the table name.
    Regards
    Ramakrishna L

    Hello,
    I try it this way
    1. Goto SE16 --> enter table TSTCP.
    2. In the selection-screen displayed, enter
    PARAM = *<ZTABNAME>*
    You will get the t-code for the TMG.
    BR,
    Suhas
    PS: Are you sure a t-code has been created for this TMG ?

  • How to find the file that delete from time capsule?

    How to find the file that delete from time capsule?

    I mean I saved JPEG file in Time capsule and unfortunately delete the file. Can I get it back
    IF.... .no other backups have occured since you deleted the file, you might be able to retrieve it using an application like Disk Warrior. It's about $100 as I recall, and there are no guarantees that it will work.
    DiskWarrior 4 - The Disk Utility for Mac  Disk Repair, Mac Directory ...
    Any of the free or low priced utilities that you might see or try will not be able to retrieve a deleted file from a Time Capsule.
    If any backups have occured since you deleted the file, the deleted file has almost certainly been overwritten. No way to retrieve it in that case.

  • Could you please tell me how to find the cause that made I/O high

    Could you please tell me how to find the cause that made I/O high
    please let me know

    hi ,
    Without any backgound inforamation it is very difficilate to help u out .
    Please Provide the statpack/Awr report durring that priode. oherwise top 5 wait event. so we can give some suggestion on this.

  • HOW 2 FIND WHICH FIELD IS CONTAINED IN WHICH ALL TABLES?

    FRIENDS CAN U PLEASE TELL ME THE COMPLETE PROCEDURE FOR HOW 2 FIND THAT FIELD AUFNR IS IN WHICH ALL TABLES....I KNOW WE USE WHEREUSED LIST BUT HOW?
    REGARDS
    ESSAM ([email protected])

    Dear Khan,
    <b>--> Goto transaction SE16
    --> Give table DD03L (click --> table contents)
    --> give field name (Ex: AUFNR) & Execute
    --> And you will get all the table names.... which contain field AUFNR.</b>
    Reward Points for useful Answers.
    Regards,
    Moqeeth.

  • How to find the records using contains with the word like this 'some text-some text'?

    Hi,
    How to find the records using the full text contains keyword and that column contains ‘some text-some text’
    In the above some text can be anything.
    Does anybody know please let me know.
    Thanks,

    Hello,
    You can try to create a Full Text Index on the table and use CONTAINS() to get the record which contains the specify words.
    For example:
    SELECT * FROM TABLE WHERE CONTAINS(column_name, 'some text')
    Reference:
    Full-Text Search (SQL Server)
    Creating Full Text Catalog and Full Text Search
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • How to find all photos that have NO faces, as opposed to UNNAMED faces?

    I find that iPhoto often misses faces entirely, especially if the face is wearing sunglasses or a hat or both.  Sometimes it is rather inexplicable that it has missed a face, as the face seems obvious.
    If you use the smart album method to find all "unnamed" faces, the photos have at least one unnamed face identified.  You can then add any missed faces to those photos.
    But what about photos in which iPhoto has failed to identify the existence of even one face?  Or for that matter, if I want to see only pictures of landscapes or objects that have no people?  Does anyone have a method for finding all photos that have no faces in them at all?
    For me, the idea is to find all unidentified faces and add them.  But as I pointed out above, there may be other uses for this.
    Any ideas, anyone?
    Thanks

    Awesome !!! Thank you very much. I did not realize you could use JavaScript to code against iTunes ...
    I don't know if you have written any of these yourself, but do you know how to maybe create a smart playlist with this information via script? If not, no big deal. At least I know have something which I can use, I will just have to run it every so often.
    Thanks again for pointing me to that site!

  • How to find the query that generates print preview?

    Hello,
    How can I find the query that gets executed to generate  print preview? On SAP Business One client if I open a Sales Quotation and click on print preview a report is generated. What queries are run in the background to generate this report?
    Thanks for your help.
    Regards,
    Sheetal

    Hi Sheetal,
    In such cases i am using a Profiler which is connected to my company's database. If you are using SQL-Server, the start the "Profiler", connect it to your database server and start the trace. When the trace is running, execute the SBO action. After you executed this action you will see in the profiler the excuted SQL-Statements.
    Regards,
    Christian

  • How to find the message that processed a file

    Dear guys,
    I need to find the message that have processed a text file. Using sxmb_moni  I can see this information on DynamicConfiguration log but I don't know how to search this string text in all messages that were processed.
    Thanks,
    Helio Paixao

    Hi Paixao,
    As michal you need to have the EhP1 (enhancement package 1 for PI)  or if you have installed trex then you can see this blog on how to find:
    /people/prasad.illapani/blog/2005/11/14/payload-based-message-search-in-xi30-using-trex-engine
    Else some other nonstandard ways through which you can get are shown in this blogs:
    /people/sravya.talanki2/blog/2006/02/21/abap-based-trex-in-xi-proto
    /people/alessandro.guarneri/blog/2006/02/14/super-message-monitor-for-sap-xi
    Regards.
    ---Satish

  • How to find the value that is in structure???

    hi experts,
                 i am changing standard form QM_INSP_RESULT I have an field MITTELWERT in QGRES
    ie QGRES-MITTELWERT where QGRES is a structure .i need the value that is present in the field.How to find it.

    Hi Manikandan Muruganandham ,  
    To find fields the refined search is through Transaction SE84.
    Go there and find the fields of your choice.
    1> <b>ABAP DICTIONARY</b>
    2> <b>FIELDS</b>
    3> Select <b>Table fields</b> to know where you can find the field of your choice.
    Reward Points if useful.
    Thanks,
    Tej..

Maybe you are looking for