rhaugerud

Clip a raster and change cell size?

Discussion created by rhaugerud on May 3, 2013
Latest reply on May 3, 2013 by helyxsisltd
I'm trying to script the clipping of a large raster into tiles with simultaneous resampling. A script that includes these lines:

[INDENT]print 'Clipping to '+clipExtent
print arcpy.Describe(sourceGrid+'/Band_1').meanCellWidth
arcpy.env.cellSize = 1.0
print arcpy.env.cellSize
arcpy.Clip_management(sourceGrid,clipExtent,clippedGrid)
print arcpy.Describe(clippedGrid+'/Band_1').meanCellWidth
            [/INDENT]

gives the following output (annotated):
[INDENT]Clipping to 230000 3970000 240000 3980000
0.5      (sourceGrid cell size)
1        (arcpy.env.cellSize}
0.5      (clippedGrid cell size)[/INDENT]

Why does Clip_management appear not to honor the arcpy.env.cellSize setting? What am I not understanding?

Outcomes