[Gdal-dev] Controlling pixel values??
Frank Warmerdam
warmerdam at pobox.com
Mon Oct 8 11:07:40 EDT 2007
Hugo Martins wrote:
> Hi gdal users,
>
> I was looking for information on how to handle pixel values with gdal
> and i could get no conclusion.
> My question is simple: is it possible to apply transformations on the
> pixel values of images??
> For example, if i'm using modis NDVI subdataset i have to make a
> division by 10000 to get the NDVI value between -1 and 1. Can i make
> this using gdal? If yes, how?
Hugo,
Generally speaking the answer is that you should read the pixel values,
and then apply any transformations you want yourself in code.
The complex answer is that there is limited support for creating VRT
files to wrap another datasource and have the VRT apply on the fly
rescaling of pixel values. This requires use of the ComplexSource type
but this is not currently documented, so you would need to dig around in
the code in gdal/frmts/vrt a bit to figure out how to do it.
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 | President OSGeo, http://osgeo.org
More information about the Gdal-dev
mailing list