Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

CopyRaster Environment Settings Not Being Applied

$
0
0
I am making a call to arcpy.CopyRaster_management to convert some miscellaneous rasters into JPEG2000 *.jp2 files. Before making a call to this line, I want to set a few arcpy.env environment settings to be applied to the copy. Specifically, I would like to specify compression, pyramid, and tilesize.

My code looks like the following:

Code:

# Specifying the environment settings
arcpy.env.workspace = outWorkspace
arcpy.env.tileSize = "512 512"
arcpy.env.compression = "JPEG2000 75"
arcpy.env.pyramid = "NONE"
#Copying the raster
arcpy.CopyRaster_management(filepath,name + ".jp2","DEFAULTS","0","0","","ColormapToRGB","8_BIT_UNSIGNED")

The actual raster copies, and is correct. However, my arcpy.env settings are not applied. For example, my tileSize is not set to the specified 512x512, and the *.ovr overviews file is created even though I specified for pyramids to not be created ("NONE").

I am referencing the below document for CopyRaster_management: http://resources.arcgis.com/en/help/...00000094000000
At the bottom of the document under "Environments" it lists the environment settings and the tileSize, compression, and pyramid options are listed, so I assume these should be getting applied.

Am I applying these environment settings incorrectly? How can I prevent overviews from being created, and my tileSize from being correctly applied? Any help is appreciated, thanks.

Viewing all articles
Browse latest Browse all 2485

Latest Images

Trending Articles



Latest Images