I'm trying to create a new raster from an existing slope raster where slopes are between 5 and 20 degrees. However, I'm receiving the error "ValueError: The truth value of a raster is ambiguous. Invalid use of raster with Boolean operator or function. Check the use of parentheses where applicable."
It's obvious it just has to do with my Map Algebra syntax, but I can't figure it out. Here's a snippet of my code:
slope - Slope("elevation") # creates slope raster, elevation is raster object goodslope = (slope < 20) & (slope > 5) goodslope.save("Final")
Maybe I have to use a Con() statement?