com.esri.arcgis.geoprocessing.tools.datamanagementtools
Class Clip
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.datamanagementtools.Clip
- All Implemented Interfaces:
- GPTool
public class Clip
- extends AbstractGPTool
Creates a spatial subset of a raster dataset.
The Clip tool is contained in the Data Management Tools tool box.
Usage tips:
- This tool allows you to extract a portion of a raster dataset based on a template extent. The clip output includes any pixels that intersect the template extent.
- The clipped area is specified either by a rectangular envelope using minimum and maximum x- and y-coordinates or by using an output extent file. If the clip extent specified is not aligned with the input raster dataset, this tool makes sure that the proper alignment is used. This may cause the output to have a slightly different extent than specified in the tool.
- An existing raster or vector layer can be used as the clip extent. If you are using a feature class as the output extent, you have the option to clip the raster by the minimum bounding rectangle of the feature class or by the polygon geometry of the features. If clipping geometry is used, then the pixel depth of the output may be promoted. Therefore, you need to make sure that the output format can support the proper pixel depth.
- When using ArcMap, you also have the ability to use the selected features as the clipping extent. If a feature within the feature class is selected and Use input features for clipping geometry is checked, then the output clips out the areas that are selected. If a feature within the feature class is selected but Use input features for clipping geometry is not checked, then the output clips out the minimum bounding rectangle for that feature.
- You can save your output to BIL, BIP, BMP, BSQ, DAT, GIF, GRID, IMG, JPEG, JPEG 2000, PNG, TIFF, or any geodatabase raster dataset.
- If the clip extent specified is not aligned with the input raster dataset, this tool makes sure that the proper alignment is used. This may cause the output to have a slightly different extent than specified in the tool.
- If you are using a feature class as the output extent, you have the option to clip the raster by the extent of the feature class or by its polygon perimeter.
- The extent values must be in the same spatial coordinates and units as the raster dataset.
Constructor Summary |
Clip()
Creates the Clip tool with defaults. |
Clip(java.lang.Object inRaster,
java.lang.Object rectangle,
java.lang.Object outRaster)
Creates the Clip tool with the required parameters. |
Method Summary |
java.lang.String |
getClippingGeometry()
Returns the Use Input Features for Clipping Geometry parameter of this tool . |
java.lang.Object |
getInRaster()
Returns the Input Raster parameter of this tool . |
java.lang.Object |
getInTemplateDataset()
Returns the Output Extent parameter of this tool . |
double |
getNodataValue()
Returns the NoData Value parameter of this tool . |
java.lang.Object |
getOutRaster()
Returns the Output Raster Dataset parameter of this tool . |
java.lang.Object |
getRectangle()
Returns the Rectangle parameter of this tool . |
java.lang.String |
getToolboxAlias()
Returns the alias of the tool box containing this tool. |
java.lang.String |
getToolboxName()
Returns the name of the tool box containing this tool. |
java.lang.String |
getToolName()
Returns the name of this tool. |
void |
setClippingGeometry(java.lang.String clippingGeometry)
Sets the Use Input Features for Clipping Geometry parameter of this tool . |
void |
setInRaster(java.lang.Object inRaster)
Sets the Input Raster parameter of this tool . |
void |
setInTemplateDataset(java.lang.Object inTemplateDataset)
Sets the Output Extent parameter of this tool . |
void |
setNodataValue(double nodataValue)
Sets the NoData Value parameter of this tool . |
void |
setOutRaster(java.lang.Object outRaster)
Sets the Output Raster Dataset parameter of this tool . |
void |
setRectangle(java.lang.Object rectangle)
Sets the Rectangle parameter of this tool . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Clip
public Clip()
- Creates the Clip tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
Clip
public Clip(java.lang.Object inRaster,
java.lang.Object rectangle,
java.lang.Object outRaster)
- Creates the Clip 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
- the input raster dataset.rectangle
- the four coordinates defining the minimum bounding rectangle to be clipped. Define in this order: X-Minimum, Y-Minimum, X-Maximum, Y-Maximum. if the clip extent specified is not aligned with the input raster dataset, the Clip tool makes sure that the proper alignment is used. This may cause the output to have a slightly different extent than specified in the tool.outRaster
- the output raster dataset. Make sure that this output format is able to support the proper pixel depth. when storing the raster dataset in a file format, you need to specify the file extension: when storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset. when storing your raster dataset to a JPEG file, a JPEG 2000 file, a TIFF file, or a geodatabase, you can specify a compression type and compression quality.
getInRaster
public java.lang.Object getInRaster()
- Returns the Input Raster parameter of this tool .
This parameter is the input raster dataset.
This is a required parameter.
- Returns:
- the Input Raster
setInRaster
public void setInRaster(java.lang.Object inRaster)
- Sets the Input Raster parameter of this tool .
This parameter is the input raster dataset.
This is a required parameter.
- Parameters:
inRaster
- the input raster dataset.
getRectangle
public java.lang.Object getRectangle()
- Returns the Rectangle parameter of this tool .
This parameter is the four coordinates defining the minimum bounding rectangle to be clipped. Define in this order: X-Minimum, Y-Minimum, X-Maximum, Y-Maximum. if the clip extent specified is not aligned with the input raster dataset, the Clip tool makes sure that the proper alignment is used. This may cause the output to have a slightly different extent than specified in the tool.
This is a required parameter.
- Returns:
- the Rectangle
setRectangle
public void setRectangle(java.lang.Object rectangle)
- Sets the Rectangle parameter of this tool .
This parameter is the four coordinates defining the minimum bounding rectangle to be clipped. Define in this order: X-Minimum, Y-Minimum, X-Maximum, Y-Maximum. if the clip extent specified is not aligned with the input raster dataset, the Clip tool makes sure that the proper alignment is used. This may cause the output to have a slightly different extent than specified in the tool.
This is a required parameter.
- Parameters:
rectangle
- the four coordinates defining the minimum bounding rectangle to be clipped. Define in this order: X-Minimum, Y-Minimum, X-Maximum, Y-Maximum. if the clip extent specified is not aligned with the input raster dataset, the Clip tool makes sure that the proper alignment is used. This may cause the output to have a slightly different extent than specified in the tool.
getOutRaster
public java.lang.Object getOutRaster()
- Returns the Output Raster Dataset parameter of this tool .
This parameter is the output raster dataset. Make sure that this output format is able to support the proper pixel depth. when storing the raster dataset in a file format, you need to specify the file extension: when storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset. when storing your raster dataset to a JPEG file, a JPEG 2000 file, a TIFF file, or a geodatabase, you can specify a compression type and compression quality.
This is a required parameter.
- Returns:
- the Output Raster Dataset
setOutRaster
public void setOutRaster(java.lang.Object outRaster)
- Sets the Output Raster Dataset parameter of this tool .
This parameter is the output raster dataset. Make sure that this output format is able to support the proper pixel depth. when storing the raster dataset in a file format, you need to specify the file extension: when storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset. when storing your raster dataset to a JPEG file, a JPEG 2000 file, a TIFF file, or a geodatabase, you can specify a compression type and compression quality.
This is a required parameter.
- Parameters:
outRaster
- the output raster dataset. Make sure that this output format is able to support the proper pixel depth. when storing the raster dataset in a file format, you need to specify the file extension: when storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset. when storing your raster dataset to a JPEG file, a JPEG 2000 file, a TIFF file, or a geodatabase, you can specify a compression type and compression quality.
getInTemplateDataset
public java.lang.Object getInTemplateDataset()
- Returns the Output Extent parameter of this tool .
This parameter is an existing raster or vector layer, which can be used as the clip extent. The clip output includes any pixels that intersect the minimum bounding rectangle. if a feature class is used as the output extent and you want to clip the raster based on the polygon features, choose the ClippingGeometry option. If Clipping Geometry is used, then the pixel depth of the output may be promoted. Therefore, you need to make sure that the output format can support the proper pixel depth.
This is an optional parameter.
- Returns:
- the Output Extent
setInTemplateDataset
public void setInTemplateDataset(java.lang.Object inTemplateDataset)
- Sets the Output Extent parameter of this tool .
This parameter is an existing raster or vector layer, which can be used as the clip extent. The clip output includes any pixels that intersect the minimum bounding rectangle. if a feature class is used as the output extent and you want to clip the raster based on the polygon features, choose the ClippingGeometry option. If Clipping Geometry is used, then the pixel depth of the output may be promoted. Therefore, you need to make sure that the output format can support the proper pixel depth.
This is an optional parameter.
- Parameters:
inTemplateDataset
- an existing raster or vector layer, which can be used as the clip extent. The clip output includes any pixels that intersect the minimum bounding rectangle. if a feature class is used as the output extent and you want to clip the raster based on the polygon features, choose the ClippingGeometry option. If Clipping Geometry is used, then the pixel depth of the output may be promoted. Therefore, you need to make sure that the output format can support the proper pixel depth.
getNodataValue
public double getNodataValue()
- Returns the NoData Value parameter of this tool .
This parameter is all the pixels with the specified value will be set to NoData in the output raster dataset.
This is an optional parameter.
- Returns:
- the NoData Value
setNodataValue
public void setNodataValue(double nodataValue)
- Sets the NoData Value parameter of this tool .
This parameter is all the pixels with the specified value will be set to NoData in the output raster dataset.
This is an optional parameter.
- Parameters:
nodataValue
- all the pixels with the specified value will be set to NoData in the output raster dataset.
getClippingGeometry
public java.lang.String getClippingGeometry()
- Returns the Use Input Features for Clipping Geometry parameter of this tool .
This parameter is if you are using a feature class as the output extent, you have the option to clip the raster by the extent of the feature class or by its polygon perimeter. if clipping geometry is used, then the pixel depth of the output may be promoted. Therefore, you need to make sure that the output format can support the proper pixel depth.
This is an optional parameter.
- Returns:
- the Use Input Features for Clipping Geometry
setClippingGeometry
public void setClippingGeometry(java.lang.String clippingGeometry)
- Sets the Use Input Features for Clipping Geometry parameter of this tool .
This parameter is if you are using a feature class as the output extent, you have the option to clip the raster by the extent of the feature class or by its polygon perimeter. if clipping geometry is used, then the pixel depth of the output may be promoted. Therefore, you need to make sure that the output format can support the proper pixel depth.
This is an optional parameter.
- Parameters:
clippingGeometry
- if you are using a feature class as the output extent, you have the option to clip the raster by the extent of the feature class or by its polygon perimeter. if clipping geometry is used, then the pixel depth of the output may be promoted. Therefore, you need to make sure that the output format can support the proper pixel depth.
getToolName
public java.lang.String getToolName()
- Returns the name of this tool.
- Returns:
- the tool name
getToolboxName
public java.lang.String getToolboxName()
- Returns the name of the tool box containing this tool.
- Returns:
- the tool box name
getToolboxAlias
public java.lang.String getToolboxAlias()
- Returns the alias of the tool box containing this tool.
- Returns:
- the tool box alias