How can i save raster data in arcpy

by stasha   Last Updated April 05, 2017 10:22 AM

I am new to arccpy and I'm trying to write a script to get the raster and check for the minimum cell size value using Get Raster Properties method.

After I run my code I get a message of the minimum value but the raster is not saved. Below are my line of codes:

import arcpy ,os ,sys
from arcpy import env
from arcpy.sa import *

input_raster= arcpy.GetParameterAsText(0)
output_folder = arcpy.GetParameterAsText(1)

arcpy.CreateFileGDB_management(output_folder,"output.gdb")
outputgdb = output_folder +"\\output.gdb"+ os.sep

output_con_raster = outputgdb + "cond_raster"

inRas1 = arcpy.Raster(input_raster)
rasterValue = arcpy.GetRasterProperties_management(inRas1,'MINIMUM')
elevation_min= rasterValue.getOutput(0)
elevation_min.Save(output_con_raster)

Is there anything wrong with my code as the save method is not working?

Tags : arcpy raster save


Related Questions



Map Algebra loop only creating one raster

Updated August 02, 2018 20:22 PM

Saving rasters in Arcpy loop

Updated August 07, 2018 00:22 AM


Change a script to run over subfolders

Updated May 11, 2017 13:22 PM