Label | Explanation | Data Type |
Input Raster | The input raster. | Mosaic Layer; Raster Layer |
Output Raster Dataset | The output raster dataset. When storing the raster dataset in a file format, specify the file extension as follows:
When storing a raster dataset in a geodatabase, do not add a file extension to the name of the raster dataset. When storing a raster dataset to a JPEG format file, a JPEG 2000 format file, a TIFF format file, or a geodatabase, you can specify Compression Type and Compression Quality values in the geoprocessing environments. | Raster Dataset |
X Scale Factor | The factor by which to scale the cell size in the x direction. The factor must be greater than zero. | Double |
Y Scale Factor | The factor by which to scale the cell size in the y direction. The factor must be greater than zero. | Double |
Summary
Resizes a raster by the specified x and y scale factors.
Usage
The output size is multiplied by the scale factor for both the x and y directions. The number of columns and rows stays the same in this process, but the cell size is multiplied by the scale factor.
The scale factor must be positive.
A scale factor greater than one means the image will be rescaled to a larger dimension, resulting in a larger extent because of a larger cell size.
A scale factor less than one means the image will be rescaled to a smaller dimension, resulting in a smaller extent because of a smaller cell size.
You can save the output to BIL, BIP, BMP, BSQ, DAT, Esri Grid, GIF, IMG, JPEG, JPEG 2000, PNG, TIFF, MRF, or CRF format, or any geodatabase raster dataset.
When storing a raster dataset to a JPEG format file, a JPEG 2000 format file, or a geodatabase, you can specify a Compression Type value and a Compression Quality value in the geoprocessing environments.
This tool supports multidimensional raster data. To run the tool on each slice in the multidimensional raster and generate a multidimensional raster output, be sure to save the output to CRF.
Supported input multidimensional dataset types include multidimensional raster layer, mosaic dataset, image service, and CRF.
Parameters
arcpy.management.Rescale(in_raster, out_raster, x_scale, y_scale)
Name | Explanation | Data Type |
in_raster | The input raster. | Mosaic Layer; Raster Layer |
out_raster | The output raster dataset. When storing the raster dataset in a file format, specify the file extension as follows:
When storing a raster dataset in a geodatabase, do not add a file extension to the name of the raster dataset. When storing a raster dataset to a JPEG format file, a JPEG 2000 format file, a TIFF format file, or a geodatabase, you can specify Compression Type and Compression Quality values in the geoprocessing environments. | Raster Dataset |
x_scale | The factor by which to scale the cell size in the x direction. The factor must be greater than zero. | Double |
y_scale | The factor by which to scale the cell size in the y direction. The factor must be greater than zero. | Double |
Code sample
This is a Python sample for the Rescale tool.
import arcpy
arcpy.Rescale_management("c:/data/image.tif", "c:/output/rescale.tif", "4", "4")
This is a Python script sample for the Rescale tool.
##====================================
##Rescale
##Usage: Usage: Rescale_management in_raster out_raster x_scale y_scale
import arcpy
arcpy.env.workspace = r"C:/Workspace"
##Rescale a TIFF image by a factor of 4 in both directions
arcpy.Rescale_management("image.tif", "rescale.tif", "4", "4")
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes