I have a map with two layers: one of polygons and one of points (in coordinate pairs). To each point, I would like to match the attributes of the polygon in which it is located (or closest to). I am trying to use the Spatial Join tool. In the Target Features I have put in the points layer and in the Join Features I have put in the polygons layer.
The resulting layer has the coordinates, but unfortunately all attributes are <null>
. Any idea why this is happening and how I can get the resulting layer to include the attributes as required?
Here are some screenshots to help understand the problem: The layer of points and layer of polygons are: enter image description here
And the resulting layer, after using the Spatial Join Tool as indicated above is: enter image description here
-
First, your screenshots only show polygons so I have to ask, are you sure the features intersect? What is your join type (intersect, within, nearest..., etc). Are your data in the same coordinate system?geoJshaun– geoJshaun2017年01月17日 17:02:57 +00:00Commented Jan 17, 2017 at 17:02
-
1Have you gone ahead and exported a shapefile out of your .csv Events layer yet? When adding XY data ArcMap creates a spatial data table that does not have an ObjectID, and so cannot perform certain tasks.Carl– Carl2017年01月17日 17:03:54 +00:00Commented Jan 17, 2017 at 17:03
-
Do you know if it automatically matches to the closest polygon if a point is not in any of the polygons?splinter– splinter2017年01月17日 18:20:28 +00:00Commented Jan 17, 2017 at 18:20
-
You must enter a Search Radius (optional) to match points that do not overlap Polygons.klewis– klewis2017年01月17日 19:28:35 +00:00Commented Jan 17, 2017 at 19:28
-
Thanks @klewis, but what if I specify a radius such that there is a point which can be matched to two or more polygons? Does it automatically match to the nearest one?splinter– splinter2017年01月17日 22:42:49 +00:00Commented Jan 17, 2017 at 22:42
1 Answer 1
The solution is to export the data by clicking the .csv layer, Data, and then Export Data. Name the file a ..shp
file. Then do the join operation using the Spatial Join Tool using the polygons and the shape file of coordinates. Then it all works out.