[gdal-dev] Proposal: gdal_muladd.py

Frank Warmerdam warmerdam at pobox.com
Mon Jan 25 21:38:13 EST 2010


Chaitanya,

I don't think the VRT approach supports actually adding
different images together, only overlaying and rescaling.

Peder, such a script would be welcome initially in
the gdal/swig/python/samples directory which are
often "proof of concept" level scripts rather than being
as polished as the supported scripts in the /scripts
directory.

Best regards,

On Tue, Jan 26, 2010 at 12:40 AM, Chaitanya kumar CH
<chaitanya.ch at gmail.com> wrote:
> Peder,
>
> At present, we can get that functionality using the GDAL Virtual Format. (
> http://www.gdal.org/gdal_vrttut.html )
> There are <ScaleOffset> and <ScaleRatio> values that can be specified within
> the <ComplexSource>.
>
> This .vrt file can be used as it is or translated to other formats.
>
> On Mon, Jan 25, 2010 at 9:34 PM, Peder Axensten <peder at axensten.se> wrote:
>>
>> I need a tool to add images together and I also need a tool to rescale the
>> values of an image. So I have this idea of a tool that can add images
>> together, where each may have its own weight. For example:
>>    gdal_muladd.py -o result_file *2.2 file1 *-1 file2 file3
>> would multiply the values of file with 2.2 and add them with -1 times the
>> values of file2 etc.
>>
>> I have something (based on gdal_merge.py) that seems to work, but still
>> needs some work to handle no_data.
>>
>> Is there any interest to add this to the gdal collection of tools?
>>
>> Regards,
>>
>> Peder Axensten
>> Research engineer
>>
>> Swedish University of Agricultural Sciences
>> Forest Resource Management
>> Remote Sensing Laboratory
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
>
> --
> Best regards,
> Chaitanya kumar CH.
> /tʃaɪθənjə/ /kʊmɑr/
> +91-9848167848
> 17.241582N 80.142635E
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
---------------------------------------+--------------------------------------
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


More information about the gdal-dev mailing list