Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to perform a kind of 'spatial join' in Arcgis, joining to a polygon layer atributes of the closest feature of a point layer, as well as distance. But 'spatial query' doesn't offer an option 'closest feature on target layer'.

I guess I could create a distance matrix, I've tried but the distances are something like 4695923.10207, can it be because I am working with WGS 84 non projected layers?

And, is it possible to perform the spatial join I mentioned, resulting on a layer, instead of creating a distance matrix?

share|improve this question

3 Answers 3

Both answers from @HåvardTveite and @mapBaker should help you get your results. What I normally do is first use the Distance to nearest hub tool and then Join the resulting layer with the polygon layer.

This is a late answer but anyway, I created 2 simple layers (polygon and point) with the following attributes:

Attributes

I then ran the Distance to nearest hub via the Processing Toolbox and chose the appropriate settings:

Distance to nearest hub

This gives me a point layer as an output (I left the default name as I'm lazy) with the distances calculated:

Output attributes

Now, I Join the polygon layer with the Output layer by connecting a common attribute from each. This is done from Layer Properties > Joins:

Layer Joins

Finally, your polygon layer will contain its original attributes plus the distances calculated from the Output layer:

New attributes

If you want to keep all those attributes in a single shapefile then you can simply do a Save as... on the polygon layer or alternatively, run the Join attributes table from the Processing Toolbox.

share|improve this answer

Try this tutorial, or this one

share|improve this answer

Using a projected coordinate reference system (e.g. UTM) simplifies things.

In GRASS you can use the v.distance function.

In QGIS you can use v.distance through the GRASS plugin. If your datasets are small you can use the NNJoin plugin.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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