Hi GDAL Developers,
I have one GeoTIFF file with 2 bands. The data type is Byte. I want to
calculate (Band2-Band1)/(Band2+Band1).
But the following command provided a dark image:
gdal_calc.py -A infile --A_band 1 -B infile, --B_band 0 --outfile outfile
--calc (A-B)/(A+B)
Does gdal_calc.py not
I am not sure, but you can do the following to make sure:
cp infile infile2
gdal_calc.py -A infile --A_band 1 -B infile2 --B_band 0 --outfile outfile
--calc (A-B)/(A+B)
Also, perhaps the extra comma in your command might be to blame -B infile,
Etienne
On Tue, Jul 29, 2014 at 3:46 AM, Cleo
Thanks for your response.
I tried the followings:
gcalc = 'C:\\Users\\cleo\\Documents\\gdalpys\\gdal_calc.py'
##I produced second file (b)as the copy of first(a)
a = 'D:\\a.tif'
b = 'D:\\b.tif'
outfile = 'D:\\result.tif'
expr = '(A-B)/(A+B)'
On 07/29/2014 04:04 PM, Cleo Drakos wrote:
Thanks for your response.
I tried the followings:
gcalc = 'C:\\Users\\cleo\\Documents\\gdalpys\\gdal_calc.py'
##I produced second file (b)as the copy of first(a)
a = 'D:\\a.tif'
b = 'D:\\b.tif'
outfile = 'D:\\result.tif'
expr = '(A-B)/(A+B)'
Cleo Drakos cleo21drakos at gmail.com writes:
Thanks for your response.I tried the followings:
gcalc = 'C:\\Users\\cleo\\Documents\\gdalpys\\gdal_calc.py'
##I produced second file (b)as the copy of first(a)
a = 'D:\\a.tif'
b = 'D:\\b.tif'
outfile = 'D:\\result.tif'
expr =
yes, I checked the histogram and the out image is completely black.
cleo
On Wed, Jul 30, 2014 at 1:53 AM, Jukka Rahkonen jukka.rahko...@mmmtike.fi
wrote:
Cleo Drakos cleo21drakos at gmail.com writes:
Thanks for your response.I tried the followings:
gcalc =
Even if I converted the input file into Float 32 at first, the resulted
image is still totally black.
cleo
On Tue, Jul 29, 2014 at 11:20 PM, Vincent Schut sc...@sarvision.nl wrote:
On 07/29/2014 04:04 PM, Cleo Drakos wrote:
Thanks for your response.
I tried the followings:
gcalc =
be:
--calc (A.astype(int)-B A.astype(int)+B)
Cheers
Jeremy
From: gdal-dev-boun...@lists.osgeo.org
[mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Cleo Drakos
Sent: Wednesday, 30 July 2014 2:06 p.m.
To: Vincent Schut
Cc: gdal-dev
Subject: Re: [gdal-dev] Does gdal_calc.py not calculate arithmetic
*Subject:* Re: [gdal-dev] Does gdal_calc.py not calculate arithmetic with
in the same file?
Even if I converted the input file into Float 32 at first, the resulted
image is still totally black.
cleo
On Tue, Jul 29, 2014 at 11:20 PM, Vincent Schut sc...@sarvision.nl
wrote:
On 07/29
-dev-boun...@lists.osgeo.org [mailto:
gdal-dev-boun...@lists.osgeo.org] *On Behalf Of *Cleo Drakos
*Sent:* Wednesday, 30 July 2014 2:06 p.m.
*To:* Vincent Schut
*Cc:* gdal-dev
*Subject:* Re: [gdal-dev] Does gdal_calc.py not calculate arithmetic with
in the same file?
Even if I converted
10 matches
Mail list logo