0

enter image description here

I am getting this error when trying to make values of GHI from 0-1 I only add a layer then I run the raster calculator as attached.

This is my code :

 ("Global horizontal irradiation"  -  "Global horizontal irradiation".minimum) / ("Global horizontal irradiation".maximum - "Global horizontal irradiation".minimum)

ERROR 000539: Traceback (most recent call last): File "", line 1, in File "", line 8, in rcexec_DC684390_0C54_4F14_9EBF_B34DF3F2E1B1 RuntimeError: Unspecified error Failed to execute (RasterCalculator).

2
  • Ensure you run the calculate statistics tool before attempting to use raster.minumum and .maximum properties.
    – user2856
    Commented Oct 7, 2020 at 22:25
  • Spaces in your raster name? In ArcGIS Desktop your calculation will only work if you convert the raster layer to a raster or describe object: ("Global horizontal irradiation" - arcpy.Raster("Global horizontal irradiation").minimum) / (arcpy.Raster("Global horizontal irradiation").maximum - arcpy.Raster("Global horizontal irradiation").minimum) as maximum and minimum properties don't exist for a string. Raster maximum and minimum return None if the statistics aren't built which will cause an unspecified error as user2856 notes. Commented Oct 8, 2020 at 0:27

1 Answer 1

1

There are many reasons you can get this error, but here are some of the most common:

  1. Rasters do not have same extent or scale
  2. Rasters not in same geodatabase
  3. Rasters do not share same projection
  4. Output filename too long
  5. "Spatial Analyst" extension has not been enabled
3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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