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

Clip (Data Management)

Release 9.2
Last modified November 29, 2010
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 using minimum and maximum x and y coordinates.


Illustration

Clip illustration

Usage tips

Command line syntax
An overview of the Command Line window
Clip_management <in_raster> <rectangle> <out_raster> {in_template_dataset}

Parameter Explanation Data Type
<in_raster>

The input raster dataset.

Composite Geodataset
<rectangle>

The four coordinates defining the area to be clipped.

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

Envelope
<out_raster>

The output 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 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.

Raster Dataset
{in_template_dataset}

An existing layer of which the extent will be used as the clip extent.

Geodataset
Data types for geoprocessing tool parameters


Command line example

Clip_management D:\images\OverviewImage\Layer_1 '549790 5272863 549870 5273000' D:\images\ClippedOverview1 #

Scripting syntax
About getting started with writing geoprocessing scripts
Clip_management (in_raster, rectangle, out_raster, in_template_dataset)

Parameter Explanation Data Type
in_raster (Required)

The input raster dataset.

Composite Geodataset
rectangle (Required)

The four coordinates defining the area to be clipped.

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

Envelope
out_raster (Required)

The output 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 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.

Raster Dataset
in_template_dataset (Optional)

An existing layer of which the extent will be used as the clip extent.

Geodataset

Data types for geoprocessing tool parameters


Script example

# Create the geoprocessing object
import arcgisscripting
gp = arcgisscripting.create()

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

' Clips a portion of a raster dataset based on an extent.
' 
' Function Clip(ByVal GeoDataset As esriGeoDatabase.IGeoDataset, _
'   ByVal Rectangle As esriGeometry.IEnvelope) _
'   As esriGeoDatabase.IGeoDataset
' 
' Member of esriGeoAnalyst.ITransformationOp

' Create the RasterTransformationOp object
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

' Declare the output raster object
Dim pGeoDS As IGeoDataset

' Calls the method
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.