Re: [GRASS-user] R: R: NULL values as output of i.atcorr

2022-01-27 Thread Moritz Lennert

On 27/01/22 14:54, ilaria.ferrand...@gmail.com wrote:

The output of r.info is the following

r.info map=immagine@mapset
  ++
  | Map:  immagine@mapsetDate: Tue Nov 30 12:51:12 2021|
  | Mapset:   mapset Login of Creator: [...]  |
  | Location: WGS84_UTM32  |
  | DataBase: C:\Users\[...]\grassdata  |
  | Title:immagine |
  | Timestamp: none|
  ||
  ||
  |   Type of Map:  raster   Number of Categories: 0   |
  |   Data Type:CELL   |
  |   Rows: 10980  |
  |   Columns:  10980  |
  |   Total Cells:  120560400  |
  |Projection: UTM (zone 32)   |
  |N:4900020S:4790220   Res:10 |
  |E: 609780W: 499980   Res:10 |
  |   Range of data:min = 0  max = 18876   |
  ||
  |   Data Description:|
  |generato da r.in.gdal   |
  ||
  |   Comments:|
  |r.in.gdal -e input="C:\Users\[...]\T32TNP_2020062\   |
  |2T100559_B04.jp2" output="immagine" memory=300 offset=0 num_digits=0|
  ||
  ++


This looks to me like the data is in digital number, not in radiance or 
reflectance. You first have to translate it to one or the other before 
feeding it to i.attcor.




Do you mean the sixth line of the file? From the i.atcorr help it is the "mean 
target elevation above sea level [km]", and it is correct that it is negative.
I'm now wondering if the problem can be having put "0" for visibility (aerosol 
model concentration, fifth line). What do you think about it?


I am speaking about the value '-0.293' in line 6 (and yes, my bad for 
not paying attention to the value 0 in the line before). The man page 
states: "If you have an estimate of aerosol optical depth, enter 0 for 
the visibility and in a following line enter the aerosol optical depth 
at 550nm (iaer means 'i' for input and 'aer' for aerosol), for example:" 
So, if you have 0 on line 5, so line 6 is AOD and not mean target 
elevation above sea level.


In this case line 7 is the "mean target elevation above sea level [-km]" 
with value -1000 :-).


Moritz




  


-Messaggio originale-
Da: Moritz Lennert 
Inviato: giovedì 27 gennaio 2022 14:08
A: ilaria.ferrand...@gmail.com; 'Maris Nartiss' 
Cc: 'GRASS user list' 
Oggetto: Re: R: [GRASS-user] NULL values as output of i.atcorr

On 27/01/22 14:01, ilaria.ferrand...@gmail.com wrote:

Dear Moritz,
thank you for your reply.
I tried with and without the -r flag and the results is the same.


I reformulate this part of the question then: what exactly is the content of 
immagine@mapset ? Please provide the output of

r.info map=immagine@mapset



Please find attached the parameters of the file 22giugno2020_b4.txt:

26
6 22 17.05 9.68728523 43.75514951
2
1
0
-0.293


Are you sure this should be a negative number ? This should be visibility in km 
IIRC.


-1000
182



Moritz


-Messaggio originale-
Da: Moritz Lennert 
Inviato: giovedì 27 gennaio 2022 13:22
A: Ilaria Ferrando ; Maris Nartiss

Cc: GRASS user list 
Oggetto: Re: [GRASS-user] NULL values as output of i.atcorr

On 26/01/22 19:50, Ilaria Ferrando wrote:

Dear Māris,
Thank you for your reply.
Yes, the image is inside the computational region.
Any other ideas?



1) Are you sure your input data is reflectance (-r flag used) ?
2) Could you provide us with the contents of the 22giugno2020_b4.txt file ?

Moritz



Il mer 26 gen 2022, 19:45 Maris Nartiss mailto:maris@gmail.com>> ha scritto:

  One thing to always check – does your computational region contain
  data you are analysing? Try to run `g.region rast=immagine` before
  running i.atcorr.

  Māris.

  trešd., 2022. g. 26. janv., plkst. 18:13 — lietotājs
  mailto:ilaria.ferrand...@gmail.com>>
  rakstīja:
   >
   > 

[GRASS-user] R: NULL values as output of i.atcorr

2022-01-27 Thread ilaria.ferrando87
Dear Moritz,
thank you for your reply.
I tried with and without the -r flag and the results is the same.
Please find attached the parameters of the file 22giugno2020_b4.txt:

26
6 22 17.05 9.68728523 43.75514951
2
1 
0
-0.293
-1000
182

Best regards,
ilaria

-Messaggio originale-
Da: Moritz Lennert  
Inviato: giovedì 27 gennaio 2022 13:22
A: Ilaria Ferrando ; Maris Nartiss 

Cc: GRASS user list 
Oggetto: Re: [GRASS-user] NULL values as output of i.atcorr

On 26/01/22 19:50, Ilaria Ferrando wrote:
> Dear Māris,
> Thank you for your reply.
> Yes, the image is inside the computational region.
> Any other ideas?


1) Are you sure your input data is reflectance (-r flag used) ?
2) Could you provide us with the contents of the 22giugno2020_b4.txt file ?

Moritz

> 
> Il mer 26 gen 2022, 19:45 Maris Nartiss  > ha scritto:
> 
> One thing to always check – does your computational region contain
> data you are analysing? Try to run `g.region rast=immagine` before
> running i.atcorr.
> 
> Māris.
> 
> trešd., 2022. g. 26. janv., plkst. 18:13 — lietotājs
> mailto:ilaria.ferrand...@gmail.com>>
> rakstīja:
>  >
>  > Dear all,
>  >
>  > I am having troubles in processing a Sentinel-2 image with i.atcorr.
>  >
>  > The command I use is the following:
>  >
>  > i.atcorr -r -input=immagine@mapset range=0,1
> parameters=C:\...\22giugno2020_b4.txt output=immagine_atcorr rescale=0,1
>  >
>  > and I obtain this output:
>  >
>  > wavelength less than 0.25 micron:
>  >
>  > let's take s(l)=s(0.25)
>  >
>  > Atmospheric correction...
>  >
>  > Atmospheric correction complete.
>  >
>  >
>  >
>  > The map I obtain is constituted by pixels with 6.669033e-34 values.
>  >
>  > Can anyone explain the meaning of the output and why I obtain a
> NULL value corrected map?
>  >
>  > Thank you for your support.
>  >
>  >
>  >
>  > ___
>  > grass-user mailing list
>  > grass-user@lists.osgeo.org 
>  > https://lists.osgeo.org/mailman/listinfo/grass-user
> 
> 
> 
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user


___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] NULL values as output of i.atcorr

2022-01-27 Thread Moritz Lennert

On 26/01/22 19:50, Ilaria Ferrando wrote:

Dear Māris,
Thank you for your reply.
Yes, the image is inside the computational region.
Any other ideas?



1) Are you sure your input data is reflectance (-r flag used) ?
2) Could you provide us with the contents of the 22giugno2020_b4.txt file ?

Moritz



Il mer 26 gen 2022, 19:45 Maris Nartiss > ha scritto:


One thing to always check – does your computational region contain
data you are analysing? Try to run `g.region rast=immagine` before
running i.atcorr.

Māris.

trešd., 2022. g. 26. janv., plkst. 18:13 — lietotājs
mailto:ilaria.ferrand...@gmail.com>>
rakstīja:
 >
 > Dear all,
 >
 > I am having troubles in processing a Sentinel-2 image with i.atcorr.
 >
 > The command I use is the following:
 >
 > i.atcorr -r -input=immagine@mapset range=0,1
parameters=C:\...\22giugno2020_b4.txt output=immagine_atcorr rescale=0,1
 >
 > and I obtain this output:
 >
 > wavelength less than 0.25 micron:
 >
 > let's take s(l)=s(0.25)
 >
 > Atmospheric correction...
 >
 > Atmospheric correction complete.
 >
 >
 >
 > The map I obtain is constituted by pixels with 6.669033e-34 values.
 >
 > Can anyone explain the meaning of the output and why I obtain a
NULL value corrected map?
 >
 > Thank you for your support.
 >
 >
 >
 > ___
 > grass-user mailing list
 > grass-user@lists.osgeo.org 
 > https://lists.osgeo.org/mailman/listinfo/grass-user



___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] R: NULL values as output of i.atcorr

2022-01-27 Thread Moritz Lennert

On 27/01/22 14:01, ilaria.ferrand...@gmail.com wrote:

Dear Moritz,
thank you for your reply.
I tried with and without the -r flag and the results is the same.


I reformulate this part of the question then: what exactly is the 
content of immagine@mapset ? Please provide the output of


r.info map=immagine@mapset


Please find attached the parameters of the file 22giugno2020_b4.txt:

26
6 22 17.05 9.68728523 43.75514951
2
1
0
-0.293


Are you sure this should be a negative number ? This should be 
visibility in km IIRC.



-1000
182



Moritz


-Messaggio originale-
Da: Moritz Lennert 
Inviato: giovedì 27 gennaio 2022 13:22
A: Ilaria Ferrando ; Maris Nartiss 

Cc: GRASS user list 
Oggetto: Re: [GRASS-user] NULL values as output of i.atcorr

On 26/01/22 19:50, Ilaria Ferrando wrote:

Dear Māris,
Thank you for your reply.
Yes, the image is inside the computational region.
Any other ideas?



1) Are you sure your input data is reflectance (-r flag used) ?
2) Could you provide us with the contents of the 22giugno2020_b4.txt file ?

Moritz



