I have a question. I have a huge raster of my state (LANDUSE raster with various categories).
I also have a county boundary vector of each county.
1. What I want to do is clip/mask the Raster to each of the counties
2. sort of scroll through each County Record and use its geometry to run the clip/mask
3. then export each individual raster for each clip/mask.
I figured that I could use Python to grab each of the records in the County file and then run the mask/clip.
Better yet
But dont know where start. Anyone have any examples?
like in ZonalStatisticsAsTable ? which of course requires the Spatial Analyst Extension
In this post you can see some Python code that does part of what you are looking for:
Re: Zonal statistics - percentiles
It loops through the polygons, extracts the raster for each polygon, determines statistics (in this case percentiles) and stores the result in extra fields in the polygon featureclass.
If you have any problem in adapting the code, just let me know and I will see what I can do.
Kind regards, Xander