stefanh

Spatial Analyst - Valid dataype for input of calculated values?

Discussion created by stefanh on May 19, 2010
Latest reply on Jul 21, 2011 by lcorradi
Hi folks,

I am having problems getting calculated values to be accepted into GP tools in Spatial Analyst using ModelBuilder. What I want to do is use the Calculate Value tool to perform a calculation which will generate a number that should be sent into the Greater Than tool in Spatial Analyst.

I want to find areas in a DEM that are greater than a calculated number. My calculate Value tool works as expected and returns the number I want but when I try to connect the output_value variable as input to one of the ???Input raster or constant value??? parameters in Greater Than tool, I get the error message ???Invalid GP data type???. I have tried the available datatypes that makes sense without succeeding. See attachment for clarification.

If I want to do the same thing but input my calculated value to the Buffer tool in the Distance parameter, I just set the datatype to ???Linear unit??? and all is well.

There are obvisously workarounds to this, such as creating a new constant raster and using that raster as input into Greater Than, but my total model will be time-consuming so I want to do this as streamlined as possible.

Does anyone know how to do this or if it can be done? Is it possible to do this in Python? My previous experience with Python and Spatial Analyst is that it is pretty shaky so I haven???t tried that road yet.

I am using 9.3.1 SP1.

Thanks,
Stefan

Attachments

Outcomes