I have two sets of line features in QGIS (rivers & roads - I'd like to find the road segment nearest to each river segment & the distance between them in km) across the contiguous United States. I've tried using the nearest neighbor join plugin (NNJoin) with both WGS 84 and the USA contiguous equidistant conic (ESRI: 102005) projections, but I get distances between 0 & 50, which I'm assuming is in degrees. Should I try a different projection or is there a way to manipulate the NNJoin plugin?

Edit: I have also tried keeping the river segments in WGS 84 & only putting the road segments (join layer) in a projected CRS (as per the help page on the plugin). However, this reprojects the road layer to a totally different location from the river feature & also gives clearly incorrect distance values.

1 Answer 1


I have found that if I use the Data Management > Reproject Layer tools and select ESRI: 102005 projection for the road layer, the layer stays in the same place. For some reason changing it through the "Set CRS" function, the layer moves to another location. I then re-did the same process with the NNJoin tool, and the resulting distances are in meters.

  • 1
    that is because setCRS just changes the metadata not the actual data,
    – Ian Turton
    Commented Oct 14, 2020 at 8:25
  • See here for the conceptual background why set CRS and reproject are completely different things: gis.stackexchange.com/a/383437/88814
    – Babel
    Commented Jul 16, 2021 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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