I've posted about this problem before but I've got a few new questions.
So here's the problem. I have two rasters containing bathymetry data: one containing the bathymetry of the sea floor, we'll call this raster1, and another containing the difference between two previous scans of the same area, we'll call this raster2. I have to query raster2 such that any areas where the value is >10% of raster1's value will be highlighted. I can do this in Raster Calculator in ArcGIS and using:
Abs("raster2") > 0.1 * "raster1"Now the Raster Calculator approach works great, but I tried to incorporate this step into a larger script with these lines of code:
arcpy.CheckOutExtension("Spatial")outFinal = Abs(outDiffMinus) > (0.1 * outIntShallow)#The output needs to be saved as an ASCII file due to the applications of my scriptarcpy.RasterToASCII_conversion(outFinal, directory)The problem is that the script approach only shows areas that don't fit the criteria (i.e. the "0" areas in the Raster calculator approach).
Here's the output from the raster calculator:
And here's the script's output of the same area:
Any thoughts on what could be wrong with my script?
أكثر...
So here's the problem. I have two rasters containing bathymetry data: one containing the bathymetry of the sea floor, we'll call this raster1, and another containing the difference between two previous scans of the same area, we'll call this raster2. I have to query raster2 such that any areas where the value is >10% of raster1's value will be highlighted. I can do this in Raster Calculator in ArcGIS and using:
Abs("raster2") > 0.1 * "raster1"Now the Raster Calculator approach works great, but I tried to incorporate this step into a larger script with these lines of code:
arcpy.CheckOutExtension("Spatial")outFinal = Abs(outDiffMinus) > (0.1 * outIntShallow)#The output needs to be saved as an ASCII file due to the applications of my scriptarcpy.RasterToASCII_conversion(outFinal, directory)The problem is that the script approach only shows areas that don't fit the criteria (i.e. the "0" areas in the Raster calculator approach).
Here's the output from the raster calculator:

And here's the script's output of the same area:

Any thoughts on what could be wrong with my script?
أكثر...