2

This question already has an answer here:

Given a raster with an overly large nodata surround, how can I automatically discard the surround? Said another way: how does one shrink the raster extent to only occupy the area containing values?

I know one can interactively draw a box and clip the raster, or zoom and export only visible extent, or set an analysis mask. I'm after a geoprocessing tool or simple python script. Tools at hand are ArcGIS with Spatial Analyst, QGIS, and GDAl/OGR, but really anything is fair game.

The example raster is 16bit signed integer, with -32768 defined as NoData, but the null value or bit level really shouldn't matter.

nodata extent is many times larger than the actual data extent

merged by whuber Mar 21 '13 at 21:35

This question was merged with Finding minimum bounding extent of given pixel value within raster? because it is an exact duplicate of that question.

Browse other questions tagged or ask your own question.