[gdal-dev] GDAL equivalent of ArcGIS's focal statistics raster interpolation?

Peter J Halls P.Halls at york.ac.uk
Wed Aug 11 03:21:13 EDT 2010


When you talk of the ArcGIS FocalStatistics tool, to which statistics do you refer?

ArcGIS Spatial Analyst is built on C Dana Tomlin's Map Algebra and the ArcGIS 
Workstation command line implementation 'Grid Algebra'.  In Map Algebra, Focal 
functions operate on an immediate neighbourhood of specified size, yielding a 
result which is stored in the output 'focal' or central cell.  FocalStatistics 
provides a single tool to deliver the functions FocalMean, FocalMedian, 
FocalMinimum, FocalMaximum, FocalMinority, FocalMajority and FocalRange.

You talk of 'blurring' the raster, however each of these functions has a 
specific purpose related to its result - FocalMean and FocalMedian, for example, 
deliver a smoothing operation; FocalRange delivers what is, in effect, a measure 
of the smoothness of the neighbourhood; and so on.

If you are writing a raster model, for example, using GDAL to manage the data, 
then you can implement any of these when using GDAL, but you will not find GDAL 
functions ready for you: GDAL provides you with the essential tools by which to 
access and manipulate raster data - read and write, transformation, etc., but it 
is up to you what you do at cell level.  GDAL is not a GIS, however, and 
therefore does not provide the same range of tools as ArcGIS - which, for 
example, incorporates and uses GDAL internally for some raster data access.

If you need to implement such a model, then I would urge you to read Tomlin's 
papers first, so that you understand what it is that you have been using in 
ArcGIS.  Start with the book 'Geographic Information Systems and Cartographic 
Modelling', C Dana Tomlin, 1990, Eaglesfield Cliffs NJ: Prentice Hall.

Best wishes,

Peter

m k wrote:
> Much of my GIS vocabulary comes from ArcGIS. ArcGIS has a Spatial Analyst Tool called Focal Statistics. It basically "blurs" the raster by redefining cells based on a search area (either circle or square), and the values that occur in these surroundings (you can also control how big the area is with a parameter). I've found this process useful to prepare a raster for hillshading.
> I am wondering if there is an equivalent tool in the GDAL library?
> Thank you
> -m 		 	   		  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
--------------------------------------------------------------------------------
Peter J Halls, GIS Advisor, University of York
Telephone: 01904 433806     Fax: 01904 433740
Snail mail: IT Services, University of York, Heslington, York YO10 5DD
This message has the status of a private and personal communication
--------------------------------------------------------------------------------


More information about the gdal-dev mailing list