Select by Location tool on Model Builder

934
5
08-01-2013 09:48 AM
ShikoNjuno
Occasional Contributor
Hello all,
Below is a sample of the model I'm trying to run. It's suppossed to allow the user to interactively select from the layer which polygons to analyze, in relation to the crop feature set. The relationship is set to INTERSECT.

[ATTACH=CONFIG]26395[/ATTACH]
When it runs, I keep getting the following error msg:

ERROR 010423: C:\Users\wnjuno.ITRCLT133\AppData\Local\Temp\arcEFDA\t_t9616 does not have valid statistics as required by the operation.
Failed to execute (Zonal Statistics as Table).
Failed at Thu Aug 01 10:44:03 2013 (Elapsed Time: 2.00 seconds)
Failed to execute (Model2).


So how can I make the selection valid for the Zonal tool?
0 Kudos
5 Replies
ShikoNjuno
Occasional Contributor
ERROR 000622: Failed to execute (ZonalStatisticsAsTable). Parameters are not valid.
ERROR 000859: The required parameter Zone field is empty, or is not the type of Field.
Failed to execute (Zonal Statistics as Table (2)).
Failed at Thu Aug 01 11:22:15 2013 (Elapsed Time: 0.00 seconds)
Failed to execute (Model2).
Failed at Thu Aug 01 11:22:15 2013 (Elapsed Time: 2.00 seconds)

I changed the Select by Location environment to include the Workspace (i.e. I checked the workspace option)
and the error msg is as shown above.
Help!!!
0 Kudos
ShikoNjuno
Occasional Contributor
Just to mention.....the model works just fine within Model Builder, but gives the above mentioned error message outside of Builder.
Any suggestions folks???

Thanks
0 Kudos
ShikoNjuno
Occasional Contributor
Does anyone have any knowledge on where the selected data goes?
I think part of the problem is that the Zonal Statistics tool cannot recognize the data that's being fed into it by the Select by Location tool.
Is there a specific environment setting I should have on so that the Zonal Stats.tool can work correctly?
0 Kudos
ShikoNjuno
Occasional Contributor
Alright....just incase anyone else has the same problem....I am posting the solution to my problem. 🙂

It turns out that the Projections of the input feature classes and those of the raster files which the Zonal Statistics tool was using were different.
In order for this tool to recognize the selected data, the selection feature classes must be of the same coordinate system and or projection.
0 Kudos
ShikoNjuno
Occasional Contributor
Does anyone have any knowledge on where the selected data goes?
I think part of the problem is that the Zonal Statistics tool cannot recognize the data that's being fed into it by the Select by Location tool.
Is there a specific environment setting I should have on so that the Zonal Stats.tool can work correctly?


So the previous solution works if the workspace is constant. However, I'm trying to allow the workspace to change as per the user's preference. The way how someone on this forum told me to achieve that is by:
Creating a Workspace variable and making it a precondition for the model to run. The output location of the tools used would therefore begin with %Workspace%....this introduces problems to the model in that it can't validate the output's workspace.

So my question above still holds, where exactly does the selected data go and how can I make sure that the location is valid for any workspace setting??
Any thoughts are welcome.
0 Kudos