I have a csv file containing information at given lat and lon GPS coordinates, as well as a shapefile containing, among other things, annual average daily traffic (AADT) values along stretches of road in NYC (TDV_Shapefile_AADT_2015.zip from https://www.dot.ny.gov/tdv).

What I'd like to do is create a bridge to map each GPS coordinate in my csv file to the closest AADT value in my shapefile.

Is this possible in QGIS3?

I'm a total GIS beginner.

What I've been able to do so far is upload a sample of my data as a layer onto my shapefile. What I need to do now is obtain match each point with the closest AADT value.

NYDOT has an online tool here using the data from the shapefile I'm using. If you zoom in, especially in NYC, you can see most streets have a color and a value. What I want is to get that value for each point in my csv.


1 Answer 1


The NNJoin plugin will join features from the input layer with their nearest neighbors in the join layer. See full plugin description here.

1. Go to the plugin menu > manage and install plugins. Find and install the NNJoin plugin. enter image description here 2. Both shapefiles should be in the same projected coordinate reference system. If not, convert one or both of them. Right click on the layer name in the layers panel, choose save as... and select a projected coordinate system. enter image description here 3. Use the NNJoin plugin. enter image description here

Use the points layer as input, and road layer as join.

enter image description here

The tool will create a new layer. The new layer is a copy of the input layer, with the attributes copied from the nearest features of the join layer.

enter image description here

4. Save the new layer as a csv. Don't forget this step!

  • Click the green check mark next to this answer to accept it as correct. This way other users will know that this solution is useful.
    – csk
    Commented Mar 27, 2018 at 19:22

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.