Procházet zdrojové kódy

Fixed readcell to read rows and columns from source or target

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@71326 15284696-431f-4ddb-bdfa-cd5b030d7da7
Yann Chemin před 7 roky
rodič
revize
71f52df442

+ 7 - 5
imagery/i.ortho.photo/i.ortho.rectify/readcell.c

@@ -24,15 +24,17 @@ struct cache *readcell(int fdi, int size, int target_env)
     int nblocks;
     int i;
 
-    if (target_env)
+    if (target_env){
 	select_target_env();
-    else
+    	nrows = Rast_output_window_rows();
+    	ncols = Rast_output_window_cols();
+    }else{
 	select_current_env();
-
+    	nrows = Rast_input_window_rows();
+    	ncols = Rast_input_window_cols();
+    }
     G_srand48(0);
 
-    nrows = Rast_window_rows();
-    ncols = Rast_window_cols();
 
     /* Temporary file must be created in the same location/mapset 
      * where the module was called */