Select to view content in your preferred language

raster calculator expression box missing - ArcGIS 10

9091
12
Jump to solution
02-21-2012 02:58 AM
AliMuhyidin
New Contributor
Dear All,

I have used ArcGIS 10 for couple days. I have a problem with raster calculator. There is no expression box.
From help button, I know that the box suppose to be in between output raster and map expression.
Although I am able to do calculation but I could not see and review what kind formula I wrote.
Is there any way to show the expression box?

Thanks.

Best,

Masalie
1 Solution

Accepted Solutions
DylanCobean
Deactivated User

I figured it out! If you lower-and-raise your screen resolution, the raster calculator expression box reappears! I went from 1920x1080 down to 1600x900 and it appeared, and when I went back to 1920x1080 it stayed there! I imagine I'll have to use this hack-solution every time I open arc, but I don't care! It worked for me!

Best Regards,
Dylan

EDIT: EVEN SIMPLER SOLUTION!! (Found by Juan Carlos Villar Calle below, see link >> ArcToolbox - Missing box - YouTube

1. Open up the raster calculator window with the missing expression box)

2. Hold down crtl + scroll your mouse wheel up until it appears! (it must be some issue with the resolution of your screen and resolution of the box... I have no idea... but it works!

3. DONE!!!

Best Regards,

Dylan

View solution in original post

12 Replies
YoshiTsuzuki
Deactivated User
The original post is rather old, but I have encountered to the similar problem. Any solution will help. The expression window in the raster calculator is missing. Thanks for your reply.
0 Kudos
XanderBakker
Esri Esteemed Contributor
Hi Yoshi,

The Raster Calculator is still there, but has moved from the Spatial Analyst toolbar to the Toolbox:
Spatial Analyst Tools\Map Algebra\Raster Calculator

[ATTACH=CONFIG]27864[/ATTACH]

Kind regards,

Xander
0 Kudos
YoshiTsuzuki
Deactivated User
Hello Xander

Thank you for your reply. Yes, I open Raster calculator from the ArcToolBox: Spatial Analysis Tools - Map Algebra - Raster calculator.
I have uninstalled ArcGIS and installed it again, however, the situations are the same. I would be glad with any further solution or suggestion. (I may try arcHydro in a few days to go around this problem though.)

Thanks,
Yoshi
0 Kudos
XanderBakker
Esri Esteemed Contributor
Hi Yoshi,

I should have read your question more carefully. In this case I think it is best to contact Esri support and provide all the information about the system you're installing on, the version you're using. Just checked it on my systems and in 10.2 and 10.1 (SP1) I have a working expression window.

The alternative at this moment is to use the Python window in ArcGIS:
What is the Python window?

Example:

import arcpy
from arcpy.sa import *

# myRas = arcpy.Raster('the name of the raster in the TOC or path to raster')
myRas = arcpy.Raster('J000_CumCO2_kgha')

# now you are able to perform any type of raster calculator analysis; like for instance:
myResult = Con(IsNull(myRas),FocalStatistics(myRas,NbrRectangle(5,5,"CELL"),"MEAN","DATA"),myRas)


Some more reading:
Executing tools in the Python window

Kind regards,

Xander
0 Kudos
YoshiTsuzuki
Deactivated User
Hello Xander

Thank you for your advice. I will try these methods. I will report again if there will be further problems.

Thanks
Yoshi
0 Kudos
YoshiTsuzuki
Deactivated User
Hello Xander

Using Phyton may be a good idea to go around this problem, but the problem is I am a newone for Phyton. What I want to do is as the followings:
1) use raster calcultor to evaluate "raster01 > 5000",
2) in the resulting calculation layer (calc01), resympolize the "0" values to be "No Color" or transparent.

I checked ArcGIS Desktop Help page and tried to use Phyton but might have some mistakes. Any help or suggestion will be welcomed.

>>> import arcpy
>>> from arcpy.sa import *
>>> myRas = arcpy.Raster('raster01')
>>> from arcpy import env
>>> env.workspace="C:\GISdata\workspace"
>>> inRaster="raster01"
>>> "raster01>5000"
'raster01>5000'
>>> arcpy.CheckOutExtension("Spatial")
u'CheckedOut'
>>> Calcuation.save("C:\GISdata\workspace")
Runtime error
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'Calcuation' is not defined
0 Kudos
XanderBakker
Esri Esteemed Contributor
Hello Xander

Using Phyton may be a good idea to go around this problem, but the problem is I am a newone for Phyton. What I want to do is as the followings:
1) use raster calcultor to evaluate "raster01 > 5000",
2) in the resulting calculation layer (calc01), resympolize the "0" values to be "No Color" or transparent.

I checked ArcGIS Desktop Help page and tried to use Phyton but might have some mistakes. Any help or suggestion will be welcomed.

>>> import arcpy
>>> from arcpy.sa import *
>>> myRas = arcpy.Raster('raster01')
>>> from arcpy import env
>>> env.workspace="C:\GISdata\workspace"
>>> inRaster="raster01"
>>> "raster01>5000"
'raster01>5000'
>>> arcpy.CheckOutExtension("Spatial")
u'CheckedOut'
>>> Calcuation.save("C:\GISdata\workspace")
Runtime error
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'Calcuation' is not defined


Hi Yoshi,

You're almost there. A few things should be changed.

import arcpy
from arcpy import env
env.workspace = r'C:\GISdata\workspace'
# arcpy.CheckOutExtension("Spatial")
myRas = arcpy.Raster('raster01')
myResult = myRas > 5000
myResult.save('myOutputName')


A few comments on the differences:

  • When setting your workspace, use forward slashes, double backslashes or just put an 'r' before the path to avoid errors: env.workspace = r'C:\GISdata\workspace'

  • Switching on the Spatial Analyst extension and setting the workspace (Geoprocessing/Environments) can also be done through the menu. The Python window will inherit these settings.

  • I assume your TOC holds your input raster "raster01"

  • When performing a calculation you need to specify an output (like "myResult"): myResult = myRas > 5000. At this point the SA license should be available.

  • When saving the raster you specify the name you want to assign to the raster (example "myOutputName")

  • The raster will be stored in the current workspace (in this case "C:\GISdata\workspace")

  • The result is a raster with 0 (raster01 <= 5000) and 1 (raster01 > 5000) and NoData cells where the input has Nodata cells.


Kind regards,

Xander
0 Kudos
YoshiTsuzuki
Deactivated User
Hello Xander

Thank you very much for your advices. I could go around the Raster calculator window problem. Your explanation of Phyton will be benefitial for someone who encountered similar problem in the future.

Thanks
Yoshi
0 Kudos
XanderBakker
Esri Esteemed Contributor
Hi Yoshi,

I'm glad I could be of any assistance. If you think it was helpful you  can use the "arrow" button in order to help other  members find useful information:

[ATTACH=CONFIG]27933[/ATTACH]

More info here: http://resources.arcgis.com/en/help/forums-mvp/

Kind regards,

Xander
0 Kudos