Select to view content in your preferred language

Zonal stats: fail to open raster dataset for a multi-band tiff.

2780
14
12-06-2011 06:45 AM
RichardThurau
Occasional Contributor
Hi,
Trying to extract some values from some tiny AOI polygons from multiple bands of a .tif.

AOI = "X:\\aoi.shp"
Img1_1 = "X:\\Glovertown_in_1.tif\\Band_1"
tab_1_1 = "X:\\Tab1_1"

Tab1_1 = ZonalStatisticsAsTable(AOI, "OBJECTID", Img1_1, "tab_1_1", "", "MINIMUM")



error:
ExecuteError: ERROR 999999: Error executing function.
Failed to open raster dataset
Failed to execute (ZonalStatisticsAsTable).

Can anyone tell me what's going wrong here?

Thanks

Rich
Tags (2)
0 Kudos
14 Replies
RichardThurau
Occasional Contributor
Luke,
Thanks. I did create an ID field that did not work. I also passed the image layers to Int() prior to opening. I've tried on multiple images in the area, using .tif and .img file types and different bands.

I'll have to check my scratch workspace tomorrow. Thanks. Not sure why that would work in a model and not python though. Maybe I'll post a new thread with that difference in the title.

RT
0 Kudos
KatSuda
New Contributor
Richard, did you ever find what the problem was?

I am having similar trouble trying to composite bands.  I've tried using them as tiffs and as grids, but I get error 000271: Cannot open the input datasets.

Kat
0 Kudos
RichardThurau
Occasional Contributor
Kat,
Honestly, I don't remember if this was ever resolved. I'm thinking it was not, as I use tab areas to calculate my own stats usually (although zonal stats in 10.1 is superior because to calculates partial pixel values). I'd suggest you start a new thread and post your version info and code.

This community is pretty great at either giving an answer quickly, or, if they can't, you will know quickly that you have to work around.

Best

Rich
0 Kudos
KatSuda
New Contributor
Thanks, Rich.  I'll post the question.
0 Kudos
SalmanAhmed3
New Contributor III

Just don't change the ArcGIS default output location when running the tool. You can change the name of the output file though. But let it save in the default directory given by ArcGIS (somewhere in User-Documents-ArcGIS-...). Works for me with this trick.

0 Kudos