@TeddyTedTed's answer is nice, however, I am looking for something more efficient.
I am working on a public transport network in one shapefile (polyline type) in QGIS 2.18.
Certain bus routes share the same paths, means that one line-part can repeat more than once. It always has the same identical geometry.
For instance, if I select a feature with 'Identify Features'
I will have three outcomes in the Identify results table, see an image below.
I want to select all the features that share the same geometry and further process it with no deletion. I intend to sign an attribute that says if the layer overlaps.
Can you suggest the most beneficial way? Maybe a Virtual Layer?
So far I have in mind:
Answer
Duplicate the layer.
In the processing toolbox use 'Join attributes by location (summary)'.
Use the original and the duplicate layers for the input and join layers.
Select 'equals' as the geometry predicate.
Run.
The attribute table of the resulting layer will have a field in it called "YourIDField_count". Where this is greater than 1 is where you have duplicate geometries.
Now select everything in the joined layer where the count is over 1.
Use these to select by location (geom predicate = equals) from the original layer.
No comments:
Post a Comment