>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 ... Hi, if I understand your need. I guess you could use the ST_SharedPaths that is available in postgis 2.0.
http://www.postgis.org/documentation/manual-svn/ST_SharedPaths.html and the ST_Snap to set the minimum distance. ST_SharedPath(geom1, ST_Snap(geom1, geom2, 0.5)) -- ----------------- Andrea Peri . . . . . . . . . qwerty àèìòù -----------------
_______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
