how to extract perimeter cells from raster

1106
2
02-28-2012 08:28 PM
CathyReidy_Liermann
New Contributor
Hi all,

I've got a raster dataset from which I need to extract all the cells representing the perimeter (the raster is of runoff, and I need all coastal runoff).  I was thinking that I could query cells that neighbor a null value (non-land is null value), but I don't know how to craft such a query, or if there's a tool already in place to do this.  Any other ideas of how to select perimeter cells? 

Thanks!
Cathy
0 Kudos
2 Replies
PrasantaBhattarai
Esri Contributor
Hi Cathy,
If you have Spatial Analyst extension, here's what you can try:
1. Create a polyline for the boundary of your raster
- Reclassify your raster to 1 value.
- Convert Raster to Polygon > Buffer it inside with 1/2 the cell size and convert it to Line
2. Run Extract by mask tool and use the polyline feature as mask.
3. Convert your output (mask) raster into points.
(grid_code is the pixel values from your runoff raster for each cells)

If you have 3D Analyst extensions, here's what you can use:
1. Use the Raster Domain tool to create a 3D polyline
2. Convert each vertices of the polyline into points using Feature Vertices to Point (requires ArcInfo)
3. Run Add Z information tool to get Z values into the attribute table for the points.
(Z values are the pixel values from your runoff raster for each cells).

Hope this helps!!!
0 Kudos
CathyReidy_Liermann
New Contributor
Thank you so much!  I did the first option in SA and it worked great.

Cheers!
Cathy
0 Kudos