ArcGIS Pro 2.5: What is the best practice to transfer raster cells values to their corresponding fishnet polygon layer?
In the screenshot below, I wanted to transfer raster cells values to their corresponding polygons (30x30). For example, the cell#28204 has a value of 468.61. I wanted this value to be transferred to its corresponding polygon.
Hi Jamal
I would use the Zonal Statistics as Table GP tool Zonal Statistics as Table—Help | Documentation and then join the results back to the input feature layer.
Mervyn
Not sure how to join the table resulted from “zonal statistics as table” to the attribute table of polygon cells layer.
The attribute table of polygon cells layer contains 70,640 records while the “zonal statistics as table” has 738 and nothing in common so that they can be joined
When you run the Zonal Statistics as Table tool, you need to add your polygon file (Cell_30x30) as the "Input raster or feature zone data" layer. Then you need to specify a "zone field", a unique identifier for the areas you want to summarise the raster data for. In your case it will have to be the OID field.
Then add your raster and run the tool. Then open the output table and you should have a summary statistics for each of your OID polygons. Then join back using Add Join or Join Field GP tools, using the OID field.
Many thanks Mervyn for the help
It works but “field join” crashes due to heavy data
Hmm, that is not such a large dataset for join operations. I have worked with much larger datasets than that using a similar approach. It should not crash. Can you try a subsample or working with less data to test the workflow?
Looking at your modelbuilder screenshot, do you need to run the Select tool before the join operation? Have you tried running the Join Field tool without that? If you need to select a subset of data before the join then perhaps run the selection before running the Zonal Stats as Table tool. So the output of the selection should feed into the Zonal Statistics as Table tool and the Join Field tool.
I noticed that your polygon file fits your raster exactly (so no variation in the values - min, max, etc. are all the same - although not sure what a count field is doing in there..). If so, perhaps another workflow for you to consider would be to extract the centroid for each polygon and then use the Extract Values to Points GP tool to get the raster value for each point (centroid) and then continue to work with the point files.