identifying points with their unique IDs within polygons

680
5
10-11-2011 04:10 AM
TilottamaGhosh1
New Contributor
Hi,

I have a polygon shapefile which shows districts. There are about 129 of them. Then, I have a point shapefile, which shows new real estate sites. There are several of them that fall within each polygon. I want to be able to identify the points which fall within each polygon by their unqiue IDs. I tried with the spatial join tool in ARCtool box, but it returns me only one intersecting point and not all the points which fall within the polygon. If this requires some programming in python, I am willing to try that too. I am using ArcGIS 10. Any kind of help will be greatly appreciated.

Thanks very much,

Tilo
0 Kudos
5 Replies
MarkEllis
New Contributor II
If the points are joining the polygons, each point will be assigned the ID/attributes of the polygon it intersects.  If polygons are joined to the points, there is only one record for each polygon - and thus only the first point it intersects to record.

If that is not a fix, maybe the intersect tool will work. The output will be a point layer, but should contain the polygon ID that intersected each point.
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
Did you use the JOIN_ONE_TO_MANY option instead of the default JOIN_ONE_TO_ONE?
0 Kudos
MichaelStead
Occasional Contributor III
This is totally possible, although the tool is never ideal for what I seem to need it for. You will end up with all the ID's in one field separated by a delimiter. What I always want is fields added iteratively with a incrementing number so that "ID" would become "ID_1", "ID_2",..... "ID_n".

Better than some of the old methodologies I had though.

Try using the toolbox tool. Offhand I can't remember if/how the one to many option works for the spatial join from a right click on the layer in the TOC.
0 Kudos
TilottamaGhosh
New Contributor III
Hi,

Thanks very much for all your replies. Yes, Spatial join did work and I selected 'JOIN_ONE_TO_MANY ' and I got IDS of all the points within the polygon. Thanks a bunch!

Best Regards,

Tilottama
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
You are welcome!

From the output of Spatial Join with one to many, if you want a table to show polygon IDs and its contained points by ID1, ID2 ... you can try Pivot Table tool. Your Pivot Field would be the Polygon FID and your Value Field would be the Point FID field, I think.
0 Kudos