Explorar o código

cache increased; docs cosmetics

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@37240 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler %!s(int64=16) %!d(string=hai) anos
pai
achega
eafe559ca6
Modificáronse 2 ficheiros con 14 adicións e 7 borrados
  1. 3 3
      imagery/i.atcorr/i.atcorr.html
  2. 11 4
      imagery/i.atcorr/main.cpp

+ 3 - 3
imagery/i.atcorr/i.atcorr.html

@@ -517,14 +517,14 @@ echo "8                            - geometrical conditions=Landsat ETM+
 50                           - visibility [km] (aerosol model concentration)
 50                           - visibility [km] (aerosol model concentration)
 -0.110                       - mean target elevation above sea level [km]
 -0.110                       - mean target elevation above sea level [km]
 -1000                        - sensor on board a satellite
 -1000                        - sensor on board a satellite
-64                           - 4th band of ETM+ Landsat 7" > icnd.txt
+64                           - 4th band of ETM+ Landsat 7" > icnd_lsat4.txt
 
 
 # run atmospheric correction (-r for reflectance input map; -a for date >July 2000;
 # run atmospheric correction (-r for reflectance input map; -a for date >July 2000;
 #                             -o to use cache acceleration):
 #                             -o to use cache acceleration):
-i.atcorr -r -a -o lsat7_2002_40 ialt=elev_int icnd=icnd.txt oimg=lsat7_2002_40_atcorr
+i.atcorr -r -a -o lsat7_2002_40 ialt=elev_int icnd=icnd_lsat4.txt oimg=lsat7_2002_40_atcorr
 </pre></div>
 </pre></div>
 
 
-Note that the altitude value from 'icnd.txt' file is read at the beginning
+Note that the altitude value from 'icnd_lsat4.txt' file is read at the beginning
 to compute the initial transform. It is necessary to give a value which could
 to compute the initial transform. It is necessary to give a value which could
 the the mean value of the elevation model. For the atmospheric correction then
 the the mean value of the elevation model. For the atmospheric correction then
 the raster elevation values are used from the map.
 the raster elevation values are used from the map.

+ 11 - 4
imagery/i.atcorr/main.cpp

@@ -42,12 +42,11 @@ extern "C" {
 #include "Transform.h"
 #include "Transform.h"
 #include "6s.h"
 #include "6s.h"
 
 
-
 /* Input options and flags */
 /* Input options and flags */
 struct Options
 struct Options
 {
 {
     /* options */
     /* options */
-    struct Option *iimg;    /* input satelite image */
+    struct Option *iimg;    /* input satellite image */
     struct Option *iscl;    /* input data is scaled to this range */
     struct Option *iscl;    /* input data is scaled to this range */
     struct Option *ialt;    /* an input elevation map in km used to increase */
     struct Option *ialt;    /* an input elevation map in km used to increase */
                             /* atmospheric correction accuracy, including this */
                             /* atmospheric correction accuracy, including this */
@@ -127,11 +126,12 @@ static void write_fp_to_cell (int ofd, FCELL* buf)
 }
 }
 
 
 
 
+/* See also Cache note below */
 class TICache
 class TICache
 {
 {
     enum TICacheSize
     enum TICacheSize
     {
     {
-        MAX_TIs = 1024 /* this value is a guess, increase it if in general more categories are used */
+        MAX_TIs = 8192 /* this value is a guess, increase it if in general more categories are used */
     };
     };
     TransformInput tis[MAX_TIs];
     TransformInput tis[MAX_TIs];
     float alts[MAX_TIs];
     float alts[MAX_TIs];
@@ -163,11 +163,18 @@ public:
 /* the transform input map, is a array of ticaches.
 /* the transform input map, is a array of ticaches.
    The first key is the visibility which matches to a TICache for the altitudes.
    The first key is the visibility which matches to a TICache for the altitudes.
    This code is horrible, i just spent 20min writing and 5min debugging it. */
    This code is horrible, i just spent 20min writing and 5min debugging it. */
+
+/* Cache note:
+   The DEM cases are in range 0 < DEM < 8888 for the World in case of using an 
+   integer DEM values in meters. So the cache should ideally store 8888 different
+   cases for the World-type conditions if all happen in the same image. */
+
 class TIMap
 class TIMap
 {
 {
     enum TIMapSize
     enum TIMapSize
     {
     {
-	MAX_TICs = 1024 /* this value is a guess. It means that 1024 TI's will be the max combinations of vis/alt pairs */
+	MAX_TICs = 8192  /* this value is a guess. It means that <size> TI's will be 
+                          * the max combinations of vis/alt pairs */
     };
     };
 
 
     TICache tic[MAX_TICs]; /* array of TICaches */
     TICache tic[MAX_TICs]; /* array of TICaches */