Spatial query to find all partially aligned lines

Hi There.
I need to find all partially aligned polylines in the layer (interiors have 1-dimentionali intersection). Actually, polylies may a little fluctuate along each other, but that spatial disjointment shouldn't exceed some certain tolerance. It doesn't matter if polylines are touching each other or cover.
What spatial operators/functions will you suggest to use to perform that stuff?
For example next lines for me are partially aligned in tolerance 0.01 (query result is TOUCH):
select sdo_geom.relate(
mdsys.sdo_geometry(2002,null,null, mdsys.sdo_elem_info_array(1,2,1), mdsys.sdo_ordinate_array(1,1,4,4)),
'determine',
mdsys.sdo_geometry(2002,null,null, mdsys.sdo_elem_info_array(1,2,1), mdsys.sdo_ordinate_array(1.1,1,3.015,3)),
0.01) relationship
from dual;
Note: I can't use buffers because it isn't stable for me :( see: SDO_GEOM.SDO_BUFFER failed with ORA-13050
Thank you in advance, Denis.

Thank you for quick response!
The lines are valid at that tolerance.
I think that TOUCH+COVERS+COVEREDBY will not be sufficient for me. Because I'm interested in next cases: OVERLAPBDYINTERSECT, INSIDE, CONTAINS, COVERS (any operator which includes overlapping for lines). I can use union of all those masks, but TOUCH will return me many redundant candidates (Often lines are touch but not overlapping, like: (1,1,2,2) VS (2,2,3,3)). The TOUCH works for me if one poliline touches the other and goes along it some time (like I showed above). Hope I was clear :).

Similar Messages

  • Sql query to find all contacts for an account

    I wonder if someone wrote an sql query to find all contacts for an account number in Oracle customer master. We are on EBS 11.5.10.
    I am also looking for sql query to find all ship to addresses for an account number.
    Thanks.

    Can you also post the query for people who read this post and are also looking for an answer?
    Regards,
    Johan Louwers.

  • Query to find all the view name and their size in GB

    Hi,
    What is the query to find all the view name and their size in GB.I am aware of joining all_views and user_segments but this is not serving the purpose.is there any table i need to join to get the desired result
    Thanks

    You could of course be thinking of views as they are stored in other RDBMS' as some of them actually create the view as a table on the database with a copy of the data in it and maintain that data as the base tables are updated.
    As already mentioned, Oracle just stores the SQL of the View and executes that SQL when the view is queried.
    Alternatively, Oracle also has "materialized views" which are created as snapshots of the data and will have a size. This data is updated (refreshed) based on the parameters used when creating the materialized view which means that it will either be, commonly, when a commit is issued or when a refresh is explicitly requested (refresh on demand).

  • Query to find all the suppliers who has their invoices on hold

    Hi All,
    Query to find all the suppliers who has their invoices on hold (at least 1) .
    Thanks,
    Vamshi

    Pls find the script to find the Hold invoies for those suppliers 
    select aps.VENDOR_NAME,aia.INVOICE_NUM,aia.INVOICE_AMOUNT
    from ap_suppliers aps,ap_invoices_all aia,ap_holds_all aha
    where aia.VENDOR_ID = aps.VENDOR_ID 
    and aia.INVOICE_ID = aha.INVOICE_ID 
    and aha.RELEASE_REASON is null
    Thanks
    Hari

  • Query to find all tasks on latest published version of a project

    Hello
    Can anybody help me on the query to find all tasks under latest published version of a project?
    Thanks!!

    Do you mean  "All tasks under latest published workplan version"??

  • Query to find all relationships between tables

    Please help me wit the following
    Query to find all relationships between tables
    SAMPLE OUTPUT:
    PRIMTAB PRIMCOL FOREIGNTAB FOREIGN KEY
    DEPT DEPTNO EMP DEPTNO
    Return all records in the database.
    PLEASE HELP

    SET LINESIZE 150
    COLUMN primcol FORMAT A30
    COLUMN foreigncol FORMAT A30
    SELECT uc1.table_name AS primtab,
    ucc1.column_name AS primcol,
    uc2.table_name AS foreigntab,
    ucc2.column_name AS foreigncol
    FROM user_constraints uc1,
    user_constraints uc2,
    user_cons_columns ucc1,
    user_cons_columns ucc2
    WHERE uc1.constraint_name = uc2.r_constraint_name
    AND uc1.constraint_name = ucc1.constraint_name
    AND uc2.constraint_name = ucc2.constraint_name
    AND ucc1.position = ucc2.position
    ORDER BY uc1.table_name,
    ucc1.position
    /

  • Is there a query to find all software installed on a particular computer through the Add/Remove Programs?

    I am looking for a query to find all software on a specific computer. I have found several on a specific piece of software but I need multiple pieces of software. I have tried creating this query but it shows ALL the software on the computer. I'm looking
    for one that narrows it down to a few pieces of software i.e Office, Adobe, Snagit, IE and Chrome. Possibly using Add/Remove Software? 

    It's an asset intelligence report, do you have that enabled?
    http://technet.microsoft.com/en-us/library/gg699382.aspx
    Alternatively, take a look at the 'Products on a specific computer' report (Software - Companies and Products category) and see if that gets you what you need.
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • BO SDK Query to find all folders that a user has access to

    Hi Experts
    Please help me on BO SDK Query to "find all folders that a user has access in a single query".
    I am tried trial & error using PARENTS & CHILDREN. nothing worked
    Please advice
    Thanks!
    Prasath

    Hi Aasavari
    I am checking BO Web services samples and .NET samples. Please advice me the correct files to check the user/folder rights.
    Thank you so much
    Prasath
    http://wiki.sdn.sap.com/wiki/display/BOBJ/NETWebServicesSDKSamples

  • What's the query to find all requests' name of all modules EBS R12.1.3??

    What's the query to find all requests' name of all modules EBS R12.1.3??
    Regards:
    Shahzad M. Saleem

    Dear rioman !!!
    Thanks!!
    Regards:
    Shahzad M. Saleem

  • Query to find all text attachments for items

    I am using the query below to try to find all active items for my org that have an attachment of type 33 (something we have defined I believe) and contain specific text. Some of the items appear to meet all criteria (active, right category, etc) but do not show up in my results. Can someone please take a look and see if there is a join missing, an outer join that should be used, or an overall easier way to do this query and get the text information?
    SELECT i.segment1 "Item Number",
    i.description "Item Description",
    u.user_name || ' (' || ppx.first_name || ' ' || ppx.last_name || ')' "Created By",
    i.creation_date "Created Date",
    to_number(r.revision) "Revision",
    to_char(r.effectivity_date, 'MM/DD/YYYY') "Effectivity Date",
    nvl(tx.short_text, '<No Drawing Info>') "Drawing Info / Attachment"
    FROM apps.mtl_system_items_b i,
    apps.mtl_item_revisions_b r,
    apps.fnd_user u,
    apps.per_people_x ppx,
    apps.fnd_attached_documents ad,
    apps.fnd_documents d,
    apps.fnd_documents_tl t,
    apps.fnd_documents_short_text tx
    WHERE i.organization_id = 90 AND -- for MBE only
    r.organization_id = 90 AND -- for MBE only
    ad.pk1_value = 90 AND -- for MBE only
    ad.entity_name = 'MTL_SYSTEM_ITEMS' AND
    (upper(tx.short_text) LIKE '%DWG%' OR
    upper(tx.short_text) LIKE '%SIZE%' OR
    upper(tx.short_text) LIKE '%DRAW%') AND
    tx.short_text != 'DWG NONE' AND
    d.document_id = t.document_id AND
    t.source_lang = 'US' AND
    t.LANGUAGE = 'E' AND
    to_number(ad.pk2_value) = i.inventory_item_id AND
    t.document_id = ad.document_id AND
    tx.media_id = t.media_id AND
    d.category_id = 33 AND
    i.inventory_item_status_code = 'Active' AND
    i.inventory_item_id = r.inventory_item_id AND
    u.employee_id = ppx.person_id AND
    u.user_id = i.created_by AND
    to_number(r.revision) =
    (SELECT MAX(to_number(r2.revision))
    FROM apps.mtl_item_revisions_b r2
    WHERE r2.inventory_item_id = i.inventory_item_id) AND
    r.effectivity_date =
    (SELECT MAX(r3.effectivity_date)
    FROM mtl_item_revisions_b r3
    WHERE r3.inventory_item_id = i.inventory_item_id)
    GROUP BY i.segment1,
    r.revision,
    i.description,
    u.user_name,
    ppx.first_name,
    ppx.last_name,
    i.creation_date,
    r.effectivity_date,
    tx.short_text
    ORDER BY i.segment1 ASC;
    Thank you!
    Message was edited by:
    matt.schutz

    There is no workbook/worksheet linkage to a business area. So you cannot search for a business area and find all the workbooks "attached" to that business area. The attachment of workbooks is at the folder level. It is actually possible, if you are sharing folders among business areas, to create a workbook with data from 2 or more business areas. I have tested that and it is indeed possible. In Discoverer Administrator you can check on folder dependencies to see what workbooks use the folder. Though in my version of Discoverer, there is a problem with Discoverer Plus, such that the workbook save in Plus is not creating this dependency information like it should. At least I have not found any way to take a business area and determine what workbooks would fall under it. Maybe someone else has found a way.
    John Dickey

  • Why do i get ORA-03113 when doing a spatial query against union all view?

    Hi, i created the following view
    CREATE OR REPLACE FORCE VIEW cola_markets_v
    AS
      (SELECT mkt_id, NAME, shape shape_a, NULL shape_b, NULL shape_c,
              NULL shape_d
         FROM COLA_MARKETS
        WHERE NAME = 'cola_a')
       UNION ALL
      (SELECT mkt_id, NAME, NULL shape_a, shape shape_b, NULL shape_c,
              NULL shape_d
         FROM COLA_MARKETS
        WHERE NAME = 'cola_b')
       UNION ALL
      (SELECT mkt_id, NAME, NULL shape_a, NULL shape_b, shape shape_c,
              NULL shape_d
         FROM COLA_MARKETS
        WHERE NAME = 'cola_c')
       UNION ALL
      (SELECT mkt_id, NAME, NULL shape_a, NULL shape_b, NULL shape_c,
              shape shape_d
         FROM COLA_MARKETS
        WHERE NAME = 'cola_d');added the necessary entries in USER_SDO_GEOM_METADATA and created a spatial index on COLA_MARKETS (SHAPE). However, when i do a spatial query against this view, i get ORA-03113. A spatial query against the base table works fine. Any ideas why this happens? (This is Oracle 10.2.0.3.0)
    Thanks in advance, Markus
    PS: This is my spatial query
    SELECT *
      FROM cola_markets_v t
    WHERE sdo_filter (t.shape_a,
                             SDO_GEOMETRY (2003,
                                           NULL,
                                           NULL,
                                           sdo_elem_info_array (1, 1003, 3),
                                           sdo_ordinate_array (1, 1, 2, 2)
                             'querytype=window'
                            ) = 'TRUE';

    Thank you for your reply. I have tried it with 11.1.0.6.0 today and it works. This might be an issue with 10.2.0.3.0.

  • Query to find all Debug profile & trace values on PO module

    Hi
    we are using oracle11i(11.5.10.2 on windows 2000 server)
    i want to know all debug & trace values for PO & workflow moule using query.
    is any one having idea regarding query?
    Thanks
    With Regards
    A-Z

    Please see these docs/threads.
    Problem with 11.5.10.2
    Problem with 11.5.10.2
    Query To Get Enabled Trace/Log/Debug Profile Options [ID 559618.1]
    Also, see this docs for the queries you can run to list the value of the profile options at all levels.
    Note: 201945.1 - How to list E-Business Suite Profile Option values for all levels using SQLPlus
    Note: 282382.1 - How to Search all of the Profile Options for a Specific Value
    Note: 367926.1 - How To Find All Users With A Particular Profile Option Set?
    Thanks,
    Hussein

  • Query to find all workbooks/worksheets for each business area

    Hi Experts,
    I need to find all workbooks/worksheets in each business area. Collect 'Query Statistics is checked for all the users'
    Also are there any documents or information available of the description of the discoverer metadata database tables which will help in writing queries
    thanks and regards,
    John

    There is no workbook/worksheet linkage to a business area. So you cannot search for a business area and find all the workbooks "attached" to that business area. The attachment of workbooks is at the folder level. It is actually possible, if you are sharing folders among business areas, to create a workbook with data from 2 or more business areas. I have tested that and it is indeed possible. In Discoverer Administrator you can check on folder dependencies to see what workbooks use the folder. Though in my version of Discoverer, there is a problem with Discoverer Plus, such that the workbook save in Plus is not creating this dependency information like it should. At least I have not found any way to take a business area and determine what workbooks would fall under it. Maybe someone else has found a way.
    John Dickey

  • Query to find all journals which make up the balance on a GL Account?

    How can i query to find out all the journals which make up a balance on a particular code combinations balance?
    We are on R12 - 12.1.3

    Hi,
    You can try this:
    select l.effective_date, l.description, nvl(l.accounted_dr,0) - nvl(l.accounted_cr,0)
    from gl_je_lines l, gl_code_combinations cc, gl_je_headers h
    where l.code_combination_id = cc.code_combination_id
    and l.je_header_id = h.je_header_id
    and l.ledger_id = <ledger id>
    and h.currency_code = '<currency code>'
    and cc.code_combination_id = <code combination id>
    Octavio

  • Query to find sum and detail lines

    <br>
    Hi
        I have these tables po_requisition_headers poh and
    po_requisition_lines_all pol
    poh table
    header_id          req_num
    2342                  13222
    4562                  13245
    7867                  13678
    po lines table
    line_id header_id     line_num line_amount
    12334  2342            1          40,000
    12335  2342            2          61,000
    12346  4562            1          100,000
    12367  7867            1          50,000
    how do i get this output
    i want all the total line amount for a po more than or equal 100,000 and also want to see the lines records.
    like this
    13222          2342            1          40,000
    13222          2342            2          61,000
    13245          2343            1          100,000

    select equistion_num,
           requisition_header_id,
           distribution_id,
           supplier,
           CATEGORY,
           req_total,
           need_by_date,
           requestor,
           item_description,
           project_num,
           task_number,
           segment1,
           segment2,
           currency_code,
           req_total_conv,
           email_address
    -- your query (nearly) ***************************************************************************
      from (select reqdet.*,
                   pec.email_address,
             -- added next row: check sum's argument & partition by clause and modify accordingly
    SUM(req_total /* req_total_conv */) over (partition by requisition_header_id) group_sum
              from (SELECT  r.segment1 requistion_num,
                            l.requisition_header_id,
                            d.distribution_id,
                            TO_CHAR (l.line_num) line_num, v.vendor_name supplier,
                            p.concatenated_segments CATEGORY,
                            TO_CHAR (ROUND ((NVL (l.quantity, 0) * NVL (l.unit_price, 0))),'99,999,999,999.99') req_total,
                            TO_CHAR (l.need_by_date, 'MM/DD/YYYY') need_by_date,
                            pe.full_name requestor,
                            l.item_description,
                            pr.segment1 project_num,
                            t.task_number,
                            c.segment1,
                            c.segment2,
                         -- l.currency_code,
                         nvl(l.currency_code,gl.currency_code) currency_code,
                         ROUND ((NVL(gdr.conversion_rate, 1) * (NVL(l.quantity, 0) * NVL(l.unit_price,0))),fc.PRECISION) req_total_conv
                       FROM po_requisition_headers_all r,
                            po_requisition_lines_all l,
                            (SELECT project_id,
                                    task_id,
                                    code_combination_id,
                                    distribution_id,
                                    requisition_line_id,
                                    creation_date
                               FROM (SELECT project_id,
                                            task_id,
                                            code_combination_id,
                                            distribution_id,
                                            creation_date,
                                            requisition_line_id,
                                            ROW_NUMBER () OVER (PARTITION BY requisition_line_id ORDER BY requisition_line_id,distribution_id) rn
                                       FROM po_req_distributions_all pod
                              WHERE rn = 1
                            ) d,
                            gl_code_combinations c,
                         hr_operating_units o,
                         gl_sets_of_books gl,
                            por_category_lov_v p,
                            per_people_v7 pe,
                            pa_projects_all pr,
                            pa_tasks_all_v t,
                            ap_vendors_v v,
                         gl_daily_rates gdr,
                            fnd_currencies fc
                      WHERE d.creation_date >= NVL(TO_DATE ('11-APR-2008','DD-MON-YYYY HH24:MI:SS'),SYSDATE - 1)
                        AND l.requisition_header_id = r.requisition_header_id
                        AND l.requisition_line_id = d.requisition_line_id
                        AND d.code_combination_id = c.code_combination_id
                        AND r.apps_source_code = 'POR'
                        AND l.org_id = 141
                     -- and r.requisition_header_id in (352668,353113)
                        AND r.segment1='146309'
                        AND l.category_id = p.category_id
                        AND r.authorization_status IN ('IN PROCESS','PRE-APPROVED','APPROVED')
                        AND l.to_person_id = pe.person_id
                        AND pr.project_id(+) = d.project_id
                        AND t.project_id(+) = d.project_id
                        AND t.task_id(+) = d.task_id
                        AND v.vendor_id(+) = l.vendor_id
                        and     gl.set_of_books_id = o.set_of_books_id
                        and o.organization_id = l.org_id
                        and fc.currency_code = nvl(l.currency_code,gl.currency_code)
                        AND l.currency_code = gdr.from_currency(+)
                        AND TRUNC (SYSDATE) = TRUNC (gdr.conversion_date(+))
                        AND gdr.to_currency(+) = 'USD'
                        AND gdr.conversion_type(+) = 'Corporate'
                        AND l.requisition_header_id
                      GROUP BY r.segment1 ,
                               l.requisition_header_id,
                               d.distribution_id,
                               TO_CHAR(l.line_num),
                            v.vendor_name,
                               p.concatenated_segments,
                               TO_CHAR(ROUND((NVL(l.quantity, 0) * NVL (l.unit_price, 0))),'99,999,999,999.99'),
                               TO_CHAR (l.need_by_date,'MM/DD/YYYY'),
                               pe.full_name,
                            l.item_description,
                            pr.segment1,
                               t.task_number,
                               c.segment1,
                               c.segment2,
                            l.currency_code,
                            nvl(l.currency_code,gl.currency_code),
                            ROUND((NVL(gdr.conversion_rate,1) * (NVL(l.quantity,0) * NVL(l.unit_price, 0))),fc.PRECISION)
                    -- leave this out - doesn't help
    -- HAVING SUM(ROUND((NVL(gdr.conversion_rate, 1) * (NVL(l.quantity,0) * NVL(l.unit_price,0))),fc.PRECISION)) >= 100000
                   ) reqdet,
                   per_people_v7 pec
             where bio_po_ame_util.get_commodity_manager_id(reqdet.distribution_id) = pec.person_id
    -- *************************************************************************** yreuq ruoy
    where group_sum >= 100000

Maybe you are looking for