<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div><br><p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Hi Everybody,</span></font></p><p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">I hope I'm posting to the right location (I just subscribed to this list).  I have sent this question before but have not seen it listed anywhere yet.<br></span></font></p><p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><br></span></font></p><p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">In any case, I have a road network in which all of the street segments are snapped together.  I need to group all of the line
 segments of two streets that cross each other (street 1 and street 2 as shown below) into 4 groups of segments defined as all of those located on either side of the intersection, </span></font><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> (street segments A, street segments B, street segments C and street segments D</span></font><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">, as shown at the bottom</span></font><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">)</span></font><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">.  </span></font></p>  <p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>  <p><font color="navy" face="Arial"
 size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Can anybody give me a high level idea of what functions / methods can be used to achieve this?  </span></font></p>  <p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>  <p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">I¢ve gotten as far as identifying the 4 segments actually connected to the intersection using the ST_Intersection function.  </span></font></p>  <p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>  <p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">How would I get all other segments connected to these 4?  </span></font></p>  <p><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>  <p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Do I have to write a recursive function using ST_Touches ?  I¢d rather not if there is a more elegant way of doing this.</span></font></p>  <p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>  <p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Thanks in advance,</span></font></p>  <p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Andrew</span></font></p>  <p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>  <p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt;
 font-family: Arial; color: navy;"> </span></font></p>  <p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">                              <wbr>      1</span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">                              <wbr>      1</span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family:
 Arial;">                              <wbr>      1</span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">                              <wbr>      1</span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">            222222222222 X 22222222222222</span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family:
 Arial;">                              <wbr>      1</span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">                              <wbr>      1</span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">                              <wbr>      1</span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family:
 Arial;">                              <wbr>      1</span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">                              <wbr>      A</span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family:
 Arial;">                              <wbr>      A</span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">                              <wbr>      A</span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">                              <wbr>      A</span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family:
 Arial;">            BBBBBBBBBBXCCCCCCCCCCC</span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">                              <wbr>      D</span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">                              <wbr>      D</span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family:
 Arial;">                              <wbr>      D</span></font></p>  <p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">                              <wbr>      D</span></font></p>  <p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>  <p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>  <div>  <div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">  <hr
 align="center" size="3" width="100%">  </span></font></div></div></div></div><br>

      </body></html>