I have a rather large dataset that contains duplicated lines with an offset of 1m-5m and I want to find an efficient way to solve this problem using QGIS. Is there anyway in QGIS to find the lines that have a specific distance between them?
Just followed the comment by @simplexio. (by a Virtual Layer).
(1) Go to
Layer | Add Layer | Add/Edit Virtual Layer
(2) [Import] line dataset (
many_lines in the following example)
(3) Query: (within 5m)
SELECT * FROM many_lines a CROSS JOIN many_lines b ON a.id<> b.id AND st_intersects(st_buffer(a.geometry, 5), st_buffer(b.geometry, 5))=1
To test various offset (1~5m), please change
5 in the above syntax to other values.
(4) Create a buffer of 5m for the virtual layer to check visually.
And the attribute table of the Virtual Layer will look like this: