Hi,
"brew install gdal" does work. I did it before, the problem is that I
forget to add the PATH of gdal and the default PATH is to Anaconda.
Now, it works :D
Thank you.
Andreas Oxenstierna 于2022年6月28日周二
15:28写道:
> Hi
>
> My gdal installation with brew, https://formulae.brew.sh/formula/gdal,
Hi
My gdal installation with brew, https://formulae.brew.sh/formula/gdal, do work
on macOS:
which gdal_calc.py
/usr/local/bin/gdal_calc.py
ls -l /usr/local/bin/gdal_calc*
/usr/local/bin/gdal_calc.py -> ../Cellar/gdal/3.3.2_3/bin/gdal_calc.py
Do you have to use Anaconda?
Best Regards
Andreas
Hi,
I meet a problem when I use gdal_calc.py on mac:
(base) lichao@riushios-MacBook-Pro ~ % gdal_calc.py
Traceback (most recent call last):
File
"/Users/lichao/opt/anaconda3/lib/python3.9/site-packages/osgeo/__init__.py",
line 29, in swig_import_helper
return importlib.import_module(mnam
On jeudi 25 juin 2020 00:35:24 CEST Idan Miara wrote:
> Hi all,
>
> I've added some additions/improvements to gdal_calc.py
> https://github.com/talos-gis/gdalos/blob/master/src/gdalos/calc/gdal_calc.py
>
>
> 1. Alphalist now includes lower case letters.
> 2. added hideNoData option to ignore noD
Hi all,
I've added some additions/improvements to gdal_calc.py
https://github.com/talos-gis/gdalos/blob/master/src/gdalos/calc/gdal_calc.py
1. Alphalist now includes lower case letters.
2. added hideNoData option to ignore noDataValues
3. accept gdal datasets and pathlib.Path objects as alternat
Dear devs,
Is it possible to use gdal_calc.py to multiply each band of a
multispectral raster by a factor?
I've tried:
gdal_calc.py -A ReflPCA.tif --allBands=A --outfile=result.tif
--calc="A*[1,2,3,4,5,6]" --overwrite
it works fine with 1 single value,
gdal_calc.py -A ReflPCA.tif --allBands=A --o
Thank you Andrew! That did it.
Cheers,
Sam
On 7/14/16, 11:12 PM, "Andrew C Aitchison" wrote:
>On Fri, 15 Jul 2016, Sam Wilson wrote:
>
>> Hi,
>>
>> I¹m attempting to linearly interpolate two geotiff files using
>>gdal_calc.py. The geotiff files are 3 hours apart, so for example hour
>>0 and
Il 15/07/2016 02:13, Sam Wilson ha scritto:
Hi,
I’m attempting to linearly interpolate two geotiff files using gdal_calc.py.
The geotiff files are 3 hours apart, so for example hour 0 and hour 3. I’d
like to end up with hourly data, so I need hours 1 and 2.
Below are the commands I’m using:
On Fri, 15 Jul 2016, Sam Wilson wrote:
Hi,
I’m attempting to linearly interpolate two geotiff files using gdal_calc.py.
The geotiff files are 3 hours apart, so for example hour 0 and hour 3. I’d
like to end up with hourly data, so I need hours 1 and 2.
Below are the commands I’m using:
Ho
Hi,
I’m attempting to linearly interpolate two geotiff files using gdal_calc.py.
The geotiff files are 3 hours apart, so for example hour 0 and hour 3. I’d
like to end up with hourly data, so I need hours 1 and 2.
Below are the commands I’m using:
gdal_calc.py -A hour0.tif -B hour3.tif —outf
Ciao Antonio.
Now everything looks perfect.
Thank you very much
Gabriele
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/gdal-calc-py-IF-ELSE-Condition-tp5274166p5274365.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
__
Il 30/06/2016 15:47, Gabriele N. ha scritto:
Ciao Antonio.
@arctan I think is ok.
It works but there are many negative values...I must investigate :)
Meanwhile thanks
Gabriele,
the previous expression has some errors yet: two parenthesis and a
conversion are missing. This should be the r
Ciao Antonio.
@arctan I think is ok.
It works but there are many negative values...I must investigate :)
Meanwhile thanks
Gabrlele
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/gdal-calc-py-IF-ELSE-Condition-tp5274166p5274178.html
Sent from the GDAL - Dev mailing
Il 30/06/2016 15:25, Gabriele N. ha scritto:
Hi all,
my goal is to apply the following condition:
if map A > 0 then MAP C = arctan((A/B)+180 ELSE MAP C = 90-arctan(A/B)
I tried in several ways, including this:
gdal_calc.py -A u-wind$DATE.tif -B v-wind$DATE.tif
--outfile=dir_wind_$DATE.tif -
Hi all,
my goal is to apply the following condition:
if map A > 0 then MAP C = arctan((A/B)+180 ELSE MAP C = 90-arctan(A/B)
I tried in several ways, including this:
gdal_calc.py -A u-wind$DATE.tif -B v-wind$DATE.tif
--outfile=dir_wind_$DATE.tif --calc="arctan(A/B)+180*(A>0)
w_dir=90-arctan(A/
I have no experience with gdal_calc.pv nor do I know about its internals
anything beside it being implemented with numpy. So I comment this only
from a general point of view.
05.01.2016, 09:00, Avyav Kumar kirjoitti:
This is a rather interesting error, which is listed here
(https://trac.osgeo.
This is a rather interesting error, which is listed here (
https://trac.osgeo.org/gdal/ticket/5478). While getting the intermediate
calculations of the raster band for A and B, I noticed the following -
For --calc="A*20+B", the raster formed as the result of the addition of
A*20 and B is not equa
On 17 Jul 2015, at 12:09,
wrote:
> Have a look at this gis.stackexchange question:
> http://gis.stackexchange.com/questions/149006/does-gdal-calc-only-support-26-input-raster-files-at-a-time
>
> So, what users can do if they have more than 26 input files?
(in case someone finds this via Goog
On 17 July 2015 at 11:58, Even Rouault wrote:
> In your above example, only the first band of var_stacked.vrt will be used. So
> basically you're computing the average of all lines of a block (possibly a
> single line depending on the dataset), and this average line will be written
> in the first
On Friday 17 July 2015 11:29:11 Mike Toews wrote:
> On 17 July 2015 at 11:13, Even Rouault wrote:
> > But when you have more than 26 input files, it is dubious that you really
> > want to individually identify them with a particular letter/name. As in
> > one of the examples, you likely just want
On 17 July 2015 at 11:13, Even Rouault wrote:
> But when you have more than 26 input files, it is dubious that you really want
> to individually identify them with a particular letter/name. As in one of the
> examples, you likely just want to apply a global operation on them, like sum,
> mean, ...
On Thursday 16 July 2015 20:38:44 Jukka Rahkonen wrote:
> Hi,
>
> Have a look at this gis.stackexchange question:
> http://gis.stackexchange.com/questions/149006/does-gdal-calc-only-support-26
> -input-raster-files-at-a-time
>
> So, what users can do if they have more than 26 input files?
Hi Ju
Hi,
Have a look at this gis.stackexchange question:
http://gis.stackexchange.com/questions/149006/does-gdal-calc-only-support-26-input-raster-files-at-a-time
So, what users can do if they have more than 26 input files?
-Jukka Rahkonen-
___
gdal-dev ma
On 6/24/2015 8:59 AM, Even Rouault wrote:
Le mercredi 24 juin 2015 03:49:15, Stephen Woodbridge a écrit :
Hi All,
I have a geotiff file like:
[] ~/work/oceandata/test$ gdalinfo A2015173174000.L0_LAC.L2_OC.tif -noct
Driver: GTiff/GeoTIFF
Files: A2015173174000.L0_LAC.L2_OC.tif
A20151731
Le mercredi 24 juin 2015 03:49:15, Stephen Woodbridge a écrit :
> Hi All,
>
> I have a geotiff file like:
>
> [] ~/work/oceandata/test$ gdalinfo A2015173174000.L0_LAC.L2_OC.tif -noct
> Driver: GTiff/GeoTIFF
> Files: A2015173174000.L0_LAC.L2_OC.tif
> A2015173174000.L0_LAC.L2_OC.tif.aux.xml
Hi All,
I have a geotiff file like:
[] ~/work/oceandata/test$ gdalinfo A2015173174000.L0_LAC.L2_OC.tif -noct
Driver: GTiff/GeoTIFF
Files: A2015173174000.L0_LAC.L2_OC.tif
A2015173174000.L0_LAC.L2_OC.tif.aux.xml
Size is 2433, 1727
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
Simen,
In case you can not find a solution with gdal_calc.py, you could try to use
pkfilter from pktools (http://pktools.nongnu.org). Once installed
(currently under Linux only), you can produce your median raster as follows:
pkfilter -i infile -o outfile -dz 1 -f median
The option -dz 1 indicat
Hi Simen,
Try this:
gdal_calc.py -A rgb.tif --outfile ouput.tif --calc "median(A, axis=0)"
The "axis=0" parameter is to perform a median calculation along the
first dimension, which is the band dimension. Lean more here:
http://docs.scipy.org/doc/numpy/reference/generated/numpy.median.html
-Mik
re results.
-marius
Date: Tue, 25 Nov 2014 17:56:46 +0900
From: simlan...@gmail.com
To: chris.yes...@ioz.ac.uk
CC: gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] gdal_calc.py: produce median raster
Dear Dr Chris Yesson
Thanks for your quick response.
I got the following error:
ValueError: The truth v
gt;>>
>>> I hope someone can help me.
>>>
>>> On Tue, Nov 25, 2014 at 12:09 PM, Marius Jigmond <
>>> mariusjigm...@hotmail.com> wrote:
>>>
>>>> Does the following work:
>>>>
>>>> gdal_calc.py -A infile --al
t; wrote:
>>
>>> Does the following work:
>>>
>>> gdal_calc.py -A infile --allBands=A --outfile=outfile --calc="median(A)"
>>>
>>>
>>> --
>>> Date: Mon, 24 Nov 2014 19:14:06 +0900
>>> From: simlan...@g
t;>
>> gdal_calc.py -A infile --allBands=A --outfile=outfile --calc="median(A)"
>>
>>
>> --
>> Date: Mon, 24 Nov 2014 19:14:06 +0900
>> From: simlan...@gmail.com
>> To: gdal-dev@lists.osgeo.org
>> Subject: [gda
, Marius Jigmond
wrote:
> Does the following work:
>
> gdal_calc.py -A infile --allBands=A --outfile=outfile --calc="median(A)"
>
>
> --
> Date: Mon, 24 Nov 2014 19:14:06 +0900
> From: simlan...@gmail.com
> To: gdal-dev@lists.osgeo.o
Does the following work:
gdal_calc.py -A infile --allBands=A --outfile=outfile --calc="median(A)"
Date: Mon, 24 Nov 2014 19:14:06 +0900
From: simlan...@gmail.com
To: gdal-dev@lists.osgeo.org
Subject: [gdal-dev] gdal_calc.py: produce median raster
I have one GeoTiff file with 3 bands.
I have one GeoTiff file with 3 bands. I want to produce a raster file
computing pixel wise median value for the three raster bands. How can I do
that?
I tried as follows:
gdal_calc.py -A infile --allBands --outfile outfile --calc median(A)
But could not get any out file.
Andreas,
>it turns out that all pixel values with 255 are now nodata values ;-( Is
>there an option so that my 255 values are not turned into nodata? I
>tested with the --NoDataValue option (e.g. 99 - which I don't use in the
>image), but it seems to be ignored. For me it is important that blac
Hi Simen,
<> means not - same as !=
Andreas
Am 2014-11-19 15:09, schrieb Simen Langseth:
I saw the symbol <> first time in gdal calc what is meaning of it?
Thanks
On Wed, Nov 19, 2014 at 10:21 PM, Even Rouault
wrote:
Le mercredi 19 novembre 2014 14:16:05, Andreas Neumann a écrit :
Hi Eve
I saw the symbol <> first time in gdal calc what is meaning of it?
Thanks
On Wed, Nov 19, 2014 at 10:21 PM, Even Rouault
wrote:
> Le mercredi 19 novembre 2014 14:16:05, Andreas Neumann a écrit :
> > Hi Even,
> >
> > Thank you for trying to help. Unfortunately, the --overwrite option does
> > no
oh - sorry. This helps.
Correct syntax is:
gdal_calc.py -A test.tif --overwrite --NoDataValue=99
--outfile=testcalc.tif --calc="(A==249)*255+(A<>249)*A"
Thanks a lot!
Andreas
Am 2014-11-19 14:21, schrieb Even Rouault:
Le mercredi 19 novembre 2014 14:16:05, Andreas Neumann a écrit :
Hi Even
Le mercredi 19 novembre 2014 14:16:05, Andreas Neumann a écrit :
> Hi Even,
>
> Thank you for trying to help. Unfortunately, the --overwrite option does
> not help.
>
> I have a very small test file at http://webgis.uster.ch/temp/test.tif
>
> I used the following options:
>
> gdal_calc.py -A te
Le mercredi 19 novembre 2014 13:49:48, Andreas Neumann a écrit :
> Hi,
>
> I have an issue with gdal_calc.py and nodata values.
>
> My input data contains a lot of white pixels. After running gdal_calc.py
> with the following parameters
>
> gdal_calc.py -A test.tif --outfile=testcalc.tif
> --cal
Hi,
I have an issue with gdal_calc.py and nodata values.
My input data contains a lot of white pixels. After running gdal_calc.py
with the following parameters
gdal_calc.py -A test.tif --outfile=testcalc.tif
--calc="(A==249)*255+(A<>249)*A"
it turns out that all pixel values with 255 are n
I am posting a response I got from Graeme B. Bell:
To get "1 if zero, or A" you do:
--calc="(A==0)*1 + (A>0)*A"
Don't make 1 your nodata value if it's actually a data value here
G
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/gdal-calc-py-else-not-0-tp5162590p5162914
I found a workaround for my problem:
First get all zeros in the original file with:
gdal_calc.py -A original_file.tif --outfile=zeros.tif --calc=A==0
--> results in a file where ther former zero cells have a value of 1 and all
other cells 0
Then combine the temporary file with the original file:
I am trying to reassign 0 values in my raster to 1 and leave all the other
values as they are.
gdal_calc.py -A infile.tif --outfile=outfile.tif --calc="A* logical_or(A <
0, A > 0)" --overwrite --NoDataValue=1
The problem I am encountering is, that I cannot reassign the zeros. In my
calculation I
Patrick,
Can you send me the sample data?
--
Best regards,
Chaitanya Kumar CH
On 27-Jun-2014 9:56 am, "Patrick Sunter" wrote:
> No comments on the below anyone?
>
> It does seem like a genuine bug that gdal_calc.py can produce output with
> statistics not up to date?
>
> Should I create an issue
No comments on the below anyone?
It does seem like a genuine bug that gdal_calc.py can produce output with
statistics not up to date?
Should I create an issue in the issue tracker?
-- Patrick.
On Thu, Jun 19, 2014 at 2:45 PM, Patrick Sunter
wrote:
> Hi there,
>
> I've been using gdal_calc.py
Hi,
This may be of use to anyone who regularly uses gdal_calc.py.
http://trac.osgeo.org/gdal/ticket/5130
- easy patch
- you can get a performance boost of up to 33% depending on how you use
gdal_calc or the type of data you have
- you can handle nodata processing with more flexibility if you
Dear All,
I'm trying to use gdal_calc.py to solve the following problem:
I have a time series of NDVI data as 8bit tiff files with different
BadData pixels (>50 and <250; this is the same for all layers) from
which I would like to calculate the mean.
(i.e. the same pixel might not be valid in al
e:
Hi Chris,
That sounds good.
Is that by any chance based on this idea here:
[http://trac.osgeo.org/gdal/wiki/SummerOfCode]?
Regards,
Ivan
---Original Message---
From: Chris Yesson
To: gdal-dev@lists.osgeo.org
Subject: [gdal-dev] gdal_calc.py
Sent: Sep 17 '10 0
-
From: Chris Yesson
To: gdal-dev@lists.osgeo.org
Subject: [gdal-dev] gdal_calc.py
Sent: Sep 17 '10 09:29
Hi all,
I have been playing around with a python/gdalnumeric-based raster
calculator for a while now
(http://static.zsl.org/files/gdal-calc-1218.py).
I thought i
---Original Message---
From: Chris Yesson
To: gdal-dev@lists.osgeo.org
Subject: [gdal-dev] gdal_calc.py
Sent: Sep 17 '10 09:29
Hi all,
I have been playing around with a python/gdalnumeric-based raster
calculator for a while now (http://static.zsl.org/files/gdal-calc-1218.p
On Sep 17, 2010, at 9:29 AM, Chris Yesson wrote:
> Hi all,
>
> I have been playing around with a python/gdalnumeric-based raster calculator
> for a while now (http://static.zsl.org/files/gdal-calc-1218.py).
> I thought it was time to try to share this properly via GDAL.
>
> Could this go on
Hi Chris,
That sounds good.
Is that by any chance based on this idea here:
[http://trac.osgeo.org/gdal/wiki/SummerOfCode]?
Regards,
Ivan
> ---Original Message---
> From: Chris Yesson
> To: gdal-dev@lists.osgeo.org
> Subject: [gdal-dev] gdal_calc.py
> Sent: S
Hi all,
I have been playing around with a python/gdalnumeric-based raster
calculator for a while now
(http://static.zsl.org/files/gdal-calc-1218.py).
I thought it was time to try to share this properly via GDAL.
Could this go on the sample python scripts directory?
Could I get advice on
55 matches
Mail list logo