Alters a raster by changing the cell size and/or extent. The extent can be imported from an existing dataset - feature class, raster or TIN.
Parameters
| Expression | Explanation |
|---|---|
| Function Name | ResampleRaster |
| <input raster> | A String - the full path to the input raster dataset. |
| <output raster> | A String - the full name of the output raster. |
| <cell size> | A Double representing the cell size. |
| {extent from} | A String indicating where the extents of the output will be taken from. "S" means that the extent of the input raster will be used, "R" means that the extent will be taken from the Reference Dataset, "C" means that a custom extent is specified in the last 4 parameters. |
| {reference dataset} | A String - the full path to the reference dataset |
| {MinX} | A Double - minimum X of the output extent. |
| {MaxX} | A Double - maximum X of the output extent. |
| {MinY} | A Double - minimum Y of the output extent. |
| {MinX} | A Double - maximum Y of the output extent. |
| {Method} | A String - the resampling method to be used. Valid values - "NEAREST" for Nearest Neighbor (this is the default) and "BILINEAR" for Bilinear Interpolation . |
ETSPath used in the table below is the full path to ETSRun.exe (E.G. "C:\Program Files\ETSpatial Techniques\ETSurface\ETSRun.exe")
| Language | Syntax |
|---|---|
| Python | subprocess.call([ETSPath, "ResampleRaster", "input raster", "output raster", "cell size", "extent from", "reference dataset", "MinX", "MaxX", "MinY", "MaxY", "Method"]) |
| .NET using ETSRun.exe | StartInfo.FileName = ETSPath StartInfo.Arguments = "ResampleRaster" "input raster" "output raster" "cell size" "extent from" "reference dataset" "MinX" "MaxX" "MinY" "MaxY" "Method" |
| .NET using ETSOutX.dll | ResampleRaster(input raster, output raster, cell size, extent from, reference dataset, MinX, MaxX, MinY, MaxY, Method) |
| ArcPy | arcpy.ResampleRaster("input raster", "output raster", "cell size", "extent from", "reference dataset", "MinX", "MaxX", "MinY", "MaxY", "Method") |
Notes:
<> - required parameter
{} - optional parameter
The argument separator for StartInfo.Arguments is space. If a string might contain a space, you need to double quote it.