I have the following information:
A table with a list of cities
A cities layer
A grid layer
I am trying to write a code that goes through the list of cities and searches for each grid that intersects each city in the list. So if I have a city of 'somewhereville' python will find all the grids that intersect the 'somewhereville' feature and then updates a field in the grid's attribute with the city name ('somewhereville'). I have tried a few ways but I can't quite figure it out. Any direction would be great.
A table with a list of cities
A cities layer
A grid layer
I am trying to write a code that goes through the list of cities and searches for each grid that intersects each city in the list. So if I have a city of 'somewhereville' python will find all the grids that intersect the 'somewhereville' feature and then updates a field in the grid's attribute with the city name ('somewhereville'). I have tried a few ways but I can't quite figure it out. Any direction would be great.