How to find a line/edge that starts at the same point as the end of another

I have an edges table of Lat/Lon data and for a specific edge I want to find any other edges that have the same start point as the end point of the given edge.
I tried the following query:
select geo_street_id from geo_street s2
where SDO_LRS.GEOM_SEGMENT_START_PT(s2.geom) =
(select SDO_LRS.GEOM_SEGMENT_END_PT(s.geom) as geom from geo_street s
where geo_street_id = 122978214)
but it gets the following error:
ORA-22901: cannot compare nested table or VARRAY or LOB attributes of an object type
Any Ideas?

1. to compare geometry to be equal you should use appropriate function (SDO_GEOM.RELATE http://download.oracle.com/docs/html/B14255_01/sdo_objgeom.htm#sthref1561) or operators (sdo_relate http://download.oracle.com/docs/html/B14255_01/sdo_operat.htm#i78531) with specific mask EQUAL.
2. to filter down the resultset in first place you can use the operator SDO_RELATE with mask TOUCH as this will return already the set of lines sharing endpoints, but will also include lines touching eachother not at endpoints (endpoint intersecting the otherone's interior)
something like
select geo_street_id from geo_street s2, geo_street s
where
s.geo_street_id = 122978214
AND
sdo_relate(s2.geom, s.geom,'mask=touch') = 'TRUE'
AND
sdo_geom.relate(SDO_LRS.GEOM_SEGMENT_START_PT(s2.geom),
'EQUAL',
SDO_LRS.GEOM_SEGMENT_END_PT(s.geom),0.005)='EQUAL'
3. if you would do this for the full table, an SDO_JOIN (http://download.oracle.com/docs/html/B14255_01/sdo_operat.htm#BGEDJIBF) might be more appropriate.
4. you might also consider 4 cases:
start = start
start = end
end = start
end = end
5. alternative would be to take only the endpoints of your selected geometry and perform a touch with the edges. using the sdo_util.APPEND on the startpoint en endpoint of your geometry will return a multipoint. although there might some specific cases that this would not return respected result I think
something like:
select geo_street_id from geo_street s2, geo_street s
where
s.geo_street_id = 122978214
AND
sdo_relate(s2.geom,
SDO_UTIL.APPEND(
SDO_LRS.GEOM_SEGMENT_START_PT(s.geom),
SDO_LRS.GEOM_SEGMENT_END_PT(s.geom)
,'mask=touch') = 'TRUE'
Let us know how it works.
Luc

Similar Messages

  • How  to find tables in Lo that  were extracted from R/3 to BW?

    Hi Experts,
    pls tell me How  to find tables in Lo that  were extracted from R/3 to BW?
    Thanks in advance.
    Regards,
    Hari Reddy

    Hi
    Check the following thread,if the earlier link doesnt work..
    How to locate which R/3 table-field is mapped to BW
    cheers

  • How i can take all record that start for Epi using a select?

    How i can take all record that start for Epi using a select?
    exemple
    select objnr from jest where objnr = 'Epi*'  -
    so don't go

    Is case important? Can it be "EPI"?
    I think case is important, so do it like Shakir showed you, but put it in upper case.
    Rob
    Message was edited by:
            Rob Burbank

  • HT2955 The problem with the above is this: If a chapter end is reached at the same time as the CD space is filled, iTunes goes to EOJ, ejects that CD and pretends it's done. Other than entering start:end manually you are screwed. iTUnes just ***** for bur

    If you use iTunes to burn Audible CDs you better hope the book is only one CD long. Otherwise iTunes craps-out without warning and cannot be easily restarted. It just goes to EOJ and pretends it's all done with the entire burn. Often this can cause (will cause) the user to waste many many CDs trying to get a burn completed. If a CD-end is reached at a chapter-end point, iTunes assumes the burn is done and ends. The user must manually enter start:stop for each CD, pay constant attention to what's going on, and hope everything goes right. And even if you do all that you WILL find a chaper point at CD end and will have to go manually adjust the start-stop of the next CD and HOPE... that's their strategy: Hope.  iTunes was never designed for books, for audio content that is multi-volume, and it really ***** at it. And if you are unlucky enough to want to burn long books (Truman -48 CDs, or Atlas Shrugged - even more), be prepared to throw away many tens of CDs as you try to get it done; pretty soon it's just cheaper to go buy the book in audio form and dump Audible entirely. (Maybe this is why Amazon made the switch from working Roxio to non-working iTunes... nahhh.. you'd have to be too cynical to believe that...)  If, that is, you don't just give up in frustration and terminate your Audible subscirption as I did a couple of years ago. Audible keeps your paid-for library, but downloading a long book again just brings you to the same point: trying to burn multi-volume CDs on a tool not designed to do so. Maybe amazon bought lots of Apple stock at the same time and just wants you to be walled-in to your iPod and never again use a CD.. maybe they bought the car companies, too, so you can't have an old car and must buy a new one with an ipod attachment in order to listen to your books..... The worst part is that Audible used to use Roxio, which handled all of this with no problem at all. When it was tasked with a multiple-CD burn, it told you how many you'd need, began recording, when it reach end-of-CD, it told you to put in the next one - regardless of whether there was a coincident end of chapter, and kept burning until the book was completed. For unknown - and seriously stupid - reasons, audible decided to use iTunes, and the problem continues. My research across the web indicates I am not the only FORMER customer of Audible that feels this way, or who cancelled their subscription because of this stupefyingly dumb decision - to make the primary customer interface tool WORSE that it had been.

    AC, Thank you for you reply.
    Even though it is supposed to be a 'simple' home video system it has so much potential!
    And i mean i know there is an solution since i know the Caribbean cruises are using apple as media centers onboard their ships. have to admit that i do not know if they are using frontrow or some other application created buy some other company.. i just know that some one must know how to get around it all and make it work..
    Just wish i had someone to get in contact with that is working hands on every day with this product, and get strait, good, final answers.. no "pro support" since im not happy with their answers anymore..
    I know i start to sound desperate.. but thats because i am..

  • How can I get "IMAQ Line Fit" stable (with the same points)

    How can I get "IMAQ Line Fit" stable (with the same points)
    I my vision applications I use a lot off times "IMAQ Line Fit"
    some times the results are not Stable.
    See vi and word document attached.
    When I take the same points but in a other order (sort)
    then suddenly all points are used.
    In this case I was looking for a edge in vertical direction (Y).
    I found the points but "IMAQ Line Fit" did not function well.
    I tried changing all settings like pixel radius and minimum score and
    also threshold and so on. But no result.
    Then I sorted the points reversed and that worked. See vi.
    I use labview Labview 8.6.0 and IMAQ machine vision.
    Maybe this problem is solved in a newer version.
    Please let me know.
    Thanks
    Attachments:
    TEST-imaq-line-fit-86.vi ‏169 KB
    IMAQ-Fit-Line-Problem-86.doc ‏230 KB

    Thank You for your reaction Hossein,
    This "one application" uses "Line fit" about 20 000 000 times a day.
    about 200 will go wrong. With your setting the the "Line fit" for this occasion will work but others will go wrong.
    A algorithm should be:
    1e Stable, when using the same points and settings the result MUST be the same. How the points are sorted should not matter.
    2e Accuracy
    3e Speed
    4e Testing. Is very difficult but al least close points and the same points and sorting ... should be done
    NI now as made a " IMAQ Line Fit" Problem CAR (Corrective Action request) 298016.
    so in the future there will be a update.
    In the mean while a made a line fit which uses Bisquare option from Linear Fit.vi :
      from C:\Program Files\National Instruments\LabVIEW 8.6\vi.lib\analysis\6fits.llb
    This is a temporary fix because "IMAQ Fit Line VI" is not so stable.
    Because outliers should be rejected only Bisquare does this reasonable.
    This program does NOT USE "Minimum Score" and "Pixel Radius"
    Valid fit = When there are enough points within Outlier_Distance.
    Algorithm steps:
    - Determine if line is more horizontal then vertical, Compare DeltaX with DeltaY
    - If DeltaX <= DeltaY then SWAP X Y and later Swap back
    - Sort Points at on X value
    - First : Bisquare Linear Fit
    - Calculate distances to the found line for all points
    - Inliers: Points within Outlier_distance
    - Outliers: Points outside Outlier_Distance
    - Only use Inlier Points
    - Check again if DeltaX < DeltaY then SWAP X Y later SWAP back again
    - Second : Bisquare Linear Fit only with the Inlier Points
    - Results are from the second fit
    Warning : This Program is Not so accurate and Not so fast
    See attachments it is in labview 8.6
    If some has a improvement please let me know.
    Thanks
    Attachments:
    svi_fit_line_Bsquare_and_draw.vi ‏18 KB
    Fit_Line_Bisquare_Linear.vi ‏40 KB

  • In the slide show view how can you pin the "next" Arrow to the ultimate edge so it is in the same place as the full screen image, it will pin to the left edge but not the right.

    In the slide show view how can you pin the "next" Arrow to the ultimate edge so it is in the same place as the full screen image, it will pin to the left edge but not the right.

    Hello,
    Please make sure that the next button is pinned to the right side as there in the attached image.
    If it is already pinned, you can try removing any embedded HTML code and checking it.
    Regards,
    Neha

  • TS1702 How can I rotate a video that I made with my iPod to the correct orientation?

    How can I rotate a video that I took with my iPod to the correct orientation?  My video is sideways and I can't find a way to make it show correctly.

    See if any of the previous discussions listed on the right side of this page under the heading More Like This help.
    Also you can Google for computer apps that will change the origination of videos.

  • I'm having troube with music. Some artists that start with an "P" appear under the "R" menu and similarly throughout the alphabet. Same about albums, songs

    I'm having troube with music. Some artists that start with an "A" appear under the "B" menu and similarly throughout the alphabet. Same about albums, songs and genres. It suddenly happened after about 3 days of iOS 5 usage. Re-synchronization doesn't help. I also tried deleting some artists from ipod, but it doesn't help either.

    1) This is because of software version 1.1. See this
    thread for some options as to how to go back to 1.0,
    which will correct the problem...
    http://discussions.apple.com/thread.jspa?threadID=3754
    59&tstart=0
    2) This tends to happen after videos. Give the iPod a
    minute or two to readjust. It should now be more
    accurate.
    3) This?
    iPod shows a folder icon with exclamation
    point
    4) Restore the iPod
    5) Try these...
    iPod Only Shows An Apple Logo and Will Not Start
    Up
    iPod Only Shows An Apple Logo
    I think 3,4, and 5 are related. Try the options I
    posted for each one.
    btabz
    I just noticed that one of the restore methods you posted was to put it into Disk Mode First rather than just use the resstore straight off, I Have tried that and seems to have solved the problem, If it has thank you. previously I have only tried just restoring it skipping this extra step. Hope my iPod stays healthy, if it doesnt its a warrenty job me thinks any way thanks again

  • How do I sync my PC that is using MSN premium email to the iCloud on my IPad?

    How do I sync my PC that is using MSN premium email to the  iCloud  on my iPad

    This should be a pretty good guide for setting up the iPad with a new computer and for keeping your content.
    Don't forget to authorize the new computer as well. Launch iTunes and go to Store>Authorize this Computer.
    This is the original thread.
    https://discussions.apple.com/message/11527201#11527201
    1) Without connecting your iPad to your laptop, start iTunes. Click on Edit. Click on Preferences. Click on Devices. Check the box next to "Prevent your iPod etc. from automatically syncing." Click OK.
    2) Now connect your iPad to your laptop and start iTunes.
    3) When iTunes starts, right click on your iPad under Devices in the left column. Select Transfer purchases etc.
    4) After it finishes transferring all your apps to your new laptop, right click on your iPad and select Backup your iPad.
    5) After it finishes backing up your iPad, right click on your iPad and select Restore etc.
    6) After it finishes restoring, left click on your iPad , then click on the Apps tab on top, and check the box next to Sync Apps, then click on Apply below.
    If everything on your iPad looks good after the sync, go back and click on Edit / Preferences / Devices and UN-check the box next to Prevent your iPod etc. The only other thing you may want to check is if your contacts, bookmarks, etc. are syncing correctly now. If not, go to the Info tab after connecting and make sure you indicate which features you want to sync with what sources.
    Make sure that you move your iTunes library from the old computer to the new one as well for all of your music.
    Here is an article that can help you with that.
    http://support.apple.com/kb/HT4527

  • I deleted the pre-installed iPhoto app from my iPhone 5s by mistake. And I can't find the same app in the App Store. How do I recover it?

    I deleted the pre-installed iPhoto app from my iPhone 5s by mistake. And I can't find the same app in the App Store. How do I recover it?

    iPhoto for iOS is no longer being offered by Apple and has been replaced by the Photos app. It is not compatible with iOS 8.  This Apple document may help:  Migrating from iPhoto for iOS to Photos on iOS 8 - Apple Support

  • My setup: iMac hardline to Canon i960 printer. Issue: endless printing of the same document. The printer window states that the pinter is in use and there is nothing listed in the Print Queue.  How can I stop printing the document?

    My setup: iMac hardline to Canon i960 printer. Issue: endless printing of the same document. The printer window states that the pinter is in use and there is nothing listed in the Print Queue.  How can I stop printing the document?

    Soution: Delete the printer and add the same printer back in, therefore creating a new print queue.

  • My HD TV has two HDMI inputs which are being used by a home theater system and my RCN cable box. i want to be able to use my appleTV as well as those but do not have another HDMI input. How can i connect it so that i can use any 1 of the 3 at any time?

    My HD TV has two HDMI inputs which are being used by a home theater system and my RCN cable box. i want to be able to use my appleTV as well as those but do not have another HDMI input. How can i connect it so that i can use any 1 of the 3 at any time?

    Get an HDMI switcher. Plug in the ATV directly to the TV and then use the switcher on the other input.
    Example
    http://www.amazon.com/Ultra-High-Performance-Switcher-Switch/dp/B0015YWKYY/ref=s r_1_1?ie=UTF8&qid=1316918064&sr=8-1

  • How do I open a duplicate tab or window that points to the same URL as the current tab?

    In earlier versions of browsers, not necessarily Firefox, it used to be possible to launch a new tab or window with the same URL as the current window. I can't find a way to do this in Firefox. It always opens new windows with no URL specified.

    Hold down the control key, then drag the tab that you want to duplicate onto the tab bar.

  • How can I print an email that is on my iphone directly to the Acrobat PDF maker on my laptop if the iphone is connected to the computer via data cable?

    How can I print an email that is on my iphone DIRECTLY to the Adobe Acrobat PDF maker on my laptop if the phone is connected to said laptop via the data cable?

    Looks like I'm SOL since I don't have an HP printer.  Would never own one, the consumables are too **** expensve.  Thanks all

  • HT4236 How do you keep photos in the same sequence on the iPhone that they are on the PC folder?

    How do you keep photos in the same sequence in the iPhone as they are in the folder on the PC??

    When I sync my photos they are listed alphabetically (by folder) and within the folders, listed alphabetically again by the name assigned to the photo. The only way I can think of to keep the order that you have in your computer would be to assign a letter as a prefix to each photo. If you have more than 26 photos in a folder, you can double the letters, etc. I think that will keep the photos in the order you want.

Maybe you are looking for

  • IPhoto no longer recognises my iPhone 4

    It's bee working fine but now when my iPhone is connected it does not see it. This has happened since I created a two minute video on the iPhone using iMovie.

  • Missing photos and movies in elements 8.0

    Hi all I just bought element 8.0, convertet my catalog and everything seems to be working fine. I also have auto-analyze on. No crashes. But I realized that some media is missing (it's not a "linking"-problem. the thumbs dont's even show up - but the

  • Restore NOARCHIVELOG database in oracle 9i

    Hello guys, Please help me establish a way to restore my db. Here is the scenario ... The db version 9.2 was installed and running in the server (Windows). The DB was installed in D: drive. The C: drive of the server failed, so the server went down.

  • Upgarde From ECC 5.0 to ECC 6.0

    HI , My customer is running the E-Recuriting application on ECC5.0. They want to Upgrade this server to ECC6.0 If any one done it ealrier please tell me wht percaution we need to take before upgarding it. Details of Server SAP ECC5.0  Basis Release 6

  • Alt tags for Flash content; How do I get rid of them

    With the new Dreamweaver update, all my flash files have acquired Alt tags. I imagine this has something to do with the javascript it is now using to load the content. However, how do I get rid of them! My clients HATE them, and I do too!