POST
|
Good afternoon everyone, I´m not sure if this is the right place for this post so if it isn´t please tell me. I have a problem trying to get values from an excel sheet to batch process landsat images. So far I managed to create tables for specific images and bands. This in order to use these namd specific values in the raster calculator using the get field value command in the modelbuilder. This also seems to work, but when I try to use the raster calculator it gives me the following message: Executing (Raster Calculator): RasterCalculator ""0,012301" * "l8_10c1" * "-61,50382"" E:\10m_cas\Temp\L8_1_SR_B1
Start Time: Tue May 27 14:35:23 2014
"0,012301" * Raster(r"l8_10c1") * "-61,50382"
ERROR 000539: Error running expression: rcexec()
Traceback (most recent call last):
File "<expression>", line 1, in <module>
File "<string>", line 5, in rcexec
File "c:\program files\arcgis\desktop10.1\arcpy\arcpy\sa\Functions.py", line 4049, in Times
in_raster_or_constant2)
File "c:\program files\arcgis\desktop10.1\arcpy\arcpy\sa\Utils.py", line 47, in swapper
result = wrapper(*args, **kwargs)
File "c:\program files\arcgis\desktop10.1\arcpy\arcpy\sa\Functions.py", line 4046, in wrapper
return _wrapLocalFunctionRaster(u"Times_sa", ["Times", in_raster_or_constant1, in_raster_or_constant2])
RuntimeError: ERROR 000732: Input Raster: Dataset 0,012301 does not exist or is not supported
Failed to execute (Raster Calculator).
Failed at Tue May 27 14:35:25 2014 (Elapsed Time: 2,00 seconds) Is there anyone who knows how to define the values as float? I suspect this is the problem but I´m not sure. The expression used is like this: %LM% * Raster * %AL% with LM and AL being the result of get field value functions.
... View more
05-27-2014
06:09 AM
|
0
|
0
|
2092
|
POST
|
Thank you for the fast replies, I have been looking at both solutions offered but I´m not sure if the calculate value tool is the right one for what I´m trying. The script is as follows: # Import system modules import arcpy # Get input arguments - table name, field name Equation = arcpy.GetParameterAsText(0) Input = arcpy.GetParameterAsText(1) #check if equation is chosen: if Input == Equation: arcpy.SetParameterAsText(2, "True") arcpy.SetParameterAsText(3, "False") else: arcpy.SetParameterAsText(2, "False") arcpy.SetParameterAsText(3, "True") But I get an error saying there is a problem with the if statement. Both inputs are defined as strings but "input" is chosen from a drop down list when the model starts.
... View more
06-28-2012
03:37 AM
|
0
|
0
|
415
|
POST
|
Hello fellow ArcGIS users, I´m using ArcMap 10. I have been trying to include some options in a model I want to run. At the moment I have gotten to the point where I can get a drop-down list with names as a model parameter in the modelbuilder. The problem I´m having now is that I can´t figure out how to get a condition to work as follows: If condition one is true (user selects option1) than go to this branch of the model. Else go to next if statement. I hope this is enough information, thank you in advance this would help out a lot! Frans-Joost
... View more
06-27-2012
08:14 AM
|
0
|
3
|
1332
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|