<pre>>I am using QGIS with PostGIS with the data that represents some cables
>on the terrain. There are some segments where the cables are drawn one
>near another (for example about 30 cm apart) and they even cross
>sometimes. My goal is to get the trenches, so to "merge" those parts
>of lines, that are separated for example for 50 cm at most into one so
>that later I can get the length of the trenches required (in the cases
>where lines are separated for less than 50 cm, of course one trench
>will be planned and it should be in the middle of both lines with the
>defined width).
>
>What would be the best procedure to follow to achieve this? I have
>tried ST_Equals and ST_HausdorffDistance, but I can't get on the right
>track ...
<br>Hi, if I understand your need.<br>I guess you could use the <br>ST_SharedPaths  that is available in postgis 2.0.<br><br><a href="http://www.postgis.org/documentation/manual-svn/ST_SharedPaths.html">http://www.postgis.org/documentation/manual-svn/ST_SharedPaths.html</a><br>
<br>and the ST_Snap to set the minimum distance.<br><br>ST_SharedPath(geom1, ST_Snap(geom1, geom2, 0.5))<br><br>-- <br></pre>-----------------<br>Andrea Peri<br>. . . . . . . . . <br>qwerty אטלעש<br>-----------------<br><br>