4

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.

0

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
  • 1
    that is because setCRS just changes the metadata not the actual data, – Ian Turton Oct 14 '20 at 8:25

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.