Clip a grid or lattice

Last Published: April 25, 2020



Grids can be clipped to a rectangular window or to an irregular shape. The following methods will point you to the correct commands. Method 1 only requires an ArcInfo licsense, Methods 2-4 require a GRID license, and Method 5 requires a TIN license.


Method 1: Use the GRIDCLIP command from the Arc prompt to clip a grid with a rectangular box.

Arc: GRIDCLIP mygrid clipgrid 127 4225 389 5324
Method 2: Enter the GRID module and use the SETWINDOW command to define the area to be clipped out. Then use the map algebra statement <outgrid> = <ingrid>. A copy of the input grid is made for just the area given with SETWINDOW.

Grid: SETWINDOW 127 4225 389 5324
Grid: clipgrid = mygrid
Method 3: To clip with an irregular shape, a mask grid must first be created. This grid must have a value of NODATA for cells that are outside the clipping area. SETMASK to the mask grid and SETWINDOW to the desired area. The statement <outgrid> = <ingrid> will make a copy of just the clipped area. The output will be of the area set with SETWINDOW and only cells in the SETMASK that have data will have data on the output.

Grid: SETWINDOW 127 4225 389 5324
Grid: SETMASK bndgrid
Grid: clipgrid = mygrid
Method 4: The selection functions (SELECTPOLYGON, SELECTBOX, etc.) in GRID will also do clipping. These functions will create an output grid of the same extent as the input grid but cells inside or outside (depending on which option is selected) the selected area will be converted to NODATA. There is more than one usage for each command. Check the command reference of each command for optional usages.

Grid: clipgrid = SELECTPOLYGON(mygrid,bndpoly,INSIDE)

Method 5: LATTICECLIP (TIN) command may be used to clip a grid with a polygon coverage.

Arc: LATTICECLIP mygrid bndpoly MINIMUM

Article ID:000001417

  • Legacy Products
  • ArcMap 9 x
  • ArcMap 8 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options