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

Clip (Data Management)

Release 9.3
Last modified March 8, 2012
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

NOTE: This topic was updated for 9.3.1.


Creates a spatial subset of a raster dataset


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} {nodata_value} {NONE | ClippingGeometry}

Parameter Explanation Data Type
<in_raster>

The input raster dataset.

Composite geodataset
<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 will make sure that the proper alignment is used. This may cause the output to have a slightly different extent than specified in the tool.

Envelope
<out_raster>

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: .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 raster or vector layer, which will be used as the clip extent. The clip output will include 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.

Geodataset
{nodata_value}

All the pixels with the specified value will be set to NoData in the output raster dataset.

Integer
{NONE | 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.

  • NONE — The raster dataset will be clipped based on the minimum bounding rectangle of the feature class.
  • ClippingGeometry — The raster dataset will be clipped based on the perimeter of the polygon shape.
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.

Boolean
Data types for geoprocessing tool parameters


Command line example

Clip_management C:\RasterData\test\clip_geo.tif '1945705 288915 1963287 299551' C:\RasterData\test\clip_test.img C:\RasterData\test\clip_geo.shp 255 ClippingGeometry

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

Parameter Explanation Data Type
in_raster (Required)

The input raster dataset.

Composite geodataset
rectangle (Required)

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 will make sure that the proper alignment is used. This may cause the output to have a slightly different extent than specified in the tool.

Envelope
out_raster (Required)

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: .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 raster or vector layer, which will be used as the clip extent. The clip output will include 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.

Geodataset
nodata_value (Optional)

All the pixels with the specified value will be set to NoData in the output raster dataset.

Integer
clipping_geometry (Optional)

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.

  • NONE — The raster dataset will be clipped based on the minimum bounding rectangle of the feature class.
  • ClippingGeometry — The raster dataset will be clipped based on the perimeter of the polygon shape.
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.

Boolean

Data types for geoprocessing tool parameters


Script example

# Create the geoprocessing object 
import arcgisscripting
gp = arcgisscripting.create()
gp.workspace = r"C:\RasterData\test"

gp.clip_management("clip_geo.tif","1945705 288915 1963287 299551","clip_test.img","clip_geo.shp","255","ClippingGeometry")

Map Algebra syntax
Not available

ArcObjects syntax
See Clip.

The Spatial Analyst extension must be present to use this link.

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