Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Data Management toolbox > Raster toolset > Tools

Resample (Data Management)

Release 9.2
Last modified November 29, 2010
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

Alters the proportions of a raster dataset by changing the cell size. The cell size will be changed, but the extent of the raster dataset will remain the same.


Illustration

Resample illustration

Usage tips

Command line syntax
An overview of the Command Line window
Resample_management <in_raster> <out_raster> {cell_size} {NEAREST | BILINEAR | CUBIC | MAJORITY}

Parameter Explanation Data Type
<in_raster>

The input raster dataset.

Composite Geodataset
<out_raster>

The output raster dataset.

When storing the raster dataset in a file format, you need to specify the file extension: .bmp for BMP, .gif for GIF, .img for an ERDAS IMAGINE file, .jpg for JPEG, .jp2 for JPEG 2000, .png for PNG, .tif for TIFF, or no extension for GRID.

When storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset. A raster dataset stored in a geodatabase can be compressed; you can specify a compression type and compression quality.

Raster Dataset
{cell_size}

The cell size for the output raster dataset. The default cell size is the cell size of the input raster dataset.

Analysis Cell Size
{NEAREST | BILINEAR | CUBIC | MAJORITY}

Specifies the resampling algorithm to be used when resampling the raster dataset.

  • NEAREST — Nearest neighbor assignment. This is the default.
  • BILINEAR — Bilinear interpolation.
  • CUBIC — Cubic convolution.
  • MAJORITY — Majority resampling.

String
Data types for geoprocessing tool parameters


Command line example

resample_management D:\images.mdb\raster D:\images.mdb\resamp_raster 30 BILINEAR

Scripting syntax
About getting started with writing geoprocessing scripts
Resample_management (in_raster, out_raster, cell_size, resampling_type)

Parameter Explanation Data Type
in_raster (Required)

The input raster dataset.

Composite Geodataset
out_raster (Required)

The output raster dataset.

When storing the raster dataset in a file format, you need to specify the file extension: .bmp for BMP, .gif for GIF, .img for an ERDAS IMAGINE file, .jpg for JPEG, .jp2 for JPEG 2000, .png for PNG, .tif for TIFF, or no extension for GRID.

When storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset. A raster dataset stored in a geodatabase can be compressed; you can specify a compression type and compression quality.

Raster Dataset
cell_size (Optional)

The cell size for the output raster dataset. The default cell size is the cell size of the input raster dataset.

Analysis Cell Size
resampling_type (Optional)

Specifies the resampling algorithm to be used when resampling the raster dataset.

  • NEAREST — Nearest neighbor assignment. This is the default.
  • BILINEAR — Bilinear interpolation.
  • CUBIC — Cubic convolution.
  • MAJORITY — Majority resampling.

String

Data types for geoprocessing tool parameters


Script example

# Create the geoprocessing object
import arcgisscripting
gp = arcgisscripting.create()

gp.workspace = "c:/redlands_data"
gp.Resample_management("redlands1.tif","redlands_resample.img" , "30","BILINEAR")

Map Algebra syntax
Resample(<grid>, {cellsize}, {NEAREST | BILINEAR | CUBIC | SEARCH})

Parameter Explanation
<grid> The name of the input raster.
{cellsize} The output cell size.
The default is the current environment setting set on the Cell Size tab of the Options dialog box.
{NEAREST | BILINEAR | CUBIC | SEARCH} Specifies the resampling algorithm to be used when resampling the raster.
  • NEAREST — Nearest neighbor assignment. This is the default.
  • BILINEAR — Bilinear interpolation.
  • CUBIC — Cubic convolution.
  • SEARCH — Extended nearest neighbor.

Map Algebra example

resample(ingrid, .5)
resample(ingrid1, 23.5, cubic)
resample(ingrid1 + ingrid2, 4)
resample(ingrid, 2000, bilinear)

ArcObjects syntax
There is no corresponding Spatial Analyst object to perform Resample. However, in core ArcGIS, similar functionality can be found in the IRasterGeometryProc object.

For more information, see ArcObjects Developer Help.

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.