Selecting points inside of fishnet tile and adding its ID to points attribute table using ArcGIS Pro

364
2
12-25-2021 10:38 AM
Labels (1)
younuskorai
New Contributor

Using ArcGIS Pro, I have uploaded a csv file containing GPS points and displayed it as XY Data. I have also created a polygon fishnet of 50x50 tiles.

What I want is, for each tile of the grid, I retrieve the points that lay inside of it and modify their attribute table so that they include the tile ID that they belong to. and I want this to be done dynamically if possible (Each entry of the attribute table would have a column called tile containing the tile ID that it belongs to. In other words, I want to spatially group the points together)

The problem is, I'm quite new to ArcGIS pro, I've just started using it. I tried creating a polygon and placing it over some points then using the select by location tool (intersect) just to get started and it worked just fine (It only selected the points inside). But with a fishnet, it selects the entire grid not just a tile.

How do I fix this?

0 Kudos
2 Replies
JayantaPoddar
MVP Esteemed Contributor

Do you want to create a separate feature class out of the points within a single tile? or do you want each "tile no." be a part of the Field Name of the resulting attribute table?

If not, what difference does it make if the "Tile No." attribute gets added for the points in the entire grid? You can symbolize the layer based on the "Tile No." attribute.

Use Intersect (Analysis) tool, not Select by Location (Ensure no Selection is made before running this tool).

Alternatively, you could use Spatial Join (Analysis).

By the way, are you using this workflow, as a part of a bigger workflow within ArcGIS Modelbuilder?



Think Location
0 Kudos
Kanin
by Esri Contributor
Esri Contributor

Hi,

This can be done dynamically using Attribute Rules by adding a rule to recalculate the intersect Tile ID into the point layer by adding the Arcade Expression below into a Calculation Attribute Rule.

 

var intersectLayer =Intersects(FeatureSetByName($datastore,"Tile"), $feature)

for (var f in intersectLayer){
return f.TileID
}

 

 Read more about the introduction to Arcade here: Overlapping Features in Pop-Ups Quick Introduction... - Esri Community

However, if you prefer having a one-time calculation, using the Spatial Join Geoprocessing tool mentioned above work as well and it is simpler too!

Best regards,
Kanin 

If this answer solved your question, please mark it as "Accept as Solution" to help others who have the same question.