Following the indication given in Counting number of points within a grid I was able to count how many points of a shapefile fall within each cell of a fishnet in my case study.

After loading the shapefile, I have created the fishnet and have used Analysis Tools->Overlay->Spatial Join. The target feature was the fishnet, and the join feature was the point shapefile. I have opted for the Join-One-to-One option, and have added a count field to know how many points are within each cell of the fishnet.

My problem: when I select one cell with multiple points (e.g., the red cell in the image below) I get the correct total number of points (3), but I do not see their IDs.

enter image description here

So I only see the cell ID (117), but not the IDs of the points inside of it. Is there any way I can get these IDs? I need to derive some sort of phonebook where I know that cell i is associated with points p1, p2, ....

  • If you also have a Python question then can you ask that separately, please?
    – PolyGeo
    Dec 12, 2016 at 19:32
  • No I don't have a Python question. But somebody might have had a Python answer.
    – FaCoffee
    Dec 12, 2016 at 19:50
  • If you require a Python answer then you need to ask a question that includes a code snippet illustrating what you have tried and where you are stuck.
    – PolyGeo
    Dec 12, 2016 at 20:08

1 Answer 1


You want to do a spatial join with your points as the Target Layer (so basically think about your analysis in reverse). That will assign the IDs of the fishnet to each point.

The problem is that you have the essential many to one or one to one limitation. Since you only have one record in the fishnet and many in the points, you have to run the analysis in reverse.

The resulting point shapefile will be like your original point file but will include the ID of the fishnet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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