2

I am using QGIS.

I would like to get the closest points to each building I have already selected. I have layer for points (low tension poles) as well as layer for buildings, I selected some buildings which are quite many and wish to get the closest point (pole) to each building I have selected.

Is there any plugin or faster process I can use to solve the issue.

  • Welcome to SE. I would suggest you have a look over the Tour - gis.stackexchange.com/tour - it provides some guidelines on how best to ask a question. Have you tried anything already in QGIS? What version of QGIS are you using? – Keagan Allan Feb 22 '18 at 11:02
  • Yes I have tried some things in Qgis and am using version 2.18.16 – IYKE Feb 22 '18 at 11:59
  • This question here is similar: gis.stackexchange.com/questions/228544/… . What have you tried in QGIS. If you include it in the question it lets the people answering know, and they can try and help as best they can. – Keagan Allan Feb 22 '18 at 12:01
  • I have done it through help of someones suggestion using NNJoin plugin – IYKE Feb 22 '18 at 13:17
  • That is great. I see the answer below. Please mark the answer as correct by ticking the green tick in his answer. This will help other people with similar questions in future. – Keagan Allan Feb 22 '18 at 13:19
2

You can use the NNJoin Plugin to do this job but just make sure that your join layer is a projected CRS.

  • it seems NNJoin works with line and point, but not polygon. – IYKE Feb 22 '18 at 12:00
  • Yeah, I tried it and it helped to a reasonable extent. Thanks alot – IYKE Feb 22 '18 at 12:11
  • NNJoin should also work with polygons. – Håvard Tveite Aug 20 '18 at 6:47
0

Looking through the "Processing Toolbox" I see there is a Distance Tool called v.distance. It seems it will calculate the nearest elemanet in a vector map from a defined "From" to a defined "To" vector layer. Here is a snip from help file:

v.distance finds the nearest element in vector map (to) for elements in vector map (from). Various information about the vectors' relationships (distance, category, etc.) may be uploaded to the attribute table attached to the first vector map, or printed to 'stdout'. A new vector map may be created where lines connecting nearest points on features are written

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.