I'm trying to use the Raster Calculator inside ModelBuilder to get rid of null values, but I'm hitting a snag. I'm using the expression:


I keep returning Error 000539, which I'm guessing is bad syntax? Is there another way I should be doing this?

This is being used in ModelBuilder as a tool, where temp_ras is a raster layer.

edit: ArcMap 10.0

  • 1
    Why do you have "%" in your statement? This is likely the source of your error. In the future please indicate the version of ArcGIS you are using. The syntax can be version specific. You also cannot use an even number for a rectangular neighborhood size, it makes no sense. – Jeffrey Evans Jan 14 '14 at 1:44
  • 2
    I ended up solving the problem. I was using Make Raster Layer and passing it to this tool when it was unnecessary. the %temp_ras% is the syntax when referring to another dataset in model builder. – Ray Jan 14 '14 at 1:58
  • 1
    @Jeffrey Even dimensions do make sense for neighborhood rectangles: they just are not symmetrically placed around the cell. – whuber Jan 14 '14 at 2:01
  • 1
    Sorry, I missed the caveat that you were using model builder. – Jeffrey Evans Jan 14 '14 at 3:07

Error 000539 indicates that an invalid calculation has been attempted:

Arcgis 10.0 Resource Center Link

Based on what @Ray commented below the question, the error was caused by the use of the Make Raster Layer tool. Since this tool creates a temporary raster for use in calculations, it's likely that the necessary raster already existed as an output from another ModelBuilder step or was used as an original input for the ModelBuilder application. Without knowing how the Make Raster Layer tool was used, though, it's difficult to know why it caused the model to fail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.