79462953

Date: 2025-02-24 09:17:24
Score: 0.5
Natty:
Report link

@MTO, It is unclear to me what the actual question is. But here are some ideas based on assumptions:

  1. Assuming you want to find the nearest neighbor line of a given line. Then adapt and try the following:

    SELECT lt1.name as line_1, lt2.name as line_2 FROM line_table lt1, line_table lt2 WHERE SDO_NN(lt1.geometry,lt2.geometry, 'sdo_num_res=1') = 'TRUE' AND lt1.id <> lt2.id;

  2. Assuming you want to find lines that have a topological relationship to each other. Then adapt and try the following:

    SELECT /*+ ordered use_nl (a,b) use_nl (a,c) */ b.id, c.id FROM TABLE(sdo_join('LINE_TABLE','GEOMETRY','LINE_TABLE','GEOMETRY')) a, line_table b, line_table c WHERE a.rowid1 = b.rowid AND a.rowid2 = c.rowid AND b.rowid < c.rowid AND SDO_GEOM.RELATE (b.geometry, 'ANYINTERACT', c.geometry, .05) = 'TRUE'

Reasons:
  • Whitelisted phrase (-1): try the following
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @MTO
  • Low reputation (0.5):
Posted by: kpatenge