From
http://support.esri.com/search/KbDocument.asp?dbid=22526, with
modifications by M. Helper.
NB: This tip explains clipping a multiband image, but the
procedure relies on first turning the image into grids. If you're
already working with a grid, simply ignore the first and last
parts and begin with Step 3: CLIP A RASTER BASED ON A SHAPEFILE.
If you also already have a shapefile to clip to, skip ahead to
Step 3j. If you aren't working with Multiband images and simply
want to clip a grid, follow Steps 3j-3Q.
Summary
This document details clipping or sub-setting a multiband
image. The Spatial Analyst extension is required. It is
important to note that ArcGIS does not directly edit images, thus
converting images to grids allows ArcGIS and Spatial Analyst to
manipulate the data set and produce the desired results.
Procedure
1) Open ArcCatalog, locate the desired raster, right-click it
and select Export > Raster to Different Format. Select ESRI Grid
as the export format and then specify a storage location and
name for the new grids and click Save (Choose a file name
different from the raster!). Converting a multiband image
to a grid will produce a grid for each band in the image. The
bands will be designated with a "c1", "c2" or "c3" suffix on the
name specified in the Export dialog.
2) Add each "c#" grid to ArcMap.
3) Clip the grids
Summary: These directions show how to CLIP A RASTER BASED ON A SHAPEFILE.
Procedure:
A) Start ArcCatalog.
B) Right-click folder and select New > Shapefile.
C) Name your shapefile and specify:
- Feature Type = Polygon
- Spatial Reference is Optional
D) Start ArcMap.
E) Add the shapefile layer and raster layer.
F) Click Editor > Start Editing and specify:
- Task = Create New Feature
- Target = Shapefile
G) Select the Create New Feature tool.
H) Draw a polygon around the area of the raster you want to
clip.
I) Stop editing and save your edits.
J) Select Options in the dropdown menu of Spatial Analyst.
K) Switch to the General tab and specify Analysis Mask =
Shapefile.
L) Switch to the Extent tab and specify Analysis Extent =
Shapefile.
M) Select Raster Calculator in the Spatial Analyst dropdown
menu.
N) Double-click the raster under layers.
O) Evaluate.
- Please reference the "Using ArcGIS Spatial Analyst"
manual for details on setting the analysis environment.
Display extents, other rasters or explicitly specified
extents can be used.
P) Right click on each "Calculation" grid output from the
Raster Calculator and select Make Permanent from the context
menu.
Q) Specify a storage location and name for each. Be sure to
save them to the same directory.
I have noticed that sometimes, after doing steps 3J-O, a
grid is created that is blank. Multiple attempts at redoing these
steps does not correct the problem. Simply closing ArcMap,
starting anew with a new project screen, adding the data and
performing the same steps will, for unknown reasons, give the
proper result. The permanent grids can, of course, be added later
to the original project.
4) Reopen the Raster Calculator.
5) Use a MAKESTACK command in the Raster Calculator to create
a new grid stack similar to a multiband image. The syntax will
vary depending on the version of ArcGIS in use.
a) The syntax depends on the version of ArcGIS.
In the examples below, "Stack1" represents the name of the
output grid stack. "[Grid1]", "[Grid2]", and "[Grid3]"
represent the input grids to be stacked.
In ArcGIS 8.1.2 (Build 671; THIS IS THE EDITION SOME OF YOU
MAY HAVE IF GTKARCGIS cd), the MAKESTACK command syntax is:
MAKESTACK Stack1 [Grid1] [Grid2] [Grid3]
In ArcGIS 8.2 (Build 700)(THIS IS THE VERSION INSTALLED IN
RM 111), a keyword "LIST" must be used, similar to
Workstation. The keyword "FILE" is not supported in the
Raster Calculator.
MAKESTACK Stack1 LIST [Grid1] [Grid2] [Grid3]
MAKESTACK is not supported in the Raster Calculator of ArcGIS
8.1 (Build 642) or ArcGIS 8.1.1 (Build 649). If MAKESTACK is
necessary, it must be run at the Grid: prompt in ArcInfo
Workstation. An ArcInfo license is required for this operation.
6) In ArcCatalog, navigate to the location of the new grid
stack.
7) Right click on the grid stack and select Export > Raster
to Different Format.
8) Select the desired image format (Imagine, TIFF or SDE
Raster), the storage location and name and press OK. The output
from this step will be a clipped, multiband image.
END |