com.esri.arcgis.geoprocessing.tools.datamanagementtools
Class Resample
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.datamanagementtools.Resample
- All Implemented Interfaces:
- GPTool
public class Resample
- extends AbstractGPTool
Alters the proportions of a raster dataset by changing the cell size.
The Resample tool is contained in the Data Management Tools tool box.
Software restrictions: none
Usage tips:
- The cell size will be changed, but the extent of the raster dataset will remain the same.
- You can save your output to BMP, GIF, GRID, IMG, JPEG, JPEG 2000, PNG, TIFF, or any geodatabase raster dataset.
- When storing a raster dataset in a geodatabase, no file extension should be added to the name of the 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 your raster dataset to a geodatabase, you can specify a compression type and compression quality within the Raster Storage Settings on the Environment Settings dialog box.
- The Nearest option, which performs a nearest neighbor assignment, is the fastest of the interpolation methods. It is used primarily for discrete data, such as a land use classification, since it will not change the values of the cells. The maximum spatial error will be one-half the cell size.
- The Majority option, which performs a majority algorithm, determines the new value of the cell based on the most popular values within the filter window. It is mainly used with discrete data just as the nearest neighbor method; Majority tends to give a smoother result than Nearest.
- 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 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 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 dataset will be the same map space coordinate location as the lower left corner of the input raster dataset.
- The numbers of rows and columns in the output raster are determined as follows: columns = (xmax - xmin) / cell sizerows = (ymax - ymin) / cell sizeIf there is any remainder from the above equations, rounding of the number of columns and/or rows is performed.
- The following environments affect this tool: current workspace; scratch workspace; output coordinate system; output extent; snap raster; output CONFIG keyword; pyramid; raster statistics; compression; , and tile size;
|
Constructor Summary |
Resample()
Creates the Resample tool with defaults. |
Resample(Object inRaster,
Object outRaster)
Creates the Resample tool with the required parameters. |
Resample
public Resample()
- Creates the Resample tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
Resample
public Resample(Object inRaster,
Object outRaster)
- Creates the Resample tool with the required parameters.
Initializes the array of tool parameters with the values as specified for the required parameters and with the default values for the other parameters.
- Parameters:
inRaster - Composite geodataset, the input raster dataset.outRaster - Raster dataset, 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.
getInRaster
public Object getInRaster()
- Returns the Input Raster parameter of this tool .
This parameter is Composite geodataset, the input raster dataset.
This is a required parameter.
- Returns:
- the Input Raster
setInRaster
public void setInRaster(Object inRaster)
- Sets the Input Raster parameter of this tool .
This parameter is Composite geodataset, the input raster dataset.
This is a required parameter.
- Parameters:
inRaster - Composite geodataset, the input raster dataset.
getOutRaster
public Object getOutRaster()
- Returns the Output Raster Dataset parameter of this tool .
This parameter is Raster dataset, 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.
This is a required parameter.
- Returns:
- the Output Raster Dataset
setOutRaster
public void setOutRaster(Object outRaster)
- Sets the Output Raster Dataset parameter of this tool .
This parameter is Raster dataset, 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.
This is a required parameter.
- Parameters:
outRaster - Raster dataset, 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.
getCellSize
public Object getCellSize()
- Returns the Output Cell Size parameter of this tool .
This parameter is Analysis cell size, the cell size for the output raster dataset. The default cell size is the cell size of the input raster dataset.
This is an optional parameter.
- Returns:
- the Output Cell Size
setCellSize
public void setCellSize(Object cellSize)
- Sets the Output Cell Size parameter of this tool .
This parameter is Analysis cell size, the cell size for the output raster dataset. The default cell size is the cell size of the input raster dataset.
This is an optional parameter.
- Parameters:
cellSize - Analysis cell size, the cell size for the output raster dataset. The default cell size is the cell size of the input raster dataset.
getResamplingType
public String getResamplingType()
- Returns the Resampling Techinque parameter of this tool .
This parameter is String, specifies the resampling algorithm to be used when resampling the raster dataset.
This is an optional parameter.
- Returns:
- the Resampling Techinque
setResamplingType
public void setResamplingType(String resamplingType)
- Sets the Resampling Techinque parameter of this tool .
This parameter is String, specifies the resampling algorithm to be used when resampling the raster dataset.
This is an optional parameter.
- Parameters:
resamplingType - String, specifies the resampling algorithm to be used when resampling the raster dataset.
getToolName
public String getToolName()
- Returns the name of this tool.
- Returns:
- the tool name
getToolboxName
public String getToolboxName()
- Returns the name of the tool box containing this tool.
- Returns:
- the tool box name
getToolboxAlias
public String getToolboxAlias()
- Returns the alias of the tool box containing this tool.
- Returns:
- the tool box alias