Select to view content in your preferred language

Spatial Join Tool

1047
15
04-11-2012 09:46 AM
ABDALLAMOHAMED
Frequent Contributor
hello.. I have  regular points in a shapefile, with 30 feet apart from each other. I wanted to spatially join these points with my geocoded grocery stores shapefile to find out how many grocery stores in 500 meters threshold from these points. That is, I wanted to count the number of grocery stores within 500 meters from each point..I used the spatial join tool between these points and grocery stores, but I couldn't get it to tell the exact number of stores wihin the limit of 500 meters.Any help? Appreciated.
0 Kudos
15 Replies
DanLee
by Esri Regular Contributor
Esri Regular Contributor
Joanna,

The Analysis tool, Spatial Join, with JOIN_ONE_TO_ONE option should give you the the JOIN_COUNT field in the output. That is the one-step tool. If it doesn't give you the correct count, please share a sample data; we can investigate. What version of ArcGIS are you using?

ABDALLA,

Sorry about my delay; I was on vacation.

Using the JOIN_ONE_TO_ONE option, could you describe why "it won't let me specify my 500 meters distance to the nearest grocery store"? What happened when you specify 500 meters for the Search Radius? Did you give you any error message? I need more detail. Or if possible please share a sample data. Let me know what version of ArcGIS you are using. This should work; you really shouldn't need the workaround.
0 Kudos
PhillipRofe
Deactivated User
How are you guys going with this?

Another way that may help:

Buffer all points to polygons of specified radius (say 500 feet? or whatever you wanted to count the stores within).

You should get the same amount of polygons as search points.

Do a spatial join using these polygons to count all the stores within these new polygons.

Join those polygons to the original point layer.

Each point should now have the total amount of shops within the radius in the attributes somewhere.

Crack open a stubbie.
P>
0 Kudos
ABDALLAMOHAMED
Frequent Contributor
Dan..I'm using ArcMap 10. When I tried to assign my 500 meters, the only option I have is "Intersect", the other options "Within" and "Contain" are grayed (Not enabled). I do not think "Intersect" option is correct, I need to use either "within" or "contain" to find the number of grocery stores within 500 meters. I have a total of 176 grocery stores, and around 283,000 points that I wanted to join them spatially.
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
ABDALLA,

I assumed your stores are also points. So, even INTERSECT option should work. Can you specify 500m for INTERSECT to run the tool? Do you get the Join_Count? When you specify a Search Radius for INTERSECT, any features found within that distance are considered intersected.

What license level do you have for ArcGIS 10?
Are you using any Service Pack of ArcGIS 10?
0 Kudos
ABDALLAMOHAMED
Frequent Contributor
ABDALLA,

I assumed your stores are also points. So, even INTERSECT option should work. Can you specify 500m for INTERSECT to run the tool? Do you get the Join_Count? When you specify a Search Radius for INTERSECT, any features found within that distance are considered intersected.

What license level do you have for ArcGIS 10?
Are you using any Service Pack of ArcGIS 10?


Dan..I really don't know what license level I have, and don't know if we have any service Pack. This is done by the IT department, and we are just endusers. However, this is a federal government computers and I assume they have the best level of license..As for my question, I have about 176 grovery stores, and about 25,583 points.. Both of them are points. I wanted to spatially join them together to find out how many grocery stores within the limit of 500 meters from each point..When I specified 500m for INTERESECT, the joint_count has a value of 1s (one) for all the 25,583 points..I beleive that is not correct, because I have only 176 stores. My understanding is that I should have something like the following:
Point Id 1     has 2 grocery stores
point id 3 has 5 grocery stores
and so on until the last store.
This is just an example.
Thanks!
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
ABDALLA,

I asked about the license level and SP because I thought that might be why some Match Options were greyed out. Now that you have confirmed that both inputs are points; that explains why the CONTAINS and WITHIN options are grayed out becasue they don't apply to points inputs. So, no worries about license level and SPs.

Did you run the tool with the following parameter settings?
- Use your points (25,583 points) as Target Features and the stores (176 points) as the Join Features.
- For Join Operation, use JOIN_ONE_TO_ONE.
- Check the checkbox "Keep All Target Features". 
- For Match Option, use INTERSECT.
- For Search Radius, enter 500 Meters.

If so, your output should have 25,583 points and the Join_Count field.
- If the value of Join_Count for a point is 0, no store is found within 500m to the point.
- If the value of Join_Count for a point is greater than 0, that number of stores are found within 500m to the point.

I am not sure why you said: "I beleive that is not correct, because I have only 176 stores". I don't think that you expect 176 records in the output, did you?  You have 25,583 points in the output; some of them have found the same store.

You said: "the joint_count has a value of 1s (one) for all the 25,583 points". Can you share an image of your data where a point should find 2 or more stores?

Another thing to make sure: both of your inputs should be in the same coordinate system. You can check it by right-clicking the data - Properties - Coordinate System.
0 Kudos