[postgis-users] Merging lines - one on another

Matej Mailing mailing at tam.si
Sat Jan 21 03:00:52 PST 2012


Hi all,

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 ...

Thanks,
Matej



More information about the postgis-users mailing list