2

I have a point shape (yield logging data) and I want to find the tracks that are too close to another track. Usually the combine drives always with the same distance (e.g. 10m). I want to find the tracks that are closer then 10m (e.g. 5m). Could this work with the voronoi polygons?

The picture below showes the problem. The red market distance between the points is ok. The blue marked point distance is not ok. These points I want to find/select.

Picture1

Picture2

  • Could you describe further what your data means exactly? A visual demonstration of what you want to achieve would be better. – dof1985 Jul 29 '16 at 12:36
  • Do the points have any other attribute besides IDs? Can you tell the different tracks apart based on point attributes? – underdark Jul 30 '16 at 10:48
  • There are many other attributes (yield, moisture, elevation...). I do not have any idea to give the tracks any numbers or names (I guess that was the question). My idea was to create polygons (width 10m) around the points. Then I would try to find overlapping polygons. Does it make sense? – Pimpel Jul 30 '16 at 12:47
  • How do you plan to automatically create these polygons? How does the algorithm know which points should be inside one polygon? – underdark Jul 30 '16 at 20:03
  • 1
    Is there a time record? Would it be possible to list the attributes of the file? – Techie_Gus Jul 30 '16 at 23:05
2

It's clear from the image that the points are sequentially numbered. This means you can easily connect them together into lines using the Points to Path tool. Use the "ID" field as the Order field.

enter image description here

This will give you a single line that looks something like this:

enter image description here

(You didn't show the full data extent, so I'm just guessing at what the ends of the lines would look like.)

Now use the Split features tool (Advanced Digitizing Toolbar) to manually split this long line apart so that each "pass" of the combine is a separate line feature. Split it about where the red lines are in this image:

enter image description here

Select the "not OK" line, the one that's too close to the nearby passes of the combine.

  • If you only have a few lines like in the example, use the Select Features tool (Attributes toolbar) to manually select it.

  • If you have many (tens or hundreds) of lines, use the Select by Expression tool (Processing toolbox) to select all lines that are closer together than 10m. Use this expression:

    intersects( $geometry, buffer(difference( $geometry, collect( $geometry)), 5))
    

    Note: You might want to substitute a smaller buffer distance than 5m, to account for some variation in the data. Eg, if lines that are actually 9m apart instead of 10m apart are acceptable, use a buffer distance of 4.5m.

    enter image description here

    Notice that in addition to the "not OK" line, this method also selects the two "OK" lines that that line is close to. You'll have to manually remove all the "OK" lines from the selection, by using the Select Features tool while holding down the Ctrl key.

enter image description here

Use the Select by location tool (Processing toolbox) to select the points that intersect the "not OK" line you just selected.

enter image description here

The safest method (in terms of preserving your source data) is to invert the selection (open the attribute table and click the invert selection button, or hit Ctrl+R) and export the selected features to a separate layer. The faster method is to delete the selected points from the point layer if you're absolutely certain you won't need them later.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.