How to find point of intersection of two geometry?

Hello,
Could someone give suggestion about how can i find point of intersection of two geometry?
I need just point. (x,y,z)
Thanks

declare
-- Local variables here
i integer;
l_geometry mdsys.sdo_geometry;
i integer;
l_x number;
l_y number;
l_cx varchar2(500);
l_vertexes integer;
begin
-- Test statements here
for wrk in (SELECT SDO_GEOM.SDO_INTERSECTION(SDO_GEOMETRY(2002,
1,
NULL,
SDO_ELEM_INFO_ARRAY(1,
2,
1),
SDO_ORDINATE_ARRAY(1,2,3,2,3,3,0,3,0,5,5,5)),
SDO_GEOMETRY(2002,
1,
NULL,
SDO_ELEM_INFO_ARRAY(1,
2,
1),
SDO_ORDINATE_ARRAY(2,1,2,10)),
0.005) as qq
FROM dual where SDO_RELATE(z.geometry,
SDO_GEOMETRY(2002,
1,
NULL,
SDO_ELEM_INFO_ARRAY(1, 2, 1),
SDO_ORDINATE_ARRAY(1,2,3,2,3,3,0,3,0,5,5,5)),
'mask=anyinteract') = 'TRUE')
loop
l_geometry := wrk.qq;
dbms_output.put_line('count: '||l_geometry.SDO_ORDINATES.count);
l_vertexes := trunc(l_geometry.SDO_ORDINATES.count / 2);
for i in 1 .. l_vertexes loop
l_x := l_geometry.SDO_ORDINATES(2 * i - 1);
l_y := l_geometry.SDO_ORDINATES(2 * i);
l_cx := to_char(l_x) || ' ' || to_char(l_y);
dbms_output.put_line(l_cx);
if i <> l_vertexes then
dbms_output.put_line('');
end if;
end loop;
end loop;
end;
output
count: 6
2 5
2 3
2 2
Thanks for help:)
Edited by: SVV on 16.11.2009 4:54
Edited by: SVV on 16.11.2009 9:31

