Apologies, input altitude in param file is in Km (negative) already. The test in the code is assessing if file descriptor for altitude raster is positive and not null, confirming that the alt row buffer is populated, therefore permitting processing from meter to Km conversion. if not available, global unique value is taken in the process of inversion model re-definition. So this seem justified to use.
On 09/11/2010, Yann Chemin <[email protected]> wrote: > From what I can read if no file descriptor is found then do not > convert meters to km > If no file descriptor is found it should fall back to a single > altitude value found in the input parameter file, the crux is that the > value is in meters too... > > A good modification would be to remove elevation (ialt) value from > parameter file and make it a separate input value to clarify the issue > value Vs raster input file. Likewise for visibility (ivis). > > > > Yann Chemin > www.csu.edu.au > > On 09/11/2010, at 4:43, Markus Neteler <[email protected]> wrote: > >> On Mon, Nov 8, 2010 at 10:28 AM, <[email protected]> wrote: >> ... >>> grass/branches/releasebranch_6_4/imagery/i.atcorr/6s.cpp >>> grass/branches/releasebranch_6_4/imagery/i.atcorr/main.cpp >>> Log: >>> i.atcorr: be less verbose, fix when elevation is not given >>> (merge r44250 from devbr6) >> ... >> >> Just curious about this change: >> >>> Modified: grass/branches/releasebranch_6_4/imagery/i.atcorr/main.cpp >>> =================================================================== >>> --- grass/branches/releasebranch_6_4/imagery/i.atcorr/main.cpp >>> 2010-11-08 09:27:08 UTC (rev 44251) >>> +++ grass/branches/releasebranch_6_4/imagery/i.atcorr/main.cpp >>> 2010-11-08 09:28:04 UTC (rev 44252) >> ... >>> @@ -331,7 +330,8 @@ >>> G_set_f_null_value(&buf[col], 1); >>> continue; >>> } >>> - alt[col] /= 1000.0f; /* converting to km from input which >>> should be in meter */ >>> + if (ialt_fd >= 0) >>> + alt[col] /= 1000.0f; /* converting to km from input which >>> should be in meter */ >>> >>> /* check if both maps are active and if whether any value has >>> changed */ >>> if((ialt_fd >= 0) && (ivis_fd >= 0) && ((prev_vis != >>> vis[col]) || (prev_alt != alt[col]))) >> >> If no elevation is available, perhaps better issue a warning/fatal error? >> I am not very familiar with this code so I dunno but in general >> performing atmospheric >> correction without DEM can lead to nonsense. But perhaps my observation >> is >> not applicable in this code chunk. >> >> Markus >> _______________________________________________ >> grass-dev mailing list >> [email protected] >> http://lists.osgeo.org/mailman/listinfo/grass-dev > -- Yann Chemin Senior Spatial Hydrologist www.csu.edu.au/research/icwater M +61-4-3740 7019 _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
