I'm trying to write some code to skip over empty raster sets when converting rasters to point (the empty sets stop the conversion, leaving me with a half complete model run).
I know that I can identify empty rasters using the ALLNODATA result from "Get Raster Properties" Create conditional to check if raster has value.
I know I can delete rasters using the Delete.management tool.
I know I should be able to create a branch using calculate value.
But I'm inexperienced with python and modelbuilder, and haven't been able to put this all together. Could someone help me figure out what I am doing wrong? My code and an image of the modelbuilder setup are below.
def fn(Property): #Import modules import arcpy #ifelse statement if Property == "1": return "true" elif Property == "0": return "false"