Resample |
|
Release 9.3
Last modified September 7, 2011 |
Print all topics in : "Raster Management (Spatial Analyst)" |
Changes the cell size of a raster.
Illustration
OutRas = Resample (InRas1, 3)
Usage tips
Map Algebra
The current environment settings of cell size (if one is specified) and extent are applied to the output. The mask is not used.
The NEAREST option, which performs a nearest neighbor assignment, is the fastest of the four interpolation methods. It is used primarily for categorical data, such as a landuse classification, since it will not change the values of the cells. The maximum spatial error will be one-half the {cellsize}.
The BILINEAR option, which performs a bilinear interpolation, determines the new value of a cell based on a weighted distance average of the four nearest input cell centers. It is useful for continuous data and will cause some smoothing of the data.
The CUBIC option, which performs a cubic convolution, determines the new value of a cell based on fitting a smooth curve through the 16 nearest input cell centers. It is appropriate for continuous data, although it may result in the output raster dataset containing values outside the range of the input raster. It is geometrically less distorted than the raster achieved by running the NEAREST neighbor resampling algorithm. The disadvantage of the CUBIC option is that it requires more processing time. In some cases, it can result in output cell values outside the range of input cell values. If this is unacceptable, use BILINEAR instead.
The SEARCH option assigns the value for the output cell by searching from its center for the nearest cell of the raster dataset being resampled with a value (not NoData) within the output cell area. The SEARCH option is useful for rasters having points or line features on a NoData background. This option ensures that no point features will be missed and that line features will be preserved as continuous.
The SEARCH option is appropriate for resampling categorical data to a coarser resolution when it is important to preserve foreground cells surrounded by a NoData background.
The BILINEAR and CUBIC options should not be used with categorical data, since the cell values may be altered.
The lower left corner of the output raster will be the same map space coordinate location as the lower left corner of the input raster.
The numbers of rows and columns in the output raster are determined as follows:
columns = (xmax - xmin) / cell size rows = (ymax - ymin) / cell sizeIf there is any remainder from the above equations, then rounding of the number of columns and/or rows is performed.
When typing a Map Algebra expression into the Spatial Analyst Raster Calculator, if the input raster dataset is a grid and resides in the working directory (set on the General tab of the Options dialog), type the name of the grid directly into the expression: "slope(ingrid1)".
If the grid dataset does not reside in your working directory, type the path to the grid dataset on disk: "slope(c:\SpatialData\ingrid1)".All other raster datasets (for example, TIFF) cannot be accessed directly from disk. To input other raster data (including grids) into an expression, you must first add the dataset as a layer to ArcMap. The layers will be displayed in the Layers list of the Raster Calculator. When entering the raster into a Map Algebra expression, it must be surrounded by square brackets: "slope([inlayer1])".
Command line syntax
See Resample (Data Management)
Scripting syntax
See Resample (Data Management)
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.
|
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.