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

Clip (Data Management)

Release 9.1
Last modified June 25, 2007
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

Creates a spatial subset of a raster dataset. The clipped area is specified by a rectangular envelope.

The rectangular envelope extents are specified using minimum and maximum x and y coordinates.


Illustration

Clip illustration

Usage tips

Command line syntax
Introducing geoprocessing methods—Using dialog boxes and the command line
Clip_management <in_raster> <rectangle> <out_raster>

Parameter Explanation
<in_raster>

Input raster dataset.

<rectangle>

The rectangle defining the area to be clipped.

Define in this order: X-Minimum, Y-Minimum, X-Maximum, Y-Maximum.

<out_raster>

Output raster dataset. When not saving to a geodatabase, specify .tif for a TIFF file format, .img for an ERDAS IMAGINE file format, or no extension for a GRID file format.


Command line example
Clip_management D:\images\OverviewImage\Layer_1 '549790 5272863 549870 5273000' D:\images\ClippedOverview1

Scripting syntax
Introducing geoprocessing methods—Running a script
Clip_management (in_raster, rectangle, out_raster)

Parameter Explanation
in_raster (Required)

Input raster dataset.

rectangle (Required)

The rectangle defining the area to be clipped.

Define in this order: X-Minimum, Y-Minimum, X-Maximum, Y-Maximum.

out_raster (Required)

Output raster dataset. When not saving to a geodatabase, specify .tif for a TIFF file format, .img for an ERDAS IMAGINE file format, or no extension for a GRID file format.


Script example
from win32com.client import Dispatch
gp = Dispatch('esriGeoprocessing.GpDispatch.1')
gp.workspace = "c:/seattle_data"
gp.Clip_management("seattle1.tif","549790.051000 5272863.993000 549870.051000 5273000.993000","seattle_clip.img")

Map Algebra syntax
Not available.

ArcObjects syntax
ITransformationOp::Clip(GeoDataset As IGeoDataset, Rectangle As IEnvelope) As IGeoDataset

Parameter Explanation
GeoDataset An input Raster, RasterDataset RasterBand or RasterDescriptor.
Rectangle An IEnvelope identifying the lower-left and upper-right coordinates of the rectangle defining the area to be subset from the input GeoDataset.

ArcObjects example

'Function Clip(ByVal GeoDataset As esriGeoDatabase.IGeoDataset, _
' ByVal Rectangle As esriGeometry.IEnvelope) _
' As esriGeoDatabase.IGeoDataset
' Member of esriGeoAnalyst.ITransformationOp

Dim pTransformationOp As ITransformationOp
Set pTransformationOp = New RasterTransformationOp

' Get raster
Dim pRas01 As IRaster
Set pRas01 = getRasterFromDiskFunction("c:\data\myRaster")

' Declare an envelope object
Dim pEnvelope As IEnvelope

' Create an envelope
Set pEnvelope = New Envelope
pEnvelope.PutCoords 1, 1, 3, 3

Dim pGeoDS As IGeoDataset
Set pGeoDS = pTransformationOp.Clip(pRas01, pEnvelope)

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