Oracle Spatial function to find the closest channel line according to lat/long

Hello

Here's my scenario. I have a table that contains the geometries of type line (road network) channels. The line geomteries are of type Ohio state South (SRID 41104) plan.
I have a requirement - given a lat/long, find the string line that aligns with this lat/long or the nearest set of strings of line at 0.02 miles.
It is a typical example of an attempt to identify an accident on our road network situation. Accidents reported us in lat/long through the GPS system.
How can I achieve this through any space function?

Thanks for the help in advance.

Thank you
L.

Hello L,

SELECT
  r.
FROM
  roadsegments r
WHERE SDO_NN(r.geometry,
             sdo_geometry(2001, 41104, sdo_point_type(lat,lon,NULL), NULL, NULL),
             'sdo_num_res=2 distance=0.02 unit=mile') = 'TRUE';

This will give you the two segments of road nearest you at 0.02 miles. See [url http://docs.oracle.com/cd/E11882_01/appdev.112/e11830/sdo_operat.htm#i78067] documentation on the operator SDO_NN, especially the bit about the use of the index indicator.

HTH,
Stefan

Tags: Database

Similar Questions

  • Function to find the number of lines to display by the foreach loop?

    Hi all

    Is it possible to find the number of lines to display per the foreach loop in the rtf model?
    We need to get the number of rows without using the count() in the xml file.
    We do some calculations based on the count in the rtf model.

    Thanks in advance

    Paste your file xml here, patients show us how count.

    You can count the number of lines.

    use

  • Given Oracle Spatial are stored in the database tables?

    Given Oracle Spatial are stored in the database tables?

    Oracle spatial is DBMS oracle server functionality. It allows you in NATIVE mode, store and manage all standard types of spatial data and their attributes and metadata in the oracle database enterprise, in the way that you are quite familiar with. on top of standard oracle database features, adds types of geographic data, spatial index, geometric operators and queries, functions, spatial and analytical, to name a few.

    MapViewer is a feature of Oracle Fusion Middleware, which makes cards using spatial data managed by Oracle Spatial. That's what you called "generator of maps. but of course, it's not just a map generator, he has much more to offer, such as MapBuilder, WMS, Oracle cards.

    For more information, please see the technical details:

    http://www.Oracle.com/technology//products/spatial/index.html
    http://www.Oracle.com/technology/products/MapViewer/index.html

  • 1 - where is the search function to find the authors muse a list?

    1 - where is the search function to find the authors muse a list?

    Hello

    Regarding your first question of the creation of a search box in your site from muse, please see this forum post:- Re: how to create a search box in MUSE?

    In addition, you can use different widgets available on Adobe Exchange .

    Now, regarding your second please can question of the creation of a bulleted in Muse, you these tutorials:

    Adobe help Muse | Bullets and numbers

    Bullets and lists numbers | Adobe Muse CC tutorials

    Now, it seems that the Muse version you are using is obsolete and it is possible that you might not find these features in it. I would ask update you your Muse to the latest version 2014.2 using the CC desktop application to take advantage of all these features. Please refer to this screenshot:- http://prntscr.com/55uvs9

    Hope this helps

    Kind regards

    Rohit Nair

  • Find the closest CMYK Pantone spot colors?

    CS6 on a MacBookPro using

    Is there a way to find the closest matching Pantone shades of CMYK, I created in Illustrator?

    I know it's easy in Photoshop using the color picker, but there must be a way to do that in Illustrator.

    Help?

    Use Photoshop in tandem to do this.  You first need to know what book of Pantone color you plan to use.  As far as I know it is usually solid uncoated.

    1. Open your file IN Photoshop.
    2. Make sure you only choose CMYK as color mode (this is very important).
    3. Take the color eyedropper ( I )
    4. Click the first color
    5. Then click the shade 'picked' in your toolbar
    6. In the Picker dialog, choose "color libraries".
    7. You can now navigate PANTONE Solid not clothed with the top down in the next window
    8. At this point, Photoshop will match your selection with a color of the library of the PANTONE colors you have chosen.  Write it down.
    9. Jump to Illustrator.
    10. Choose a shape with the same color initially selected in Photoshop.
    11. In the window of your color chart, click on the small icon in the lower left (it says 'Menu libraries of nuances' bubble)
    12. Place the cursor of color books, and then click "Pantone Solid non-couche.
    13. Wow! Box of the Rainbow! But it's messy, so let's clean it up.
    14. In the palette options drown down (it's the icon at the top right that looks like an arrow with a bunch of lines), choose "sort by name".
    15. Now you can easily select the PANTONE color Photoshop guessed for you.
    16. The selected part of the work updates automatically to the PANTONE color, you clicked on on.j

    It is MUCH simpler than it seems.  I just explain like you MIKE.

  • How to find the closest higher value?

    Hi all

    I want to select the closest higher value in my data (test data are below):
    with test_data as
    ( select 0.21 as val1, 0.19 as val2 from dual
      union all
      select 0.21 as val1, 0.29 as val2 from dual
      union all
      select 0.21 as val1, 0.49 as val2 from dual
      union all
      select 0.67 as val1, 0.49 as val2 from dual
      union all
      select 0.67 as val1, 0.69 as val2 from dual
    )
    select * from 
    (
    select 
    val1,
    val2,
    rank() over (order by abs(val2 - val1)) nearest
    from test_data
    )
    where nearest = 1;
    output:
    VAL1    VAL2    NEAREST
    0.21     0.19     1
    0.67     0.69     1
    Output of this query is the NEAREST value to the value in the column of VAL1. But I would get the SUPERIOR value CLOSEST. As below the value at the higher value 0.21 closest isn't 0.29 0.19.

    desired output:
    VAL1    VAL2
    0.21     0.29
    0.67     0.69
    Is it possible to get the features you want using analytical functions?

    Thx for the help!

    Kind regards

    Jiri

    Published by: Jiri n. 10 October 2012 01:14
    with test_data as
    ( select 0.21 as val1, 0.19 as val2 from dual
      union all
      select 0.21 as val1, 0.29 as val2 from dual
      union all
      select 0.21 as val1, 0.49 as val2 from dual
      union all
      select 0.67 as val1, 0.49 as val2 from dual
      union all
      select 0.67 as val1, 0.69 as val2 from dual
    )
    
    select
     val1
    ,val2
    ,first_value(val2) over (partition by val1 order by
       case when val2 >= val1 then 1 else 2 end
       , val2
     ) nearest
    from test_data
    
    VAL1 VAL2 NEAREST
    .21 .29 .29
    .21 .49 .29
    .21 .19 .29
    .67 .69 .69
    .67 .49 .69 
    
  • Function to find the County of ocurrances of an XML tag in developer j

    Hi all

    I need to find the number of xml tag that appears more than once in an xml load.

    I have not found any function in bpel in doing so. I use the developer of j 11.1.1.5.0 and SOA Composite editor version 11.1.1.5.0.01.74 version

    Is there any function in Bpel giving as the number of occurrence of an element in a payload?

    Kindy suggerez_ me on this.

    Hello

    You must use the ora:countNodes () function.
    For example:
    Ora:countNodes('inputVariable','payload','/client:GetData/client:input')

    Arik

  • Tasks Ant BPM Oracle with Oracle BPM Studio cannot find the jar

    Hello

    There is this documentation
    http://download.Oracle.com/docs/CD/E13154_01/BPM/docs65/anttasks/index.html

    which tells how to run Ant tasks to perform different tasks on Oracle BPM. In ALL the examples in the doc and the INTERNET there is this line in build.xml

    < name of project = "OracleBPMExample" xmlns:fuego = "antlib:fuego.tools.ant.enterprise" >

    Now, could someone please tell me where to find fuego.tools.ant.enterprise. Ive searched every pot in my system and could not find such package. What I've discovered, it should be something like fuego - antlib.jar, but if it is well known and well discussed is NOT AVAILABLE EVERYWHERE.
    Help, please. IM using Oracle BPM 10.3.2

    Kind regards
    Pawel

    You are right Mike... The Ant tasks help you do not treat admin stuff... While in enterprise environments, you can all script and requires no manual and other deployment.

    Just download 10g business... the library will be there...

    HTH

  • Any function to find the difference?

    Hi all

    Rtf model we are performing manual calculations.
    We need to find the difference between two values.
    Is there a function that is used to find the difference between the two values in rtf model?

    Pointers on the same are appreciatable

    Use absolute funcion.

  • find the closest value in table

    Hi all

    I need to find the values in the "C" line which is equal or close to the values 'A' in the 2D array, and then I want to show the values of 'B', corresponding to the values of 'C' in table 2D.

    How can I fix it?

    Thank you!

    0.9967 nearest value is 0.993807 in the 8 Cand in row B row, not 1. The differences are 2.893E - 3 and 3.300E - 3.

    Subtract each value from the table C. take the absolute value of the difference. To find the index of at least using Max & Min value of B. Using autoindexing array Index, create the output array.

    Lynn

  • Function to find the name of the nth month [V 10 g]

    Hi Experts,

    Please, help me find the name of Nth last month [months].

    Simply use a variable?

    SQL > n number of var
    SQL > exec: n: = 3

    PL/SQL procedure successfully completed.

    SQL > select to_char (add_months (sysdate,: n), 'Month') twice;

    TO_CHAR (ADD_MONTHS (SYSDATE,: N), 'MOUNT)
    ------------------------------------
    December

    1 selected line.

    SQL > exec: n: = - 1

    PL/SQL procedure successfully completed.

    SQL > select to_char (add_months (sysdate,: n), 'Month') twice;

    TO_CHAR (ADD_MONTHS (SYSDATE,: N), 'MOUNT)
    ------------------------------------
    August

    1 selected line.

    SQL > exec: n: = 1658

    PL/SQL procedure successfully completed.

    SQL > select to_char (add_months (sysdate,: n), 'Month') twice;

    TO_CHAR (ADD_MONTHS (SYSDATE,: N), 'MOUNT)
    ------------------------------------
    November

    1 selected line.

  • Find the nearest parallel line and ignore perpendicular line

    Hello

    We have two sets of linear facilities. We would like to find the nearest line of the other set of geometry, but preference should be given to the parallel lines as the perpendicular ones more.

    I was intending to use the suite response I see in this forum.
    extract the parallel roads

    Is another way?

    Thank you
    Frédéric

    Frederick,

    It really depends on what you're trying to determine from your data. I noticed that you included 'street' in your tags. Are you trying to link Street - axis facades, utilities or the plots?

    If you use buffering as John suggested, get an account for characteristics how target your buffer interacts with. In some cases (say the intersections of streets) where you will get multiple occurrences, you can compare the angles/slopes to identify the one who more parallel.

    Note that line buffering will produce a Cheeto (right, with well rounded rectangle). The Cheeto may interact with more than 1 target function if your buffer is too big and the characteristics of the target are tip-to-tail connected - and each of these objectives can be parallel to your line. If it's a problem, you can calculate distances to your targets and choose Next. You will probably always compare the slopes to eliminate false positives at intersections.

    In support of geocoding, I once to the streets adjacent plots and tried the above approaches and found that they do not have sufficient accuracy to dead end or corner-bulbs bulbs. Instead, I used the rotation value of the parcel labels (always placed perpendicular to the street) to generate features of research at the intersection of the adjacent streets. These search functions have variable length depending on the type of street. There were still a few false positives due to errors of data (e.g., misguidance label type, incorrect of streets, etc.), but little enough to dump a body to.

    Kind regards
    Noel

  • Find the end of line

    Is it possible to find and change a character at the end of each line in a text block?

    I know that GREP Indesign can't do this, GREP finds that the end of the paragraph, not lines.

    I understand that this is a problem because whenever the text block is changed, you have another character being changed.

    Is it possible to do it with a script?

    I have attached a picture of what I want to do.

    The text in the image is Hebrew (language R2L) and the end of the line is on the left.

    Any help would be great.

    Saami

    exemple.jpg

    Hello

    Assuming that your text is inside one or more blocks of text that are connected. Select one of them and run this:

    -------------

    myLines = app.selection [0].parentStory.lines;

    for (k = 0; k

    If (myLines [k] .characters [-1] == "\r") / / If there is an end of paragraph

    .silence .characters-[2] myLines [k] = "z";          / / change a penultimate character 'z'

    of other myLines [k] [-1] .characters .silence = "z";     / / otherwise change a last character 'z'

    }

    ------------

    It's just to show the way.

    Hope in the fact that you walk

  • How to find the number of lines in the content of the text?

    Hi all

    I have a multi line text element. I want to know the number of lines in a text element? How can I do?

    Note that all lines end with the SHIFT + ENTER.

    Example,

    It is a

    sample.

    After the line there is a there is (SHIFT + ENTER).

    Thanks for any help.

    Whenever the user enters the shift-enter, Photoshop inserts a control [EOT] (end of text) (\x03 or \u0003) character in the string.

    Also, in order to divide the text according to multiple separators in a single call, it is necessary to use a regular expression instead of a string.

    Try replacing:

    var theArray = theText.split("\r");
    

    with:

    var theArray = theText.split(/[\u0003\r]/);
    

    BTW, you can improve performance by explicitly asking the textKey for the current object of the layer property.

    Try using:

       ref.putProperty( charIDToTypeID("Prpr"), stringIDToTypeID("textKey") );
       ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
    

    Instead of:

       ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
    

    HTH...

  • The search function will find the content of the banner?

    I see that the search only works with items and NO banners and collections. It will be something that will be added to collections or banners.

    (1) is currently only to objects.

    (2) Yes, at one time given, it can be extended, but there is no time horizon clear for when and if it will happen.

Maybe you are looking for

  • How can I stop Firefox remembering logins?

    When I connect to a website, Firefox is remembering names. I changed all the settings I know, but it continues to insist on "suggesting" to login names. How can I disable this function?

  • Add a color to a grayscale image

    Hello We are acquiring in real time an U16 image grayscale through a CCD camera. I don't know the correct term to do, but, we want to add a color top mask (so that the gray image gets a color overal). We do not want to change the file to the actual i

  • HP G62-149WM TROUBLESHOOTING SCREEN

    Need help ASAP! Hello aid... so here's the problem! I decided to turn off Internet Explorer through the OFF... but TURN WINDOWS FEATURES ON AND after it restarts, my screen resolution is at 1280 × 800 and I don't know how to get back to his original

  • I was told to uninstall and reinstall itunes. Where can I find to reinstall?

    I have Windows Xp home version.  My itunes would not work.  I couldn't connect to the store.  A note came that morning did not work.  The cure was to uninstall itunes and then reinstall it.  I've removed, now where can I find to reinstall?

  • How to determine the part number of replacement fan

    How can I determine what fan I need to order for a Pavillion DV6 age of 4 years. Fan is wearing out I think. He snores and hums, but if I hit the computer it stops for awhile. Sounds very mechanical. I'd rather do not disassemble the laptop until I h