Similar Messages

  • How to find the structural difference between two tables

    Hi all,
    How to find the structural difference between two tables .
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE 11.1.0.7.0 Production
    TNS for 32-bit Windows: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    Thanks,
    P Prakash

    you could try something similar to this, for each table pair that you want to compare:
    SELECT 'TABLE_A has these columns that are not in TABLE_B', DIFF.*
      FROM (
            SELECT  COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_A'
             MINUS
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_B'
          ) DIFF
    UNION
    SELECT 'TABLE_B has these columns that are not in TABLE_A', DIFF.*
      FROM (
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_B'
             MINUS
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_A'
          ) DIFF;that's assuming, column_name, data_type and data_length are all you want to compare on.

  • How to find outthe difference between the two serivce patch of Netweaver04s

    Hi,
    We have installed NetWeaver04s with sp13 patch. We want to upgrade this to latest patch avaiable on sap market place. I could see sp22 is the latest patch. I know all the procedure to download the patch. But before downloading I have to find out the difference between the latest patch available i.e. SP22 and the current patch installed i.e. SP13.
    Could anybody guide me how to see the difference between any two patches avaiable on the SAP market place?
    Let me know if you need more information on this.
    --Chandan

    Hi
    For single patch info, if you click the INFO link in window from where you download the patch. You will get the information related to that patch.
    eg
    SAPJEE05_0-10003469.SCA SP05 for SAP J2EE Engine 7.00  0 Info 53976 14.12.2005
    Try out this, can help you (some navigation required)
    http://service.sap.com/sp-stack
    Select your Product:
    Select Source and Target Release and Componenets. Click Next
    Navigate under "Additional Information"
    eg:
    SAP NetWeaver 7.0 (2004s) Support Package Stacks
    can be found on the SAP NetWeaver 7.0 (2004s) Support Package Stacks Info-Pages for each available Support Package Stack
    In the next window; again navigate further: you can find like this
    New functionality available with the relevant SP Stack is described in Section "Release Notes" as part of the SAP Library. Please refer to SAP Help Portal -> SAP NetWeaver 7.0 -> Release Notes. Each scenario folder contains the new functionality available for each SP Stack.
    eg.
    http://help.sap.com/saphelp_nw04s/helpdata/en/5b/8c3842bb58f83ae10000000a1550b0/frameset.htm
    This would give you information of changes in different releases.

  • How to find the phase difference between two signals using Hilbert transform

    hi, 
        I am new to LabView.... I am trying to find phase difference between two signals. I sucessfuly found out the phase difference between two predefined waves using single tone measurement. .... But I really want to know how can I measure phase difference between two signals( not predefined... ie we don't know the initial conditions) using hilbert transform or any transformation techniques (without using zero cross detection).. I tried by using hilbert transform based on algorithm... bt I am getting error.... plz help me
    Attachments:
    phase_differece.vi ‏66 KB

    you could try something similar to this, for each table pair that you want to compare:
    SELECT 'TABLE_A has these columns that are not in TABLE_B', DIFF.*
      FROM (
            SELECT  COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_A'
             MINUS
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_B'
          ) DIFF
    UNION
    SELECT 'TABLE_B has these columns that are not in TABLE_A', DIFF.*
      FROM (
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_B'
             MINUS
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_A'
          ) DIFF;that's assuming, column_name, data_type and data_length are all you want to compare on.

  • How to find image centroid & seperation between two images

    How to find image centroid and seperation between the images,
    i have 2 images pixel values as shown in the picture i should calculate the centroid of the image & find the distance of seperation of the image.
    help me how to do this
    I am using LabView 7.1
    thanks
    sk 
    Attachments:
    New Folder.zip ‏736 KB

    I have a center of energy program similar to the one used by IMAQ. I have attached an example using your data. I first found the center of the entire image. Then I split the array in two and found the centers of each half. That gives you the position of the two spots. This program won't work if the spots are too close to each other or are separeted in the other axis.
    Attachments:
    distance between two spots one direction.vi ‏1096 KB
    Center of energy calc.vi ‏40 KB

  • How to find out public holiday between two days.

    Can any one let me know FM to find out public holiday between two days.
    for example: i am entering two days as 10-08-2009 to 20-08-2009. We have 15-08-2009 is a holiday. FM should say that 15th August is the public holiday.
    Regards,
    Manoj.

    hi,
    you can use HOLIDAY_CALENDAR_GET FM to get the holiday calendar id .
    Then pass that calender id and date to FM HOLIDAY_CHECK_AND_GET_INFO.
    Rgds.,
    subash

  • How to find a word written with two fonts...?

    Hi,
    I have a 200+ pages document that contains some words with the first letter in Times regular and the rest in Times italic. Is there any way to find those words in the document?
    Thanks

    Ooooo, Dave ....
    Annabelle, a non scripting solution is the following.
    You cannot search for words with multiple fonts. However, since you can search for words in one font, you can exclude 'good' ones.
    I will be assuming you have a regular document, with just black text ...
    In Search & Replace, GREP, search for "\b\w+\b" with a font style of "Regular" and replace with formatting: text color red. Be sure not to accidentally put anything in the replace text field -- it should be entirely empty. Now all entirely Regular words are red.
    Repeat with the font style "Italic". Now all words that are entirely Regular or Italic are in red.
    Search for "\b\w+\b" with a text color of Black. This will find all words that are neither entirely in Italic nor entirely in Regular.
    In case you never used it before, the GREP expression means "a word boundary -- one or more word characters -- a word boundary". Essentially, it does a 'Find entire word' for any length of words.
    Note that if you have words in, say, bold, bold italic, or 46 Light Italic, you will have to mark these as well with the check colour, or else you'll also find them 'bad'.
    You might want to create a new swatch for marking, so you can delete it afterwards, replacing with Black again.
    ... Are you familiar with how to use scripts? It might be a bit easier if I wrote a tiny script, although my method will find all rogue formatted text.

  • How to find out the difference between two payloads in the BPEL/xsl

    Hi,
    We are invoking a soa service from a BPEL with 10 input parameters and getting the output for only 7 parameters (where 10-7=3 are not returned by service as they are not processed by the service due to invalid input data).
    But the BPEL process should return the 10 payloads with 3 having the failures status.i.e need to find out the difference between input payload and the payload returned by the soa service.
    Can any one tell us, how to achieve this.
    Thanks in advance,
    Ram.

    Check the instance in EM console( in 11G) or BPEL console (in 10G ) and u can see the input and output xmls.

  • How to find difference in amount between two fields in two different tables

    Hi,
    I am new to PL/SQL. I need to write a procedure to calculate the difference between two columns of two seperate tables. For example:
    I have Table a and Table b. Both with two columns Id and Amount. I need to find the difference of Amount between table a and table b value for each record in table b, store it in variable and then do further operations using that difference. Kindly help me with this.

    Something like this?
    INSERT INTO table_c (id, diff, p_or_n)
    SELECT
    a.a_id,
    a.a_value - b.b_value
    DECODE( SIGN(a.a_value - b.b_value),
      1 , 'P',
      0 , 'P',
      -1, 'N'
    FROM table_a a JOIN table_b b
    ON (a.a_id = b.b_id);
    -- Ranit

  • How to find the sum based on two variables

    Hello!
    I have just started using Numbers, I have a spreadsheet which lists a number of transactions.
    On my chart I have Columns "Date", "Memo", "Type", and "Amount".
    The Type column is a drop down list. What I want to do and find the sum for transactions that fall between a date range (i.e. months 1-3) and that match a certain "Type". I can figure out how to use the sumif function to find the sum for a date range, however I cant figure out how then to only sum only those that match a type.
    Any help?

    Brendon,
    This question arises from time to time in different situations. The answer is to first create an auxiliary column which calculates whether or not your multiple conditions have been met. In this case you have three - more than or equal a start date, less than or equal an end date, and a "Type".
    I'm assuming that your dates and "type" are flexible, so an extra table to enter your search data is shown below, but these three cells could be incorporated in your main table. The formula for the auxiliary column is:
    =IF(AND(Date>=Search Range :: A$2,Date<=Search Range :: B$2,Type=Search Range :: C$2),"SUM","")
    All rows with the word "SUM" satisfy the three conditions. The footer row contains the sum of the values meeting the desired conditions using:
    =SUMIF(Aux, “SUM”, Amount)
    Obviously this has to be reworked to your situation, but the auxiliary column is the key.
    pw
    Message was edited by: pw1840

  • How to find diffrence in columns from two tables

    Hello,
    I have table TABLE1 and TABLE2 with same columns. One of the columns in both tables is ID
    Now there are records in table TABLE1 with ID=1
    and in table TABLE 2 with ID=-1
    Now I want to find if there are any column differing in values in tables TABLE1 for ID=1(for TABLE1) and TABLE2 for ID = -1 (for TABLE2)
    What is the best way to find the diffrence?
    Thanks in advance.

    Hello Subhash,
    Why don't you try NOT EXISTS functionality? Its quite performance effective too.
    select * from table1
    where NOT EXISTS
    (select 1 from table 2
    where table1.ID = table2.ID)
    UNION
    select * from table2
    where NOT EXISTS
    (select 1 from table 2
    where table1.ID = table2.ID)You can go for UNION if required, or else you can use them separately.

  • How to find diff time interval btw two times

    hi every body,
    my question : i ll give
    start date and end date,
    start time and end time as input.
    i want output ,time interval btw start time and end time
    for exp: i ll give 7 to 11 as input.
    tables have data like 7 to 7.29.59 ---> 1 prog
    8.00.00 to 9.29.59-----> 2 prog
    10.00.00 to 10.29.59--->3 prog
    i want to find time gap btw the progs and want display output as like 7.30.00 - 7.59.59 --->1 interval
    9.30.00-9.59.59 ---> 2 interval
    10.29.59-11.00.00---->3 interval

    Hi,
    declare some tmp WA as wa_tmp
    loop the data.
    adding from date.
    wa_tmp = data-from + 1 .
    read the next line
    read table data index sy-tabix + 1
    wa_tmp = to date of next line - 1.
    then append wa_tmp to final it.
    endloop.
    Hope it helps.

  • How to find the time difference..?

    HI
    How to find the time difference between two times
    for Example
    the difference between '24/10/2005 8:25:00 PM' and '25/10/2005 5:20:00 AM'
    is 8.55
    Kris

    This is a procedure taht do the job
    CREATE OR REPLACE FUNCTION Diff_Time
         LD$Date_Deb IN DATE DEFAULT SYSDATE
         ,LD$Date_Fin IN DATE DEFAULT SYSDATE
         ,LN$JJ       OUT PLS_INTEGER
         ,LN$HH       OUT PLS_INTEGER
         ,LN$MI       OUT PLS_INTEGER
         ,LN$SS       OUT PLS_INTEGER
      ) RETURN NUMBER
    IS
      dif   NUMBER ;
    BEGIN
      IF LD$Date_Fin < LD$Date_Deb THEN
         RETURN ( -1 ) ;
      END IF ;
      SELECT  LD$Date_Fin - LD$Date_Deb INTO dif  FROM dual ;
      SELECT  TRUNC ( LD$Date_Fin - LD$Date_Deb)  INTO LN$JJ  FROM dual ;
      SELECT  TRUNC ( (LD$Date_Fin - LD$Date_Deb) * 24) -  ( LN$JJ * 24 ) INTO LN$HH FROM dual ;
      SELECT  TRUNC ( (LD$Date_Fin - LD$Date_Deb) * 1440) - ( (LN$HH * 60) + ( LN$JJ * 1440) ) INTO LN$MI FROM dual ;
      SELECT  TRUNC ( (LD$Date_Fin - LD$Date_Deb) * 86400) - ( (LN$MI * 60) + (LN$HH * 3600) + ( LN$JJ * 3600 * 24 ) ) INTO LN$SS FROM dual ;
      RETURN( dif ) ;
    END ;
    /You may have to modify it to fit your own requirement.
    Francois

  • How to find intersection point between a lineseries and a vertical line.

    I have a lineseries chart (refer the screenshot). As I move the spend slider shown in the attachment, a vertical line is drawn in the chart. (I did this using the cartesian canvas as annotation element - using canvas.moveTo(), canvas.lineTo() functions)
    I want to find out the intersection point(y value) where the vertical line meets the lineseries. Can someone help me on this. It will be really helpful.
    Thanks,
    Jayakrishnan

    Here are a few functions I wrote years ago for common chart transformations... the function you're going to focus on for your solution is chartToScreen...
    *  Converts the screen position to chart value position
    *  @param thePos - Number - The position you want to convert
    *  @private
            private function getChartCoordinates(thePos:Point):Object
                   var tmpArray:Array = dataTransform.invertTransform(thePos.x, thePos.y);
                   return {x:tmpArray[0], y:tmpArray[1]};
    *  Takes a non-numeric chart value and returns a proper numeric value
    *  @param inValue - String - The display name of the instance showing on the axis (eg. if we're showing months, it might be 'Sep - 06'
    *  @param theAxis - IAxis - The axis on which we're looking
              public function getNumericChartValue(inValue:String, theAxis:IAxis):Object
                   var axisCache:Array = new Array({inValue: inValue})                 
                   if(!(theAxis is LinearAxis))
                        theAxis.mapCache(axisCache, "inValue", "outValue", true);
                        return {numericValue: axisCache[0].outValue}
                   else
                        return {numericValue: Number(inValue)};
    *  Converts the chart values into screen coordinate values
    *  @param chartX - Number - The display name of the instance showing on the axis (eg. if we're showing months, it might be 'Sep - 06'
    *  @param chartY - Number - The axis on which we're looking
              public function chartToScreen(chartX:Number, chartY:Number, theSeries:Series):Point
                   var tmpCache:Array = new Array({chartX:chartX, chartY:chartY});
                   if(theSeries)
                        theSeries.dataTransform.transformCache(tmpCache, "chartX", "screenX", "chartY", "screenY");
                   else
                        dataTransform.transformCache(tmpCache, "chartX", "screenX", "chartY", "screenY");
                   return new Point(Math.round(tmpCache[0].screenX), Math.round(tmpCache[0].screenY));
    *  takes a point in mouse position, and runs it through converting to chart coordinates, converts chart coordinate to numeric value if needed
    *  and then back into mouse position to get the nearest axis snap point
    *  @param thePoint - Point - The position we're converting
    *  @private
              private function getSnapPosition(thePoint:Point):Point
                   var chartPoint:Object = getChartCoordinates(new Point(thePoint.x, thePoint.y));
                   //if either of the axis chart results is not in numeric format, we get the numeric equivalent of it
                   var chartX:* = chartPoint.x;
                   var chartY:* = chartPoint.y;
                   chartX = getNumericChartValue(chartPoint.x, CartesianChart(this.chart).horizontalAxis).numericValue;
                   chartY = getNumericChartValue(chartPoint.y, CartesianChart(this.chart).verticalAxis).numericValue;
                   return chartToScreen(chartX, chartY, null);

  • HT1199 My iTunes music list all have the exclamation point.  I do not know how to find the files to restore the music.  Any advice?

    All the songs in my iTunes have the exclamation point.  I do not know how to find location of the music...any suggestions?

    Ok, your music could be in one of a coupel formats, MP3 or, more likely, Apples AAC format, which has a m4a prefix.  Open Finder.  Hold Command and press F, this will open a search window in the top of Finder.  Type mp3 here, let it search.  If it finds your music files, double tap on one and "open Enclosing Folder"  That should show you where they are at.  If nothing is found, try searching m4a instead.  One of the two should show you where your music is.

Maybe you are looking for

  • Mac mini display is flicking via HDMI to DVI adapter and DVI cable

    i have received mac mini server (mid 2011) recently. mac mini is connecting the display via HDMI port using DVI cable with a HDMI to DVI adapter. the display shows constant flicking. white dots/lines show randomly. it is like those signal noise when

  • Why is the video in my timeline upside down and black and white.

    Same thing happens when I hover scub in the source window.

  • How to change the Admin's short name?

    I just got my Powerbook G4 back from repair and when they loaded on OSX they made the short name just "a." Not that it is a very big deal but I get frusterated when in the finder it says "a's computer" I really wish I could change my short name for t

  • CS3 brushes w/Angle jitter set to 'Direction' crash ps everytime.

    For months my custom brushes have been crashing ps in under 12 brush strokes. At first I though it might be because the TPL files were corrupt. I went back into CS2 and converted all the brush TPL files to ABR and reimported to CS3 -no change. Then s

  • PR Create

    Hi experts, I am new to the Workflow, I have got one scenario so i need the guidance from your side... PR Create u2013 When a PR is created and saved, release strategies and workflow approval program determine the approvals required and route to appr