[GRASS-user] i.atcorr negative DEM

Hi all,
I'm once again in trouble with i.atcorr in GRASS6.5.svn.
I notice that my output reflectance images are strange: there are some areas
that are really bright and other that are really dark. Both seem to match
with my DEM raster.
Could there be problems with negative values in DEM?? I'm in a coastal area
and there are some real altitude negative values.
If you need, this is my r.info of the DEM.

http://osgeo-org.1803224.n2.nabble.com/file/n6374760/rinfodemsrtm.txt
rinfodemsrtm.txt

Hope that someone could help me..

Thank you!
Elena

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/i-atcorr-negative-DEM-tp6374760p6374760.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Tue, May 17, 2011 at 9:22 PM, Elena Mezzini <elena.mezzini@gmail.com> wrote:

Hi all,
I'm once again in trouble with i.atcorr in GRASS6.5.svn.
I notice that my output reflectance images are strange: there are some areas
that are really bright and other that are really dark. Both seem to match
with my DEM raster.
Could there be problems with negative values in DEM?? I'm in a coastal area
and there are some real altitude negative values.

i.atcorr (the 6S code it is using to be exact) should treat negative
elevation values as elevation = 0. It is debatable if this is correct,
but in theory i.atcorr should behave accordingly. Actually, I am not
sure about it's behaviour for negative elevation values...

You could set all negative elevation values to zero, run i.atcorr
again and compare the results to the i.atcorr results using the
original DEM. If there are any differences that do not make sense,
please fill in a bug ticket.

Markus M

On Tue, May 17, 2011 at 9:22 PM, Elena Mezzini
&lt;elena.mezzini@gmail.com&gt; wrote:

Hi all,
I'm once again in trouble with i.atcorr in GRASS6.5.svn.
I notice that my output reflectance images are strange: there are some
areas
that are really bright and other that are really dark. Both seem to match
with my DEM raster.
Could there be problems with negative values in DEM?? I'm in a coastal
area
and there are some real altitude negative values.

i.atcorr (the 6S code it is using to be exact) should treat negative
elevation values as elevation = 0. It is debatable if this is correct,
but in theory i.atcorr should behave accordingly. Actually, I am not
sure about it's behaviour for negative elevation values...

You could set all negative elevation values to zero,

Ok, how can I do it?

run i.atcorr again and compare the results to the i.atcorr results using the
original DEM. If there are any differences that do not make sense,
please fill in a bug ticket.

Markus M

Thank you!

Elena

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/i-atcorr-negative-DEM-tp6374760p6374961.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Tue, May 17, 2011 at 10:08 PM, Elena Mezzini <elena.mezzini@gmail.com> wrote:

On Tue, May 17, 2011 at 9:22 PM, Elena Mezzini
&lt;elena.mezzini@gmail.com&gt; wrote:

Hi all,
I'm once again in trouble with i.atcorr in GRASS6.5.svn.
I notice that my output reflectance images are strange: there are some
areas
that are really bright and other that are really dark. Both seem to match
with my DEM raster.
Could there be problems with negative values in DEM?? I'm in a coastal
area
and there are some real altitude negative values.

i.atcorr (the 6S code it is using to be exact) should treat negative
elevation values as elevation = 0. It is debatable if this is correct,
but in theory i.atcorr should behave accordingly. Actually, I am not
sure about it's behaviour for negative elevation values...

You could set all negative elevation values to zero,

Ok, how can I do it?

replace my_elevation with the name of your elevation map:

g.region rast=my_elevation
r.mapcalc "elevation_positive = if(my_elevation < 0, 0, <my_elevation>)"

On Tue, May 17, 2011 at 10:08 PM, Elena Mezzini
&lt;elena.mezzini@gmail.com&gt; wrote:

On Tue, May 17, 2011 at 9:22 PM, Elena Mezzini
&lt;elena.mezzini@gmail.com&gt; wrote:

Hi all,
I'm once again in trouble with i.atcorr in GRASS6.5.svn.
I notice that my output reflectance images are strange: there are some
areas
that are really bright and other that are really dark. Both seem to match
with my DEM raster.
Could there be problems with negative values in DEM?? I'm in a coastal
area
and there are some real altitude negative values.

i.atcorr (the 6S code it is using to be exact) should treat negative
elevation values as elevation = 0. It is debatable if this is correct,
but in theory i.atcorr should behave accordingly. Actually, I am not
sure about it's behaviour for negative elevation values...

You could set all negative elevation values to zero,

Ok, how can I do it?

replace my_elevation with the name of your elevation map:

g.region rast=my_elevation
r.mapcalc "elevation_positive = if(my_elevation < 0, 0, <my_elevation>)"

g.region rast=dem_sross_srtm
r.mapcalc "dem_sross_srtm_pos = if(dem_sross_srtm < 0, 0, <dem_sross_srtm>)"

Syntax error!
As you know I'm not a programmer... where is the error?

Thank you once again

Elena

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/i-atcorr-negative-DEM-tp6374760p6375046.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Tue, May 17, 2011 at 10:34 PM, Elena Mezzini <elena.mezzini@gmail.com> wrote:

On Tue, May 17, 2011 at 10:08 PM, Elena Mezzini
&lt;elena.mezzini@gmail.com&gt; wrote:

On Tue, May 17, 2011 at 9:22 PM, Elena Mezzini
&lt;elena.mezzini@gmail.com&gt; wrote:

Hi all,
I'm once again in trouble with i.atcorr in GRASS6.5.svn.
I notice that my output reflectance images are strange: there are some
areas
that are really bright and other that are really dark. Both seem to match
with my DEM raster.
Could there be problems with negative values in DEM?? I'm in a coastal
area
and there are some real altitude negative values.

i.atcorr (the 6S code it is using to be exact) should treat negative
elevation values as elevation = 0. It is debatable if this is correct,
but in theory i.atcorr should behave accordingly. Actually, I am not
sure about it's behaviour for negative elevation values...

You could set all negative elevation values to zero,

Ok, how can I do it?

replace my_elevation with the name of your elevation map:

g.region rast=my_elevation
r.mapcalc "elevation_positive = if(my_elevation < 0, 0, <my_elevation>)"

g.region rast=dem_sross_srtm
r.mapcalc "dem_sross_srtm_pos = if(dem_sross_srtm < 0, 0, <dem_sross_srtm>)"

Syntax error!
As you know I'm not a programmer... where is the error?

remove the <> (actually I forgot to remove them in the template...):
r.mapcalc "dem_sross_srtm_pos = if(dem_sross_srtm < 0, 0, dem_sross_srtm)"

Markus Metz-2 wrote:

On Tue, May 17, 2011 at 10:08 PM, Elena Mezzini
&lt;elena.mezzini@gmail.com&gt; wrote:

On Tue, May 17, 2011 at 9:22 PM, Elena Mezzini
&lt;elena.mezzini@gmail.com&gt; wrote:

Hi all,
I'm once again in trouble with i.atcorr in GRASS6.5.svn.
I notice that my output reflectance images are strange: there are some
areas
that are really bright and other that are really dark. Both seem to
match
with my DEM raster.
Could there be problems with negative values in DEM?? I'm in a coastal
area
and there are some real altitude negative values.

i.atcorr (the 6S code it is using to be exact) should treat negative
elevation values as elevation = 0. It is debatable if this is correct,
but in theory i.atcorr should behave accordingly. Actually, I am not
sure about it's behaviour for negative elevation values...

You could set all negative elevation values to zero,

Ok, how can I do it?

replace my_elevation with the name of your elevation map:

g.region rast=my_elevation
r.mapcalc "elevation_positive = if(my_elevation < 0, 0, <my_elevation>)"

g.region rast=dem_sross_srtm
r.mapcalc "dem_sross_srtm_pos = if(dem_sross_srtm < 0, 0,
<dem_sross_srtm>)"

Syntax error!
As you know I'm not a programmer... where is the error?

Thank you once again

Elena

Found:

g.region rast=dem_sross_srtm
r.mapcalc "dem_sross_srtm_pos = if(dem_sross_srtm < 0, 0, dem_sross_srtm)"

Sorry!

Elena

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/i-atcorr-negative-DEM-tp6374760p6375058.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Elena Mezzini wrote:

Markus Metz-2 wrote:

On Tue, May 17, 2011 at 10:08 PM, Elena Mezzini
&lt;elena.mezzini@gmail.com&gt; wrote:

On Tue, May 17, 2011 at 9:22 PM, Elena Mezzini
&lt;elena.mezzini@gmail.com&gt; wrote:

Hi all,
I'm once again in trouble with i.atcorr in GRASS6.5.svn.
I notice that my output reflectance images are strange: there are some
areas
that are really bright and other that are really dark. Both seem to
match
with my DEM raster.
Could there be problems with negative values in DEM?? I'm in a coastal
area
and there are some real altitude negative values.

i.atcorr (the 6S code it is using to be exact) should treat negative
elevation values as elevation = 0. It is debatable if this is correct,
but in theory i.atcorr should behave accordingly. Actually, I am not
sure about it's behaviour for negative elevation values...

You could set all negative elevation values to zero,

Ok, how can I do it?

replace my_elevation with the name of your elevation map:

g.region rast=my_elevation
r.mapcalc "elevation_positive = if(my_elevation < 0, 0, <my_elevation>)"

g.region rast=dem_sross_srtm
r.mapcalc "dem_sross_srtm_pos = if(dem_sross_srtm < 0, 0,
<dem_sross_srtm>)"

Syntax error!
As you know I'm not a programmer... where is the error?

Thank you once again

Elena

Found:

g.region rast=dem_sross_srtm
r.mapcalc "dem_sross_srtm_pos = if(dem_sross_srtm < 0, 0, dem_sross_srtm)"

Sorry!

Elena

No differences between negative and positive values...
I don't know what could be the problem...

Thank you for your helpfulness!

Elena

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/i-atcorr-negative-DEM-tp6374760p6375143.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Tue, May 17, 2011 at 10:57 PM, Elena Mezzini <elena.mezzini@gmail.com> wrote:

Elena Mezzini wrote:

Markus Metz-2 wrote:

On Tue, May 17, 2011 at 10:08 PM, Elena Mezzini
&lt;elena.mezzini@gmail.com&gt; wrote:

On Tue, May 17, 2011 at 9:22 PM, Elena Mezzini
&lt;elena.mezzini@gmail.com&gt; wrote:

Hi all,
I'm once again in trouble with i.atcorr in GRASS6.5.svn.
I notice that my output reflectance images are strange: there are some
areas
that are really bright and other that are really dark. Both seem to
match
with my DEM raster.
Could there be problems with negative values in DEM?? I'm in a coastal
area
and there are some real altitude negative values.

...
...

g.region rast=dem_sross_srtm
r.mapcalc "dem_sross_srtm_pos = if(dem_sross_srtm < 0, 0, dem_sross_srtm)"

...

No differences between negative and positive values...

What do you mean precisely?

Markus

2011/5/24 Markus Neteler <neteler@osgeo.org>

On Tue, May 17, 2011 at 10:57 PM, Elena Mezzini <elena.mezzini@gmail.com> wrote:

Elena Mezzini wrote:

Markus Metz-2 wrote:

On Tue, May 17, 2011 at 10:08 PM, Elena Mezzini

&lt;elena.mezzini@gmail.com> wrote:

On Tue, May 17, 2011 at 9:22 PM, Elena Mezzini
&lt;elena.mezzini@gmail.com> wrote:

Hi all,
I’m once again in trouble with i.atcorr in GRASS6.5.svn.
I notice that my output reflectance images are strange: there are some
areas
that are really bright and other that are really dark. Both seem to
match
with my DEM raster.
Could there be problems with negative values in DEM?? I’m in a coastal
area
and there are some real altitude negative values.


g.region rast=dem_sross_srtm
r.mapcalc “dem_sross_srtm_pos = if(dem_sross_srtm < 0, 0, dem_sross_srtm)”

No differences between negative and positive values…

What do you mean precisely?

I mean that i.atcorr automatically considers negative values equal to 0. So the results of i.atcorr with negative values or with negative values made equal to zero are the same.
So I still have problem with all the bands of landsat probably due to DEM.

Elena