Lines intersecting that has a point in a polygon

Hi Spatial Community,
I would like to get your expertise in trying to see how can we get this done via Oracle Spatial.
The requirement is to write a file
- passed intersection of line that have a point within a polygon
- failed intersections( doe snot have any line intersecting) that have a point within a polygon
Any clues is much appreciated.
Edited by: CrackerJack on Feb 25, 2013 12:46 PM

Comments before have been pretty much on the money perhaps I might just add
Using the cola_markets example from the manual...
-- Return the topological intersection of two geometries.
SELECT SDO_GEOM.SDO_INTERSECTION(c_a.shape, c_c.shape, 0.005)
FROM cola_markets c_a, cola_markets c_c
WHERE c_a.name = 'cola_a' AND c_c.name = 'cola_c';
SDO_GEOM.SDO_INTERSECTION(C_A.SHAPE,C_C.SHAPE,0.005)(SDO_GTYPE, SDO_SRID, SDO_PO
SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARR
AY(4, 5, 3, 3, 5, 3, 5, 5, 4, 5))
So that finds the ones that DO interact
To do the DISJOINT: The boundaries and interiors do not intersect.
Use SDO_ANYINTERACT as someone else also suggested
The expression SDO_ANYINTERACT(geometry1,geometry2) = 'TRUE' evaluates to TRUE for object pairs that have the ANYINTERACT topological relationship, and FALSE otherwise.
The False version which your will need
SQL> SELECT c.mkt_id, c.name
FROM cola_markets c
WHERE SDO_ANYINTERACT(c.shape,
SDO_GEOMETRY(2003, NULL, NULL,
SDO_ELEM_INFO_ARRAY(1,1003,3),
SDO_ORDINATE_ARRAY(4,6, 8,8))
) != 'TRUE';
2 3 4 5 6 7
MKT_ID NAME
3 cola_c
5 cola_d5
And for completeness the reverse
SQL> SELECT c.mkt_id, c.name
FROM cola_markets c
WHERE SDO_ANYINTERACT(c.shape,
SDO_GEOMETRY(2003, NULL, NULL,
SDO_ELEM_INFO_ARRAY(1,1003,3),
SDO_ORDINATE_ARRAY(4,6, 8,8))
) = 'TRUE';
2 3 4 5 6 7
MKT_ID NAME
1 cola_a
2 cola_b
4 cola_d
Cheers
Rich

Similar Messages

  • Calling C function that has Void* pointer

    Hi
    I am trying to use some c functions in java using the JNI. This C function has 3 inputs, 2 integers and a void* pointer. I can import the 2 integers from java but dont know how to deal with the void* pointer.
    I would be greatful if someone could help me with this problem.
    Thanks
    Derek

    Hi,
    i guess the void * points to some C thingy. If you got
    the void * from C (via JNI), treat it as a long and cast it back in JNI
    as andyba suggested. If it is more than this (e.g. a C++ object)
    there is no general solution, but there are numerous special ones.
    If you tell a little more concrete what your void * points to,
    there might be more concrete suggestions.
    To get an idea, study e.g. swig's java module. But be warned,
    this is no simple topic.
    http://swig.sourceforge.net
    Have fun,
    Klaus

  • How to make a line intersect with a path at random angles?

    How do you make a line intersect with the anchor point of a half circle when you want the line to continue on past the anchor point of the half circle at a random angle?

    Howdy.
    Try this:
    Lock the semicircle. With the pen tool, draw a line from the point of origin to the anchor point of the semicircle. It will still snap even though it's locked.
    Now, we use Jet's scale idea. Select the Scale Tool (S). Click on the point of origin to position the reference point. It will snap. Now, while holding down the Shift Key, drag right and down. The line segment will stay snapped to the endpoint while you drag (highlighted). You can drag it as far as you want.
    That's it.
    Peace,
    Lee
    PS: It's pretty much all Jet's method with the benefit of the OP's screenshot of what he was trying to accomplish. Jet offered the best answer, it looks like to me.

  • Line intersection

    Hi
    Is there a method in Java that can calculate the intersection of two lines. I know that there is a Line2D.lineIntersects but this method only returns true or false if the two lines intersect. I need the X, Y point where the 2 lines intersect.

    That point should be very easy to calculate,
    unless
    the lines are parallell or close to.Why would lines being close to parallel make the
    point of intersection more difficult to calculate?
    A valid point, it makes zero difference (ignoring rounding errors that
    may classify non-parallel lines as parallel).Rounding errors (if, for example ints were involved) leading to
    non-parallel being treated as parallel (or vice versa) would be a
    problem.
    With or without rounding error, the equations can yield "signed infinities"
    that have to be dealt with.
    Also there could be a question of precision: if the original line
    segments were the result of measurement then how close they
    are to parallel could make the difference between whether the
    intersection is a reliably calculated value, or a more of a guess.
    The OP shouldn't be put off! It's a reasonable question, and MLRon's
    link provides a simple solution. But it also seems quite reasonable
    to warn that - depending on the context of the original problem -
    being parallel or close to parallel could involve problems.

  • The tool bar that has edit, delete view tools etc. and the row below it that had the refresh key have disappeared, how do I get them back?

    About 2 weeks ago the tool bar at the top of the page when i log on vanished. Its the toolbar that has copy, edit, view, tools, etc. A week later the next line vanished that has the refresh key and a search line. Now I can't clear cookies, caches, history etc. Please help me restore these bars/lines.

    I had this problem too, but someone suggested pressing the F10 key to restore the menu bar. In that under View, there is a place to pick the menu bar and features you want. It worked in my case.

  • Line Intersection retuns point instead line segment

    Hi all,
    I want to intersect two lines with the function sdo_intersection (Oracle8i).
    However, as result I get always a point instead of a line segment.
    Any suggestions ??
    Thanks Peter
    Following the Script:
    /* Table Theme2 */
    CREATE TABLE THEME2(ID     NUMBER, GEOM MDSYS.SDO_GEOMETRY);
    /* Update Metadata */
    INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO)
    VALUES ('THEME2', 'GEOM', MDSYS.SDO_DIM_ARRAY
    (MDSYS.SDO_DIM_ELEMENT('X', 2546727.982208079, 2629500.677188804, 0.000000050),
    MDSYS.SDO_DIM_ELEMENT('Y', 5479508.594623252, 5585930.631027042, 0.000000050) ) );
    COMMIT;
    /* Insert 2 Lines */
    insert into theme2 values (1,SDO_GEOMETRY(2002, 82015, NULL,
    SDO_ELEM_INFO_ARRAY(1, 2, 1),SDO_ORDINATE_ARRAY(
    2546727.98, 5570612.31, 2551027.86, 5558787.64, 2554252.77,
    5549112.91, 2570914.81, 5536213.27, 2580589.54, 5532988.36,
    2612569.9, 5524657.34, 2621438.4, 5512563.92, 2622782.11, 5491870.75, 2629500.68, 5479508.59))
    insert into theme2 values (2,mdsys.SDO_GEOMETRY(2002, 82015, NULL,
    mdsys.SDO_ELEM_INFO_ARRAY(1, 2, 1), mdsys.SDO_ORDINATE_ARRAY(
    2619288.46, 5585930.63, 2613913.61, 5568731.11, 2608538.76, 5550456.62,
    2599132.77, 5535675.78, 2597789.06, 5527344.76, 2577095.89, 5517938.77, 2556671.46,
    5513638.89, 2547534.21, 5509339.01))
    /* Intersect */
    select sdo_geom.sdo_intersection(b.geom,a.geom,0.05)
    from theme2 a, theme2 b
    where a.id=1 and b.id=2;
    /* result */
    TEST(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
    SDO_GEOMETRY(2001, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1, 1), SDO_ORDINATE_ARRAY(2597969.08, 5528460.91))

    The two lines you've provided intersect at a single point, which is by definition not a line.
    If you want to return a line, then the intersection has to happen along some length of the line.
    Also, whenever I look at geometries posted I always run sdo_geom.validate_geometry on the
    data.
    Your user_sdo_geom_metadata should include the srid value stored in the geometries.
    The bounds of your user_sdo_geom_metadata should be a bit larger to encompass
    both geometries.
    Regards,
    Dan

  • My Ipod touch is frozen.  Shows USB cable with arrow pointing to Itunes.  What is the problem?  This is the second one I have had that has done this!

    My Ipod touch is frozen.  The screen shows only USB cable with arrow point to the word Itunes.  What is the problem?  This is the second touch I have had that has this same problem.  HELP!

    This time try restoring the iPod to factory defaults/new iPod instead of from backup.  You may have some corruption that is causing the problem and it may now be in the backup.  If the problem persists after restoring to factory defaults/new iPod. then you likely have a hardware problem and ana ppointment at the Genius Bar of an Apple store is in order.

  • When I use Explored, ussually I diplay my pages in english, but Explore has a feature that you can point any word and it is translated from english to spanish (one one word at the time, not the complete page), does it is available in firefox?

    When I use Explored, usually I display my pages in English, but Explore has a feature that you can point any word and it is translated from English to Spanish (one one word at the time, not the complete page), does it is available in Firefox?

    I do not know the answer but if you look through the Add-ons under [https://addons.mozilla.org/en-US/firefox/search/?q=translation translate] you may find something suitable. There is of course also the well known Google translate [http://translate.google.com/#es|en|choose%20the%20language%20combinations%2C%20and%20can%20handle%20single%20words%0Awith%20some%20odd%20results service]

  • When we create a Purchase order that has PIR in line item, the text is stored in EINA or EINE?

    Hi Friends,
    I have a requirement that, whenever we created the PO that has PIR in line item, the text is getting stored in EINA or EINE table.
    so here the businees need to move the text which storing in EINA /  EINE to ekpo text id up on saving.
    please suggest how i need to proceed with this issue.
    Thanks in Advance,
    kasi.

    Hi Madan,
    Thank you for your reply.
    As per your suggestions I found  BADI  ME_PROCESS_PO_CUST.
    Could you please help me how to read the "Info record PO text" for each line item in the purchase order and i want to save the readed text into EKPO-txz01.
    Thanks in Advance,
    kasi.

  • A have new problem that has appeared in my Mac Mail.  When I type a frequently used email into the 'To: line' it populates the correct name but with 8 different email addresses not associated with that name.

    A have new problem that has appeared in my Mac Mail.  When I type a frequently used email into the 'To: line' it populates the correct name but with 8 different email addresses not associated with that name.  I have gone to the window pop-down to 'previous recipients' and deleted that addressee as well as all the email addresses it is assigning to that name.  I have also deleted the account entirely from my address book.  I have have run repair permissions and also full defrag in iDefrag.  Still the problem persists.  Any suggestions?

    Hello CarolineLongEaton,
    I noticed you posted this problem quite a while ago and wondered if you managed to have it fixed in an alternative way then posting here. It is too bad no one has posted a solution here. I have a similar problem and if you have had yours solved since this occurance how you accomplished it may help me with mine. I am interested to know what you have done about yours.
    If you are interested in comparing the problems to see if your solution (if you have found one) might help me also then here is the link to the discussion.
    https://discussions.apple.com/thread/6116927
    If your problem has not been solved then I will comment here again if/when my issue is resolved as it may help you too. My hope here is that we may help each other. To quote you "all ideas gratefuly recieved". I hope your problem was resolved, ernestly for your sake and selfishly for mine also. I wish you and yours a great day!
    dofromon

  • How can I allow the application to line through a field that has been locked after being digitally signed?  We have multiple sections on a form with some fields being proposed information and other in another section having the approved information. once

    How can I allow the application to line through a field that has been locked after being digitally signed?
    We have multiple sections on a form with some fields being proposed information and other in another section having the approved information. once the approved information is entered we line through the proposed field so the data entry clerk won't pick up the wrong information.  However we are receiving an error when attempting to enter data  in the field which we have this edit.  Error property: line through cannot be set because doing so would violate the document permission setting.  any idea how we can get around this issue?

    You can control which fields are locked down after signing by setting up a collection. Then those that are not locked can be changed after signing. If this is not possible, then the line outs must occur prior to signing.

  • How to apply a PO-matched prepayment invoice that has an extra tax line??

    I have a situation where I created a prepayment that's matched to a PO, but since the prepayment invoice document has VAT associated to it and not the PO, I need to add that extra line. So after matching the prepayment to the PO, I added an extra line on the prepayment as Item type TAX.
    Now after creating the actual invoice, when trying to apply the prepayment on the invoice, I can only see the actual PO amount and not the VAT line that was added afterwards to the prepayment. Therefore the invoice goes on a distribution variance hold.
    My question is how would I be able to create a prepayment that's matched to a PO and that has an additional TAX line and then later on apply the full amount to an invoice?
    All responses appreciated!

    Hello
    I still have to investigate for a problem with prepayments and line level calculation also (no PO matching involved), here is what I foundin the main AP doc (115apug.pdf, 4-150 to 4-155)
    *Applying Prepayments in the Invoice Workbench*Payables creates Tax distributions automatically either when you choose the Calculate
    Tax button in the Distributions window, or when you submit Invoice Validation for the
    invoice. For invoices you enter in the Invoice Workbench, you can apply a prepayment
    either before or after you validate an invoice, or while you are entering it. If you use Line
    level or Tax Code level automatic tax calculation, Payables always creates separate tax
    lines for your Item and Prepayment type distributions.
    Note: Use automatic tax calculation to create tax distributions for
    prepayments. Manually created tax distributions for prepayments are
    not included in the Distribution Total. If the Distribution Total does
    not match the Invoice Amount, Payables applies a hold to your invoice
    during Invoice Validation.>
    Hope it helps ;°)
    I'll keep you inform if I have further info about my case
    Xavier

  • How can I allow the apHow can I allow the application to line through a field that has been locked after being digitally signed? plication to line through a field that has been locked after being digitally signed?

    How can I allow the application to line through a field that has been locked after being digitally signed?
    We have multiple sections on a form with some fields being proposed information and other in another section having the approved information. once the approved information is entered we line through the proposed field so the data entry clerk won't pick up the wrong information.  However we are receiving an error when attempting to enter data  in the field which we have this edit.  Error property: line through cannot be set because doing so would violate the document permission setting.  any idea how we can get around this issue?

    HI,
    Kindly post this query in Acrobat forum:Acrobat
    Regards,
    Florence

  • Can i get my imac g5 that has vertical lines on it fixed for free as it is a fault???

    can i get my imac g5 that has coloured vertical lines on it fixed for free as it is a manufacturing fault???
    just asking cause it is really annoying
    and also if it gets done for free do i need to under warrenty and apple care or can it get done without the warrenty as i looked it up and it said on mac rumors that it didn't have to be under warrenty.
    thanks heaps.

    Well I said thank you Apple too soon I guess! It's been a week since I filled out the form for the free update/upgrade program, still haven't heard anything from them! They only responded that they received my request and gave me a reference number but the email address was a "no-reply" address so where am I supposed go on and check or ask or inquire with this number?
    When I go to the original webpage given to apply for the program there is no section to check the status of my application! So again I wander where can I write to, to ask about the status of my application for the free update of my OS X Lion software?
    Do I write to App Store or iTunes or Apple US or the Turkish reps? The store I bought it from doesnt know about this they say it's all done thru Apple?
    I'm confused! Who should know and where did my application go to? Who receives these forms and who do I check in with? Does anybody know?
    Thank you.

  • I have a virus that has taken over Safari and will not allow me to use Safari or even shut down my computer.  It claims I need to send $1000 to a "green dot account to get my on line capability.Help

    I have a virus that has taken over Safari and will not allow me to browse of even shut down the computer.  The request is to send $1,000 to a "green dot" address to get the virus removed.
    Help!
    lawrencefromchatham

    Command, option and escape keys held down together will open the "Force Quit" dialog window.
    Quit Safari and then relaunch it while holding down the shift key.

Maybe you are looking for

  • My Macbooks Wallpaper keep reseting back to default Mavericks wallpaper every so often, why is that?

    Do I have a Virus? Specs: Macbook 2009 mid 2.13ghz Ram: 4 gigs ddr2 ram Intergrated gpu: nvidia 2400 256mb 240gb ssd harddrive OSX Version: 10.9.1

  • WebLogic Form-based security

    I am using form-based login to authenticate users. I want to tie all entry points on successful login to a single page. Is there a way to accomplish this? In the web.xml one can configure the error page to be forwarded to on login failure but there i

  • Stop Motion and FCPX

    Hi, Could anyone tell me if it is possible to create a stop motion film with onion skinning effects using Final Cut Pro X? Failing that, is there any effect in FCPX which I could use to show me where the last frame was positioned in a stop motion fil

  • Business Graphic rendering problem.

    I’m running J2ee (NW2004) SP20. I’ve been following this simple business graphics tutorial (http://help.sap.com/saphelp_nw04/helpdata/en/e5/08b6eb35637a44830b9e6df22987aa/content.htm) and get a generic image not found red x with I try and render my s

  • What's wrong with my JNI!

    The below is my code, DesEncrypt() is a function to encrypt data, and variable result will be returned by DES encrypting function. The question is that sometimes it will produce wrong result. For example, If I input data "111111111", the result maybe