Il mer 26 gen 2022, 19:45 Maris Nartiss mailto:maris@gmail.com>> ha scritto:

 One thing to always check – does your computational region contain
 data you are analysing? Try to run `g.region rast=immagine` before
 running i.atcorr.

 Māris.

 trešd., 2022. g. 26. janv., plkst. 18:13 — lietotājs
 mailto:ilaria.ferrand...@gmail.com>>
 rakstīja:
  >
  > Dear all,
  >
  > I am having troubles in processing a Sentinel-2 image with i.atcorr.
  >
  > The command I use is the following:
  >
  > i.atcorr -r -input=immagine@mapset range=0,1
 parameters=C:\...\22giugno2020_b4.txt output=immagine_atcorr rescale=0,1
  >
  > and I obtain this output:
  >
  > wavelength less than 0.25 micron:
  >
  > let's take s(l)=s(0.25)
  >
  > Atmospheric correction...
  >
  > Atmospheric correction complete.
  >
  >
  >
  > The map I obtain is constituted by pixels with 6.669033e-34 values.
  >
  > Can anyone explain the meaning of the output and why I obtain a
 NULL value corrected map?
  >
  > Thank you for your support.
  >
  >
  >
  > ___
  > grass-user mailing list
  > grass-user@lists.osgeo.org 
  > https://lists.osgeo.org/mailman/listinfo/grass-user
 


___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user





___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] R: R: NULL values as output of i.atcorr

2022-01-27 Thread ilaria.ferrando87
The output of r.info is the following

r.info map=immagine@mapset  
 ++
 | Map:  immagine@mapsetDate: Tue Nov 30 12:51:12 2021|
 | Mapset:   mapset Login of Creator: [...]  |
 | Location: WGS84_UTM32  |
 | DataBase: C:\Users\[...]\grassdata  |
 | Title:immagine |
 | Timestamp: none|
 ||
 ||
 |   Type of Map:  raster   Number of Categories: 0   |
 |   Data Type:CELL   |
 |   Rows: 10980  |
 |   Columns:  10980  |
 |   Total Cells:  120560400  |
 |Projection: UTM (zone 32)   |
 |N:4900020S:4790220   Res:10 |
 |E: 609780W: 499980   Res:10 |
 |   Range of data:min = 0  max = 18876   |
 ||
 |   Data Description:|
 |generato da r.in.gdal   |
 ||
 |   Comments:|
 |r.in.gdal -e input="C:\Users\[...]\T32TNP_2020062\   |
 |2T100559_B04.jp2" output="immagine" memory=300 offset=0 num_digits=0|
 ||
 ++

Do you mean the sixth line of the file? From the i.atcorr help it is the "mean 
target elevation above sea level [km]", and it is correct that it is negative.
I'm now wondering if the problem can be having put "0" for visibility (aerosol 
model concentration, fifth line). What do you think about it?
 

-Messaggio originale-
Da: Moritz Lennert  
Inviato: giovedì 27 gennaio 2022 14:08
A: ilaria.ferrand...@gmail.com; 'Maris Nartiss' 
Cc: 'GRASS user list' 
Oggetto: Re: R: [GRASS-user] NULL values as output of i.atcorr

On 27/01/22 14:01, ilaria.ferrand...@gmail.com wrote:
> Dear Moritz,
> thank you for your reply.
> I tried with and without the -r flag and the results is the same.

I reformulate this part of the question then: what exactly is the content of 
immagine@mapset ? Please provide the output of

r.info map=immagine@mapset


> Please find attached the parameters of the file 22giugno2020_b4.txt:
> 
> 26
> 6 22 17.05 9.68728523 43.75514951
> 2
> 1
> 0
> -0.293

Are you sure this should be a negative number ? This should be visibility in km 
IIRC.

> -1000
> 182


Moritz
> 
> -Messaggio originale-
> Da: Moritz Lennert 
> Inviato: giovedì 27 gennaio 2022 13:22
> A: Ilaria Ferrando ; Maris Nartiss 
> 
> Cc: GRASS user list 
> Oggetto: Re: [GRASS-user] NULL values as output of i.atcorr
> 
> On 26/01/22 19:50, Ilaria Ferrando wrote:
>> Dear Māris,
>> Thank you for your reply.
>> Yes, the image is inside the computational region.
>> Any other ideas?
> 
> 
> 1) Are you sure your input data is reflectance (-r flag used) ?
> 2) Could you provide us with the contents of the 22giugno2020_b4.txt file ?
> 
> Moritz
> 
>>
>> Il mer 26 gen 2022, 19:45 Maris Nartiss > > ha scritto:
>>
>>  One thing to always check – does your computational region contain
>>  data you are analysing? Try to run `g.region rast=immagine` before
>>  running i.atcorr.
>>
>>  Māris.
>>
>>  trešd., 2022. g. 26. janv., plkst. 18:13 — lietotājs
>>  mailto:ilaria.ferrand...@gmail.com>>
>>  rakstīja:
>>   >
>>   > Dear all,
>>   >
>>   > I am having troubles in processing a Sentinel-2 image with i.atcorr.
>>   >
>>   > The command I use is the following:
>>   >
>>   > i.atcorr -r -input=immagine@mapset range=0,1
>>  parameters=C:\...\22giugno2020_b4.txt output=immagine_atcorr rescale=0,1
>>   >
>>   > and I obtain this output:
>>   >
>>   > wavelength less than 0.25 micron:
>>   >
>>   > let's take s(l)=s(0.25)
>>   >
>>   > Atmospheric correction...
>>   >
>>   > Atmospheric correction complete.
>>   >
>>   >
>>   >
>>   > The map I obtain is constituted by pixels with 6.669033e-34 values.
>>   >