Ohhh, now I get it (i think). You should be able to do that with two tools. You can do this with or without python.
- First, you want to do a spatial join to get the polygon grid data to a point level.
- Target Features: point data (you can point to either the feature class of the feature layer)
- Join Features: grid (fishnet) data (you can point to either the feature class of the feature layer)
- Output Feature class: pick a location
- Join Operation: JOIN_ONE_TO_MANY (there can be many points inside each grid)
- Uncheck the "Keep All Target Features" (we don't want to calculate the central point for points that don't fall into a grid)
In python you would use this line:arcpy.SpatialJoin_analysis(r"C:\Path\To\Points.shp",r"C:\Path\To\Grid.shp",r"C:\Path\To\PointsWithGridData.shp","JOIN_ONE_TO_MANY","KEEP_COMMON")
Secondly, use Mean Center tool to get your central points.
- Input Feature Class: The feature class you created above (you can point to either the feature class of the feature layer)
- Output Feature Class: pick a location
- Case Field: pick a unique field from the grid feature class. If you have a grid name field, choose that one. If you can't find one, you can just choose 'JOIN_FID'. 'JOIN_FID' will work but will mean the resulting points will only have a number to be identified/labeled by.
In python you would use this line:arcpy.MeanCenter_stats(r"C:\Path\To\PointsWithGridData.shp",r"C:\Path\To\CentralPoints.shp","#","JOIN_FID")
Let me know if it works. Good luck!