Hello I have written a script that runs excellent at a folder but when I try it at a Geodatabase it crashes, due to the reason that it has to run a reclassification of two classes my values are 0 and 1 I checked it, and it keeps showing me a message ERROR 045037. Raster has values outside range [0;1] . Why is that happening?
This is the code for reclass
# This function takes the maximum and minimum value of DEM demMAXResult = arcpy.GetRasterProperties_management(demodel, "MAXIMUM") demMINResult = arcpy.GetRasterProperties_management(demodel, "MINIMUM") demMAX = demMAXResult.getOutput(0) demMIN = demMINResult.getOutput(0) LIMIT = float(demMAX) - height outReclass = Reclassify(demodel, "Value", RemapRange([[float(demMIN),LIMIT,0],[LIMIT,demMAX,1]]), "NODATA") outReclass.save(os.path.join(env.workspace, "rcls"))
And this is the part of the code that crashes when uses the reclassified raster
arcpy.CreateSpatiallyBalancedPoints_ga(os.path.join(env.workspace, "rcls"), 1, os.path.join(env.workspace, "point" + str(n)))
Any help? Thanks
Solved! Go to Solution.
If this runs excellent within a folder and not in a personal geodatabase, have you tried a file geodatabase? Is it possible that your geodatabase is locked (have you tried restarting your PC and trying again)?
If this runs excellent within a folder and not in a personal geodatabase, have you tried a file geodatabase? Is it possible that your geodatabase is locked (have you tried restarting your PC and trying again)?
For God it worked. How did you know that with the File? What's the difference?
Good question. I am sure there is an actual answer out there but I honestly do not know. I just know that it is usually better to use the file geodatabase versus the personal geodatabase these days. Just a good rule of thumb.
I am glad it is working for you!