[FWTools] Fwd: Help - It´s possible to make raster calculations with GDAL library?

Trent M Hare thare at usgs.gov
Wed Feb 3 19:17:27 EST 2010


I would also recommend using python, but you can also give OpenEV a shot 
which has a "raster calculator" within its' GUI. It is available in 
FWtools but if you have trouble starting it from there, you can also 
install/run it from OSGeo4W.

good luck,
Trent



From:
Frank Warmerdam <warmerdam at pobox.com>
To:
Cecília Cerdeira <ccerdeira at gmail.com>
Cc:
fwtools at lists.maptools.org
Date:
02/03/2010 04:36 PM
Subject:
Re: [FWTools] Fwd: Help - It´s possible to make raster calculations with 
GDAL library?
Sent by:
fwtools-bounces at lists.maptools.org



Cecília Cerdeira wrote:
> Hi!
> 
> I have two operations to solve and I would like to know it it's possible 

> to make those operations by using GDAL libraries/ FWTools.
> 
> 
> *First operation:* Make a division between 2 rasters something like a 
> typical "RASTER CALCULATOR" on a GIS environment.

Cecília,

The usual approach suggested for such an operation is to use the
numpy Python scripting environment to operate on images as arrays.
A relatively simple example of something vaguely similar is available
at:

   http://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples/classify.py

Conveniently FWTools includes Python with the necessary addons for this
to work.

> *
> Second operation:* Based on a raster mask (5x5) calculate statistic 
> values on a raster with a bigger resolution (1x1).

Generally you would need to write your own C/C++ program to do this,
using GDAL for raster data reading and writing.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, 
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
FWTools mailing list
FWTools at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/fwtools
http://fwtools.maptools.org/


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20100203/5498f1a9/attachment.htm 


More information about the FWTools mailing list