I am using ArcGIS Desktop 10.1.
I need tiff orthos to have NO compression. I'm using a python script to parse through directories and add 4-band data to the images. It works great ... but the customer wants it uncompressed. The process creates them in LZW by default.
The copyraster info page states: out_rasterdataset --> "When storing a raster dataset to a JPEG file, JPEG 2000 file, TIFF file, or geodatabase, you can specify a compression type and compression quality."
How do I set the compression type to None?
I have tried arcpy.env.compression = "NONE" but this does NOT work. I even added the pyramid environment variable. No dice.
Here's what I'm using now and it works, but the compression is still LZW:
rasterpath = r"source-directory" outFolder = r"end-directory"
arcpy.env.workspace = rasterpath arcpy.env.pyramid = "PYRAMIDS -1 BILNEAR NONE NO_SKIP" arcpy.env.compression = "NONE"
for rasterFile in arcpy.ListRasters("*.tif"): oName, oExt = os.path.splitext(rasterFile) outRaster = os.path.join(outFolder, oName+ ".tif") arcpy.CopyRaster_management(rasterFile,outRaster,"DEFAULTS","255","255","","","8_BIT_UNSIGNED")
In order to get no compression, I have to open each file and export data. If the no compression variable won't work in the current script, I'm fine with creating a new script. Basically, I want this screen in script form: