浏览代码

Rename Rast.h->raster.h
Rename libgrass_rast -> libgrass_raster
Rename RASTR{LIB,DEP,_LIBNAME} -> RASTER_*
Fix definition of RASTERLIB
Fix EOLs for imagery/i.evapo.time_integration/main.c
Add SWIG wrapper for raster library


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@38014 15284696-431f-4ddb-bdfa-cd5b030d7da7

Glynn Clements 16 年之前
父节点
当前提交
8b394a154d
共有 100 个文件被更改,包括 546 次插入546 次删除
  1. 1 1
      display/d.colortable/main.c
  2. 1 1
      display/d.graph/do_graph.c
  3. 1 1
      display/d.graph/graphics.c
  4. 1 1
      display/d.graph/main.c
  5. 1 1
      display/d.grid/fiducial.c
  6. 1 1
      display/d.grid/main.c
  7. 1 1
      display/d.grid/plot.c
  8. 1 1
      display/d.grid/plotborder.c
  9. 1 1
      display/d.his/his.c
  10. 1 1
      display/d.his/main.c
  11. 1 1
      display/d.histogram/bar.c
  12. 1 1
      display/d.histogram/draw_slice.c
  13. 1 1
      display/d.histogram/get_stats.c
  14. 1 1
      display/d.histogram/main.c
  15. 1 1
      display/d.histogram/pie.c
  16. 1 1
      display/d.labels/color.c
  17. 1 1
      display/d.labels/do_labels.c
  18. 1 1
      display/d.labels/main.c
  19. 1 1
      display/d.legend/main.c
  20. 1 1
      display/d.nviz/main.c
  21. 1 1
      display/d.path/main.c
  22. 1 1
      display/d.path/select.c
  23. 1 1
      display/d.profile/main.c
  24. 1 1
      display/d.rast.arrow/main.c
  25. 1 1
      display/d.rast.num/main.c
  26. 1 1
      display/d.rast/display.c
  27. 1 1
      display/d.rast/main.c
  28. 1 1
      display/d.rast/mask.c
  29. 1 1
      display/d.rgb/main.c
  30. 1 1
      display/d.thematic.area/area.c
  31. 1 1
      display/d.thematic.area/main.c
  32. 1 1
      display/d.thematic.area/plot1.c
  33. 1 1
      display/d.title/fancy.c
  34. 1 1
      display/d.title/main.c
  35. 1 1
      display/d.title/normal.c
  36. 1 1
      display/d.vect.chart/bar.c
  37. 1 1
      display/d.vect.chart/main.c
  38. 1 1
      display/d.vect.chart/pie.c
  39. 1 1
      display/d.vect.chart/plot.c
  40. 1 1
      display/d.vect/area.c
  41. 1 1
      display/d.vect/attr.c
  42. 1 1
      display/d.vect/dir.c
  43. 1 1
      display/d.vect/label.c
  44. 1 1
      display/d.vect/main.c
  45. 1 1
      display/d.vect/plot1.c
  46. 1 1
      display/d.vect/topo.c
  47. 1 1
      display/d.vect/utils.c
  48. 1 1
      display/d.vect/zcoor.c
  49. 1 1
      general/g.mremove/check_reclass.c
  50. 1 1
      general/g.mremove/wc2regex.c
  51. 1 1
      general/g.region/adjust.c
  52. 1 1
      general/g.region/main.c
  53. 1 1
      general/g.region/printwindow.c
  54. 1 1
      general/g.region/zoom.c
  55. 1 1
      general/g.remove/main.c
  56. 1 1
      general/g.rename/main.c
  57. 2 2
      general/manage/lister/Makefile
  58. 1 1
      general/manage/lister/cell.c
  59. 1 1
      general/manage/lister/vector.c
  60. 2 2
      imagery/i.albedo/Makefile
  61. 1 1
      imagery/i.albedo/main.c
  62. 2 2
      imagery/i.atcorr/Makefile
  63. 1 1
      imagery/i.atcorr/main.cpp
  64. 2 2
      imagery/i.cca/Makefile
  65. 1 1
      imagery/i.cca/main.c
  66. 1 1
      imagery/i.cca/matrix.c
  67. 1 1
      imagery/i.cca/stats.c
  68. 1 1
      imagery/i.cca/transform.c
  69. 2 2
      imagery/i.cluster/Makefile
  70. 1 1
      imagery/i.cluster/checkpt.c
  71. 1 1
      imagery/i.cluster/main.c
  72. 1 1
      imagery/i.cluster/open_files.c
  73. 1 1
      imagery/i.cluster/print1.c
  74. 1 1
      imagery/i.cluster/print2.c
  75. 1 1
      imagery/i.cluster/print3.c
  76. 1 1
      imagery/i.cluster/print4.c
  77. 1 1
      imagery/i.cluster/print5.c
  78. 1 1
      imagery/i.cluster/print6.c
  79. 1 1
      imagery/i.cluster/timer.c
  80. 2 2
      imagery/i.eb.eta/Makefile
  81. 1 1
      imagery/i.eb.eta/main.c
  82. 2 2
      imagery/i.eb.evapfr/Makefile
  83. 1 1
      imagery/i.eb.evapfr/main.c
  84. 2 2
      imagery/i.eb.h_SEBAL01/Makefile
  85. 1 1
      imagery/i.eb.h_SEBAL01/main.c
  86. 2 2
      imagery/i.eb.soilheatflux/Makefile
  87. 1 1
      imagery/i.eb.soilheatflux/main.c
  88. 2 2
      imagery/i.emissivity/Makefile
  89. 1 1
      imagery/i.emissivity/main.c
  90. 2 2
      imagery/i.evapo.time_integration/Makefile
  91. 435 435
      imagery/i.evapo.time_integration/main.c
  92. 2 2
      imagery/i.fft/Makefile
  93. 1 1
      imagery/i.fft/main.c
  94. 2 2
      imagery/i.gensig/Makefile
  95. 1 1
      imagery/i.gensig/alloc.c
  96. 1 1
      imagery/i.gensig/can_invert.c
  97. 1 1
      imagery/i.gensig/closefiles.c
  98. 1 1
      imagery/i.gensig/covariance.c
  99. 1 1
      imagery/i.gensig/eigen.c
  100. 0 0
      imagery/i.gensig/get_train.c

+ 1 - 1
display/d.colortable/main.c

@@ -24,7 +24,7 @@
 #include <math.h>
 #include <grass/display.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display_raster.h>
 #include <grass/glocale.h>
 

+ 1 - 1
display/d.graph/do_graph.c

@@ -1,7 +1,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>
 #include <grass/symbol.h>

+ 1 - 1
display/d.graph/graphics.c

@@ -1,6 +1,6 @@
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 
 #include "local_proto.h"

+ 1 - 1
display/d.graph/main.c

@@ -31,7 +31,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>
 #include <grass/glocale.h>

+ 1 - 1
display/d.grid/fiducial.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display.h>
 #include <grass/symbol.h>
 #include <grass/colors.h>

+ 1 - 1
display/d.grid/main.c

@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>
 #include <grass/gprojects.h>

+ 1 - 1
display/d.grid/plot.c

@@ -2,7 +2,7 @@
 #include <string.h>
 
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>
 #include <grass/gprojects.h>

+ 1 - 1
display/d.grid/plotborder.c

@@ -1,6 +1,6 @@
 #include <math.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display.h>
 
 int plot_border(double grid_size, double east, double north)

+ 1 - 1
display/d.his/his.c

@@ -1,6 +1,6 @@
 
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include "his.h"
 
 /****************************************************************************

+ 1 - 1
display/d.his/main.c

@@ -23,7 +23,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>
 #include <grass/glocale.h>

+ 1 - 1
display/d.histogram/bar.c

@@ -28,7 +28,7 @@
 
 #include <string.h>
 
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>
 

+ 1 - 1
display/d.histogram/draw_slice.c

@@ -2,7 +2,7 @@
 #include <grass/display_raster.h>
 #include <grass/display.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 
 char percent[] = "%";
 

+ 1 - 1
display/d.histogram/get_stats.c

@@ -4,7 +4,7 @@
 #include <stdarg.h>
 #include <unistd.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include "options.h"
 #include "dhist.h"
 

+ 1 - 1
display/d.histogram/main.c

@@ -34,7 +34,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>
 #include <grass/glocale.h>

+ 1 - 1
display/d.histogram/pie.c

@@ -30,7 +30,7 @@
 
 #include <string.h>
 
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>
 

+ 1 - 1
display/d.labels/color.c

@@ -16,7 +16,7 @@
 /**  ??? move these into libgis ??? (libraster for set_color_from_RGBA()) **/
 
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display.h>
 #include <grass/glocale.h>
 

+ 1 - 1
display/d.labels/do_labels.c

@@ -3,7 +3,7 @@
 #include <stdlib.h>
 #include <math.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>
 #include <grass/glocale.h>

+ 1 - 1
display/d.labels/main.c

@@ -19,7 +19,7 @@
 #include <stdlib.h>
 #include <math.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>
 #include "local_proto.h"

+ 1 - 1
display/d.legend/main.c

@@ -29,7 +29,7 @@
 #include <string.h>
 #include <math.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display_raster.h>
 #include <grass/display.h>
 #include <grass/glocale.h>

+ 1 - 1
display/d.nviz/main.c

@@ -24,7 +24,7 @@
 #include <math.h>
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>
 #include "local.h"

+ 1 - 1
display/d.path/main.c

@@ -20,7 +20,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display_raster.h>
 #include <grass/display.h>
 #include <grass/colors.h>

+ 1 - 1
display/d.path/select.c

@@ -3,7 +3,7 @@
 #include <unistd.h>
 #include <math.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display_raster.h>
 #include <grass/display.h>
 #include <grass/Vect.h>

+ 1 - 1
display/d.profile/main.c

@@ -23,7 +23,7 @@
 #include <stdlib.h>
 #include <math.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display_raster.h>
 #include <grass/display.h>
 #include <grass/glocale.h>

+ 1 - 1
display/d.rast.arrow/main.c

@@ -38,7 +38,7 @@
 #include <string.h>
 #include <math.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display_raster.h>
 #include <grass/display.h>
 #include <grass/colors.h>

+ 1 - 1
display/d.rast.num/main.c

@@ -38,7 +38,7 @@
 #include <string.h>
 #include <math.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display_raster.h>
 #include <grass/display.h>
 #include <grass/colors.h>

+ 1 - 1
display/d.rast/display.c

@@ -1,7 +1,7 @@
 #include <stdlib.h>
 
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display_raster.h>
 #include <grass/display.h>
 #include <grass/glocale.h>

+ 1 - 1
display/d.rast/main.c

@@ -20,7 +20,7 @@
  *****************************************************************************/
 #include <stdlib.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display_raster.h>
 
 #include "mask.h"

+ 1 - 1
display/d.rast/mask.c

@@ -1,6 +1,6 @@
 #include <stdlib.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include "mask.h"
 #include "local_proto.h"
 

+ 1 - 1
display/d.rgb/main.c

@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>
 #include <grass/glocale.h>

+ 1 - 1
display/d.thematic.area/area.c

@@ -4,7 +4,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/Vect.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>

+ 1 - 1
display/d.thematic.area/main.c

@@ -19,7 +19,7 @@
 #include <dirent.h>
 #include <grass/config.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display_raster.h>
 #include <grass/display.h>
 #include <grass/Vect.h>

+ 1 - 1
display/d.thematic.area/plot1.c

@@ -2,7 +2,7 @@
 
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/Vect.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>

+ 1 - 1
display/d.title/fancy.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include "options.h"
 
 void fancy(struct Cell_head *window, struct Categories *cats, FILE * fp)

+ 1 - 1
display/d.title/main.c

@@ -21,7 +21,7 @@
 #include <grass/display.h>
 #include <grass/display_raster.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 
 #include "options.h"

+ 1 - 1
display/d.title/normal.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include "options.h"
 #include "local_proto.h"
 

+ 1 - 1
display/d.vect.chart/bar.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/Vect.h>
 #include <grass/dbmi.h>
 #include <grass/display.h>

+ 1 - 1
display/d.vect.chart/main.c

@@ -18,7 +18,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display_raster.h>
 #include <grass/display.h>
 #include <grass/Vect.h>

+ 1 - 1
display/d.vect.chart/pie.c

@@ -1,6 +1,6 @@
 #include <math.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/Vect.h>
 #include <grass/dbmi.h>
 #include <grass/display.h>

+ 1 - 1
display/d.vect.chart/plot.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/Vect.h>
 #include <grass/dbmi.h>
 #include <grass/display.h>

+ 1 - 1
display/d.vect/area.c

@@ -4,7 +4,7 @@
  */
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/Vect.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>

+ 1 - 1
display/d.vect/attr.c

@@ -1,6 +1,6 @@
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/Vect.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>

+ 1 - 1
display/d.vect/dir.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/Vect.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>

+ 1 - 1
display/d.vect/label.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/Vect.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>

+ 1 - 1
display/d.vect/main.c

@@ -18,7 +18,7 @@
 #include <sys/types.h>
 #include <dirent.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/display_raster.h>
 #include <grass/display.h>
 #include <grass/Vect.h>

+ 1 - 1
display/d.vect/plot1.c

@@ -2,7 +2,7 @@
 
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/Vect.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>

+ 1 - 1
display/d.vect/topo.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/Vect.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>

+ 1 - 1
display/d.vect/utils.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/Vect.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>

+ 1 - 1
display/d.vect/zcoor.c

@@ -1,7 +1,7 @@
 /* Print z coordinate value for each node */
 
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/Vect.h>
 #include <grass/display.h>
 #include <grass/display_raster.h>

+ 1 - 1
general/g.mremove/check_reclass.c

@@ -1,6 +1,6 @@
 #include <string.h>
 
-#include <grass/Rast.h>
+#include <grass/raster.h>
 
 #include "global.h"
 

+ 1 - 1
general/g.mremove/wc2regex.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 
 char *wc2regex(const char *wc)
 {

+ 1 - 1
general/g.region/adjust.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 #include "local_proto.h"
 

+ 1 - 1
general/g.region/main.c

@@ -16,7 +16,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/G3d.h>
 #include <grass/Vect.h>
 #include <grass/glocale.h>

+ 1 - 1
general/g.region/printwindow.c

@@ -2,7 +2,7 @@
 #include <stdlib.h>
 #include <projects.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/gprojects.h>
 #include <grass/glocale.h>
 #include "local_proto.h"

+ 1 - 1
general/g.region/zoom.c

@@ -1,6 +1,6 @@
 #include <stdlib.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 #include "local_proto.h"
 

+ 1 - 1
general/g.remove/main.c

@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 #include <grass/list.h>
 

+ 1 - 1
general/g.rename/main.c

@@ -20,7 +20,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 #include <grass/list.h>
 

+ 2 - 2
general/manage/lister/Makefile

@@ -1,7 +1,7 @@
 MODULE_TOPDIR = ../../..
 
-LIBES = $(VECTLIB) $(DBMILIB) $(GISLIB) $(RASTRLIB) $(RASTRLIB)
-DEPENDENCIES = $(VECTDEP) $(DBMIDEP) $(GISDEP) $(RASTRDEP) $(RASTRDEP)
+LIBES = $(VECTLIB) $(DBMILIB) $(GISLIB) $(RASTERLIB)
+DEPENDENCIES = $(VECTDEP) $(DBMIDEP) $(GISDEP) $(RASTERDEP)
 EXTRA_INC = $(VECT_INC)
 EXTRA_CFLAGS = $(VECT_CFLAGS)
 

+ 1 - 1
general/manage/lister/cell.c

@@ -1,7 +1,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 
 int main(int argc, char *argv[])
 {

+ 1 - 1
general/manage/lister/vector.c

@@ -1,7 +1,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/Vect.h>
 
 int main(int argc, char *argv[])

+ 2 - 2
imagery/i.albedo/Makefile

@@ -2,8 +2,8 @@ MODULE_TOPDIR = ../..
 
 PGM = i.albedo
 
-LIBES = $(GISLIB) $(RASTRLIB)
-DEPENDENCIES = $(GISDEP) $(RASTRDEP)
+LIBES = $(GISLIB) $(RASTERLIB)
+DEPENDENCIES = $(GISDEP) $(RASTERDEP)
 
 include $(MODULE_TOPDIR)/include/Make/Module.make
 

+ 1 - 1
imagery/i.albedo/main.c

@@ -18,7 +18,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 
 #define MAXFILES 8

+ 2 - 2
imagery/i.atcorr/Makefile

@@ -4,8 +4,8 @@ PGM = i.atcorr
 
 include $(MODULE_TOPDIR)/include/Make/Module.make
 
-LIBES = $(GISLIB) $(RASTRLIB) 
-DEPENDENCIES = $(GISDEP) $(RASTRDEP)
+LIBES = $(GISLIB) $(RASTERLIB) 
+DEPENDENCIES = $(GISDEP) $(RASTERDEP)
 
 LINK = $(CXX)
 

+ 1 - 1
imagery/i.atcorr/main.cpp

@@ -37,7 +37,7 @@ TODO: use dynamic allocation for TiCache
 
 extern "C" {
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 }
 

+ 2 - 2
imagery/i.cca/Makefile

@@ -2,8 +2,8 @@ MODULE_TOPDIR = ../..
 
 PGM = i.cca
 
-LIBES     = $(IMAGERYLIB) $(GMATHLIB) $(GISLIB) $(RASTRLIB)
-DEPENDENCIES= $(IMAGERYDEP) $(GMATHDEP) $(GISDEP) $(RASTRDEP)
+LIBES     = $(IMAGERYLIB) $(GMATHLIB) $(GISLIB) $(RASTERLIB)
+DEPENDENCIES= $(IMAGERYDEP) $(GMATHDEP) $(GISDEP) $(RASTERDEP)
 
 include $(MODULE_TOPDIR)/include/Make/Module.make
 

+ 1 - 1
imagery/i.cca/main.c

@@ -38,7 +38,7 @@
 #include <string.h>
 #include <math.h>
 
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/imagery.h>
 #include <grass/gmath.h>
 #include <grass/glocale.h>

+ 1 - 1
imagery/i.cca/matrix.c

@@ -1,6 +1,6 @@
 #include <math.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/gmath.h>
 #include "local_proto.h"
 

+ 1 - 1
imagery/i.cca/stats.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include "local_proto.h"
 
 

+ 1 - 1
imagery/i.cca/transform.c

@@ -1,6 +1,6 @@
 #include <stdlib.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 #include "local_proto.h"
 

+ 2 - 2
imagery/i.cluster/Makefile

@@ -2,8 +2,8 @@ MODULE_TOPDIR = ../..
 
 PGM = i.cluster
 
-LIBES     = $(CLUSTERLIB) $(IMAGERYLIB) $(GISLIB) $(RASTRLIB) $(GMATHLIB)
-DEPENDENCIES= $(CLUSTERDEP) $(IMAGERYDEP) $(GISDEP) $(RASTRDEP) $(GMATHDEP)
+LIBES     = $(CLUSTERLIB) $(IMAGERYLIB) $(GISLIB) $(RASTERLIB) $(GMATHLIB)
+DEPENDENCIES= $(CLUSTERDEP) $(IMAGERYDEP) $(GISDEP) $(RASTERDEP) $(GMATHDEP)
 
 include $(MODULE_TOPDIR)/include/Make/Module.make
 

+ 1 - 1
imagery/i.cluster/checkpt.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 #include "global.h"
 #include "local_proto.h"

+ 1 - 1
imagery/i.cluster/main.c

@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <time.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 #define GLOBAL
 #include "global.h"

+ 1 - 1
imagery/i.cluster/open_files.c

@@ -1,6 +1,6 @@
 #include <stdlib.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 #include "global.h"
 

+ 1 - 1
imagery/i.cluster/print1.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 #include <grass/imagery.h>
 #include <grass/cluster.h>

+ 1 - 1
imagery/i.cluster/print2.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 #include <grass/imagery.h>
 #include <grass/cluster.h>

+ 1 - 1
imagery/i.cluster/print3.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 #include <grass/imagery.h>
 #include <grass/cluster.h>

+ 1 - 1
imagery/i.cluster/print4.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 #include <grass/imagery.h>
 #include <grass/cluster.h>

+ 1 - 1
imagery/i.cluster/print5.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 #include <grass/imagery.h>
 #include <grass/cluster.h>

+ 1 - 1
imagery/i.cluster/print6.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 #include <grass/imagery.h>
 #include <grass/cluster.h>

+ 1 - 1
imagery/i.cluster/timer.c

@@ -1,6 +1,6 @@
 #include <stdio.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include "global.h"
 
 

+ 2 - 2
imagery/i.eb.eta/Makefile

@@ -2,8 +2,8 @@ MODULE_TOPDIR = ../..
 
 PGM = i.eb.eta
 
-LIBES = $(GISLIB) $(RASTRLIB)
-DEPENDENCIES = $(GISDEP) $(RASTRDEP)
+LIBES = $(GISLIB) $(RASTERLIB)
+DEPENDENCIES = $(GISDEP) $(RASTERDEP)
 
 include $(MODULE_TOPDIR)/include/Make/Module.make
 

+ 1 - 1
imagery/i.eb.eta/main.c

@@ -19,7 +19,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 double et_a(double r_net_day, double evap_fr, double tempk);
 

+ 2 - 2
imagery/i.eb.evapfr/Makefile

@@ -2,8 +2,8 @@ MODULE_TOPDIR = ../..
 
 PGM = i.eb.evapfr
 
-LIBES = $(GISLIB) $(RASTRLIB)
-DEPENDENCIES = $(GISDEP) $(RASTRDEP)
+LIBES = $(GISLIB) $(RASTERLIB)
+DEPENDENCIES = $(GISDEP) $(RASTERDEP)
 
 include $(MODULE_TOPDIR)/include/Make/Module.make
 

+ 1 - 1
imagery/i.eb.evapfr/main.c

@@ -19,7 +19,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 
 double evap_fr(double r_net, double g0, double h0);

+ 2 - 2
imagery/i.eb.h_SEBAL01/Makefile

@@ -2,8 +2,8 @@ MODULE_TOPDIR = ../..
 
 PGM = i.eb.h_SEBAL01
 
-LIBES = $(GISLIB) $(RASTRLIB)
-DEPENDENCIES = $(GISDEP) $(RASTRDEP)
+LIBES = $(GISLIB) $(RASTERLIB)
+DEPENDENCIES = $(GISDEP) $(RASTERDEP)
 
 include $(MODULE_TOPDIR)/include/Make/Module.make
 

+ 1 - 1
imagery/i.eb.h_SEBAL01/main.c

@@ -24,7 +24,7 @@
 #include <stdlib.h>
 #include <math.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 
 double **G_alloc_matrix(int rows, int cols)

+ 2 - 2
imagery/i.eb.soilheatflux/Makefile

@@ -2,8 +2,8 @@ MODULE_TOPDIR = ../..
 
 PGM = i.eb.soilheatflux
 
-LIBES = $(GISLIB) $(RASTRLIB)
-DEPENDENCIES = $(GISDEP) $(RASTRDEP)
+LIBES = $(GISLIB) $(RASTERLIB)
+DEPENDENCIES = $(GISDEP) $(RASTERDEP)
 
 include $(MODULE_TOPDIR)/include/Make/Module.make
 

+ 1 - 1
imagery/i.eb.soilheatflux/main.c

@@ -19,7 +19,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 
 double g_0(double bbalb, double ndvi, double tempk, double rnet,

+ 2 - 2
imagery/i.emissivity/Makefile

@@ -2,8 +2,8 @@ MODULE_TOPDIR = ../..
 
 PGM = i.emissivity
 
-LIBES = $(GISLIB) $(RASTRLIB)
-DEPENDENCIES = $(GISDEP) $(RASTRDEP)
+LIBES = $(GISLIB) $(RASTERLIB)
+DEPENDENCIES = $(GISDEP) $(RASTERDEP)
 
 include $(MODULE_TOPDIR)/include/Make/Module.make
 

+ 1 - 1
imagery/i.emissivity/main.c

@@ -17,7 +17,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 
 double emissivity_generic(double ndvi);

+ 2 - 2
imagery/i.evapo.time_integration/Makefile

@@ -2,8 +2,8 @@ MODULE_TOPDIR = ../..
 
 PGM = i.evapo.time_integration
 
-LIBES = $(GISLIB) $(RASTRLIB)
-DEPENDENCIES = $(GISDEP) $(RASTRDEP)
+LIBES = $(GISLIB) $(RASTERLIB)
+DEPENDENCIES = $(GISDEP) $(RASTERDEP)
 
 include $(MODULE_TOPDIR)/include/Make/Module.make
 

+ 435 - 435
imagery/i.evapo.time_integration/main.c

@@ -1,436 +1,436 @@
-
-/****************************************************************************
- *
- * MODULE:       i.evapo.time_integration
- * AUTHOR(S):    Yann Chemin - yann.chemin@gmail.com
- * 		 Ines Cherif - icherif@yahoo.com
- * PURPOSE:      Integrate in time the evapotranspiration from satellite,
- *		 following a daily pattern from meteorological ETo.
- *
- * COPYRIGHT:    (C) 2008-2009 by the GRASS Development Team
- *
- *               This program is free software under the GNU Lesser General Public
- *   	    	 License. Read the file COPYING that comes with GRASS for details.
- *
- *****************************************************************************/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+
+/****************************************************************************
+ *
+ * MODULE:       i.evapo.time_integration
+ * AUTHOR(S):    Yann Chemin - yann.chemin@gmail.com
+ * 		 Ines Cherif - icherif@yahoo.com
+ * PURPOSE:      Integrate in time the evapotranspiration from satellite,
+ *		 following a daily pattern from meteorological ETo.
+ *
+ * COPYRIGHT:    (C) 2008-2009 by the GRASS Development Team
+ *
+ *               This program is free software under the GNU Lesser General Public
+ *   	    	 License. Read the file COPYING that comes with GRASS for details.
+ *
+ *****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
-#include <grass/glocale.h>
-
-#define MAXFILES 400
-
-int main(int argc, char *argv[])
-{
-    struct Cell_head cellhd;	/*region+header info */
-    char *mapset;		/*mapset name */
-    int nrows, ncols;
-    int row, col;
-    struct GModule *module;
-    struct Option *input, *input1, *input2, *input3, *input4, *input5, *output;
-    struct History history;	/*metadata */
-    struct Colors colors;	/*Color rules */
-
-    /************************************/
-    char *name, *name1, *name2;	/*input raster name */
-    char *result;		/*output raster name */
-
-    /*File Descriptors */
-    int nfiles, nfiles1, nfiles2;
-    int infd[MAXFILES], infd1[MAXFILES], infd2[MAXFILES];
-    int outfd;
-
-    /****************************************/
-    /* Pointers for file names              */
-    char **names;
-    char **ptr;
-    char **names1;
-    char **ptr1;
-    char **names2;
-    char **ptr2;
-
-    /****************************************/
-    int DOYbeforeETa[MAXFILES], DOYafterETa[MAXFILES];
-    int bfr, aft;
-
-    /****************************************/
-    int ok;
-    int i = 0, j = 0;
-    double etodoy;		/*minimum ETo DOY */
-    double startperiod, endperiod;  /*first and last days (DOYs) of the period studied */
-    void *inrast[MAXFILES], *inrast1[MAXFILES], *inrast2[MAXFILES];
-    DCELL *outrast;
-    
-    RASTER_MAP_TYPE in_data_type[MAXFILES];	/* ETa */
-    RASTER_MAP_TYPE in_data_type1[MAXFILES];	/* DOY of ETa */
-    RASTER_MAP_TYPE in_data_type2[MAXFILES];	/* ETo */
-    RASTER_MAP_TYPE out_data_type = DCELL_TYPE;
-
-    /************************************/
-    G_gisinit(argv[0]);
-
-    module = G_define_module();
-    module->description =_("Computes temporal integration of satellite "
-			   "ET actual (ETa) following the daily ET reference "
-			   "(ETo) from meteorological station(s)");
-    module->keywords = _("imagery, evapotranspiration, temporal, integration");
-
-    /* Define the different options */
-    input = G_define_standard_option(G_OPT_R_INPUTS);
-    input->key = "eta";
-    input->description = _("Names of satellite ETa raster maps [mm/d or cm/d]");
-
-    input1 = G_define_standard_option(G_OPT_R_INPUTS);
-    input1->key = "eta_doy";
-    input1->description =
-	_("Names of satellite ETa Day of Year (DOY) raster maps [0-400] [-]");
-
-    input2 = G_define_standard_option(G_OPT_R_INPUTS);
-    input2->key = "eto";
-    input2->description =
-	_("Names of meteorological station ETo raster maps [0-400] [mm/d or cm/d]");
-
-    input3 = G_define_option();
-    input3->key = "eto_doy_min";
-    input3->type = TYPE_DOUBLE;
-    input3->required = YES;
-    input3->description = _("Value of DOY for ETo first day");
-    
-    input4 = G_define_option();
-    input4->key = "start_period";
-    input4->type = TYPE_DOUBLE;
-    input4->required = YES;
-    input4->description = _("Value of DOY for the first day of the period studied");
-
-    input5 = G_define_option();
-    input5->key = "end_period";
-    input5->type = TYPE_DOUBLE;
-    input5->required = YES;
-    input5->description = _("Value of DOY for the last day of the period studied");
-
-    output = G_define_standard_option(G_OPT_R_OUTPUT);
-    
-    /* init nfiles */
-    nfiles = 1;
-    nfiles1 = 1;
-    nfiles2 = 1;
-
-    /********************/
-
-    if (G_parser(argc, argv))
-	exit(EXIT_FAILURE);
-
-    ok = 1;
-    names = input->answers;
-    ptr = input->answers;
-    names1 = input1->answers;
-    ptr1 = input1->answers;
-    names2 = input2->answers;
-    ptr2 = input2->answers;
-    etodoy = atof(input3->answer);
-    startperiod = atof(input4->answer);
-    endperiod = atof(input5->answer);
-    result = output->answer;
-
-    /****************************************/
-    if (endperiod<startperiod) {
-	G_fatal_error(_("The DOY for end_period can not be smaller than start_period"));
-	ok = 0;
-    }
-    if (etodoy>startperiod) {
-	G_fatal_error(_("The DOY for start_period can not be smaller than eto_doy_min"));
-	ok = 0;
-    }
-    if (G_legal_filename(result) < 0) {
-	G_fatal_error(_("<%s> is an illegal name"), result);
-	ok = 0;
-    }
-    for (; *ptr != NULL; ptr++) {
-	if (nfiles > MAXFILES)
-	    G_fatal_error(_("Too many ETa files. Only %d allowed."),
-			  MAXFILES);
-	name = *ptr;
-	/* find map in mapset */
-	mapset = (char *) G_find_cell2(name, "");
-	if (mapset == NULL) {
-	    G_fatal_error(_("Raster map <%s> not found"), name);
-	    ok = 0;
-	}
-	if (!ok)
-	    continue;
-	infd[nfiles] = Rast_open_cell_old(name, mapset);
-	if (infd[nfiles] < 0) {
-	    ok = 0;
-	    continue;
-	}
-	/* Allocate input buffer */
-	in_data_type[nfiles] = Rast_raster_map_type(name, mapset);
-	if ((infd[nfiles] = Rast_open_cell_old(name, mapset)) < 0)
-	    G_fatal_error(_("Unable to open raster map <%s>"), name);
-	if ((Rast_get_cellhd(name, mapset, &cellhd)) < 0)
-	    G_fatal_error(_("Unable to read file header of raster map <%s>"), name);
-	inrast[nfiles] = Rast_allocate_raster_buf(in_data_type[nfiles]);
-	nfiles++;
-    }
-    nfiles--;
-    if (nfiles <= 1)
-	G_fatal_error(_("The min specified input map is two"));
-	
-	/****************************************/
-    ok = 1;
-    for (; *ptr1 != NULL; ptr1++) {
-	if (nfiles1 > MAXFILES)
-	    G_fatal_error(_("Too many ETa files. Only %d allowed."),
-			  MAXFILES);
-	name1 = *ptr1;
-	/* find map in mapset */
-	mapset = (char *) G_find_cell2(name1, "");
-	if (mapset == NULL) {
-	    G_fatal_error(_("Raster map <%s> not found"), name1);
-	    ok = 0;
-	}
-	if (!ok)
-	    continue;
-	infd1[nfiles1] = Rast_open_cell_old(name1, mapset);
-	if (infd1[nfiles1] < 0) {
-	    ok = 0;
-	    continue;
-	}
-	/* Allocate input buffer */
-	in_data_type1[nfiles1] = Rast_raster_map_type(name1, mapset);
-	if ((infd1[nfiles1] = Rast_open_cell_old(name1, mapset)) < 0)
-	    G_fatal_error(_("Unable to open raster map <%s>"), name1);
-	if ((Rast_get_cellhd(name1, mapset, &cellhd)) < 0)
-	    G_fatal_error(_("Unable to read file header of raster map <%s>"), name1);
-	inrast1[nfiles1] = Rast_allocate_raster_buf(in_data_type1[nfiles1]);
-	nfiles1++;
-    }
-    nfiles1--;
-    if (nfiles1 <= 1)
-	G_fatal_error(_("The min specified input map is two"));
-
-
-	/****************************************/
-    if (nfiles != nfiles1)
-	G_fatal_error(_("ETa and ETa_DOY file numbers are not equal!"));
-
-	/****************************************/
-
-    ok = 1;
-    for (; *ptr2 != NULL; ptr2++) {
-	if (nfiles > MAXFILES)
-	    G_fatal_error(_("Too many ETa files. Only %d allowed."),
-			  MAXFILES);
-	name2 = *ptr2;
-	/* find map in mapset */
-	mapset = (char *) G_find_cell2(name2, "");
-	if (mapset == NULL) {
-	    G_fatal_error(_("Raster map <%s> not found"), name2);
-	    ok = 0;
-	}
-	if (!ok)
-	    continue;
-	infd2[nfiles2] = Rast_open_cell_old(name2, mapset);
-	if (infd2[nfiles2] < 0) {
-	    ok = 0;
-	    continue;
-	}
-	/* Allocate input buffer */
-	in_data_type2[nfiles2] = Rast_raster_map_type(name2, mapset);
-	if ((infd2[nfiles2] = Rast_open_cell_old(name2, mapset)) < 0) {
-	    G_fatal_error(_("Unable to open raster map <%s>"), name2);
-	}
-	if ((Rast_get_cellhd(name2, mapset, &cellhd)) < 0) {
-	    G_fatal_error(_("Unable to read file header of raster map <%s>"), name2);
-	}
-	inrast2[nfiles2] = Rast_allocate_d_raster_buf();
-	nfiles2++;
-    }
-    nfiles2--;
-    if (nfiles2 <= 1)
-	G_fatal_error(_("The min specified input map is two"));
-
-    /* Allocate output buffer, use input map data_type */
-    nrows = G_window_rows();
-    ncols = G_window_cols();
-    outrast = Rast_allocate_raster_buf(out_data_type);
-
-   
-    /* Create New raster files */
-    if ((outfd = Rast_open_raster_new(result, 1)) < 0)
-	G_fatal_error(_("Unable to create raster map <%s>"), result);
-
-    /*******************/
-    /* Process pixels */
-    double doy[MAXFILES];
-    double sum[MAXFILES];
-
-    for (row = 0; row < nrows; row++) 
-    {
-	DCELL d_out;
-	DCELL d_ETrF[MAXFILES];
-	DCELL d[MAXFILES];
-	DCELL d1[MAXFILES];
-	DCELL d2[MAXFILES];
-	G_percent(row, nrows, 2);
-
-	/* read input map */
-	for (i = 1; i <= nfiles; i++) 
-	    if ((Rast_get_d_raster_row(infd[i], inrast[i], row)) <	0) 
-		G_fatal_error(_("Unable to read raster map <%s> row %d"), name, row);
-	
-	for (i = 1; i <= nfiles1; i++) 
-	    if ((Rast_get_d_raster_row(infd1[i], inrast1[i], row)) < 0) 
-		G_fatal_error(_("Unable to read raster map <%s> row %d"), name1, row);
-
-	for (i = 1; i <= nfiles2; i++) 
-	    if ((Rast_get_d_raster_row (infd2[i], inrast2[i], row)) < 0) 
-		G_fatal_error(_("Unable to read raster map <%s> row %d"), name2, row);
-
-	/*process the data */
-	for (col = 0; col < ncols; col++) 
-        {
-            int	d1_null=0;
-            int	d_null=0;
-	    for (i = 1; i <= nfiles; i++) 
-            {
-		    if (Rast_is_d_null_value(&((DCELL *) inrast[i])[col]))
-		    	d_null=1;
-		    else
-	                d[i] = (double)((DCELL *) inrast[i])[col];
-	    }
-	    for (i = 1; i <= nfiles1; i++) 
-            {
-		    if (Rast_is_d_null_value(&((DCELL *) inrast1[i])[col]))
-			d1_null=1;
-		    else
-	                d1[i] = ((DCELL *) inrast1[i])[col];
-	    }
-
-	    for (i = 1; i <= nfiles2; i++) 
-		    d2[i] = ((DCELL *) inrast2[i])[col];
-
-	    /* Find out the DOY of the eto image    */
-	    for (i = 1; i <= nfiles1; i++) 
-            {
-		if ( d_null==1 || d1_null==1 )
-			Rast_set_d_null_value(&outrast[col],1);	
-		else
-		{
-			doy[i] = d1[i] - etodoy+1;
-			if (Rast_is_d_null_value(&d2[(int)doy[i]]) || d2[(int)doy[i]]==0 )
-				Rast_set_d_null_value(&outrast[col],1);
-			else
-				d_ETrF[i] = d[i] / d2[(int)doy[i]];
-		} 
-	    }
-
-	    for (i = 1; i <= nfiles1; i++) 
-            {
-		/* do nothing	*/
-		if ( d_null==1 || d1_null==1)
-                {
-			/*G_message("  null value ");*/
-                }
-		else
-		{
-			DOYbeforeETa[i]=0; DOYafterETa[i]=0;
-			if (i == 1)   
-				DOYbeforeETa[i] = startperiod;
-			else
-			{
- 				int k=i-1;
-				while (d1[k]>=startperiod )
-				{
-					if (d1[k]<0)	 // case were d1[k] is null
-						k=k-1;					
-					else
-					{
-						DOYbeforeETa[i] = 1+((d1[i] + d1[k])/2.0);
-						break;
-					}			
-				}
-
-			}
-	
-			if (i == nfiles1)  
-				DOYafterETa[i] = endperiod;
-			else
-			{
-				int k=i+1;
-				while (d1[k]<=endperiod)
-				{
-					if (d1[k]<0)   // case were d1[k] is null
-						k=k+1;
-					else
-					{
-						DOYafterETa[i] = (d1[i] + d1[k]) / 2.0;
-						break;
-	   				}					
-				}
-			}
-		}	
-	    }
-
-	    sum[MAXFILES] = 0.0;
-	    for (i = 1; i <= nfiles1; i++) 
-            {
-		if(d_null==1 || d1_null==1)
-                {
-		    /* do nothing	 */
-		} 
-                else
-                {
-			if (DOYbeforeETa[i]==0 || DOYbeforeETa[i]==0 ) 	
-                            Rast_set_d_null_value(&outrast[col],1);
-			else 
-                        {
-				bfr = (int)DOYbeforeETa[i];
-				aft = (int)DOYafterETa[i];
-				sum[i]=0.0;
-				for (j = bfr; j < aft; j++) 
-					sum[i] += d2[(int)(j-etodoy+1)];
-			}
-		}
-	    }
-	
-	    d_out = 0.0;
-	    for (i = 1; i <= nfiles1; i++)
-            {
-		if(d_null==1 || d_null==1)
-			Rast_set_d_null_value(&outrast[col],1);
-		else
-                {	
-			d_out += d_ETrF[i] * sum[i];
-		     	outrast[col] = d_out;
-		}	
-	    }
-	}
-	if (Rast_put_raster_row(outfd, outrast, out_data_type) < 0)
-	    G_fatal_error(_("Unable to write to raster map<%s>"), result);
-    }
-
-    for (i = 1; i <= nfiles; i++) {
-	G_free(inrast[i]);
-	Rast_close_cell(infd[i]);
-	G_free(inrast1[i]);
-	Rast_close_cell(infd1[i]);
-	G_free(inrast2[i]);
-	Rast_close_cell(infd2[i]);
-    }
-    G_free(outrast);
-    Rast_close_cell(outfd);
-
-    /* Color table from 0.0 to 10.0 */
-    Rast_init_colors(&colors);
-    Rast_add_color_rule(0.0, 0, 0, 0, 10.0, 255, 255, 255, &colors);
-    /* Metadata */
-    Rast_short_history(result, "raster", &history);
-    Rast_command_history(&history);
-    Rast_write_history(result, &history);
-
-    exit(EXIT_SUCCESS);
-}
+#include <grass/raster.h>
+#include <grass/glocale.h>
+
+#define MAXFILES 400
+
+int main(int argc, char *argv[])
+{
+    struct Cell_head cellhd;	/*region+header info */
+    char *mapset;		/*mapset name */
+    int nrows, ncols;
+    int row, col;
+    struct GModule *module;
+    struct Option *input, *input1, *input2, *input3, *input4, *input5, *output;
+    struct History history;	/*metadata */
+    struct Colors colors;	/*Color rules */
+
+    /************************************/
+    char *name, *name1, *name2;	/*input raster name */
+    char *result;		/*output raster name */
+
+    /*File Descriptors */
+    int nfiles, nfiles1, nfiles2;
+    int infd[MAXFILES], infd1[MAXFILES], infd2[MAXFILES];
+    int outfd;
+
+    /****************************************/
+    /* Pointers for file names              */
+    char **names;
+    char **ptr;
+    char **names1;
+    char **ptr1;
+    char **names2;
+    char **ptr2;
+
+    /****************************************/
+    int DOYbeforeETa[MAXFILES], DOYafterETa[MAXFILES];
+    int bfr, aft;
+
+    /****************************************/
+    int ok;
+    int i = 0, j = 0;
+    double etodoy;		/*minimum ETo DOY */
+    double startperiod, endperiod;  /*first and last days (DOYs) of the period studied */
+    void *inrast[MAXFILES], *inrast1[MAXFILES], *inrast2[MAXFILES];
+    DCELL *outrast;
+    
+    RASTER_MAP_TYPE in_data_type[MAXFILES];	/* ETa */
+    RASTER_MAP_TYPE in_data_type1[MAXFILES];	/* DOY of ETa */
+    RASTER_MAP_TYPE in_data_type2[MAXFILES];	/* ETo */
+    RASTER_MAP_TYPE out_data_type = DCELL_TYPE;
+
+    /************************************/
+    G_gisinit(argv[0]);
+
+    module = G_define_module();
+    module->description =_("Computes temporal integration of satellite "
+			   "ET actual (ETa) following the daily ET reference "
+			   "(ETo) from meteorological station(s)");
+    module->keywords = _("imagery, evapotranspiration, temporal, integration");
+
+    /* Define the different options */
+    input = G_define_standard_option(G_OPT_R_INPUTS);
+    input->key = "eta";
+    input->description = _("Names of satellite ETa raster maps [mm/d or cm/d]");
+
+    input1 = G_define_standard_option(G_OPT_R_INPUTS);
+    input1->key = "eta_doy";
+    input1->description =
+	_("Names of satellite ETa Day of Year (DOY) raster maps [0-400] [-]");
+
+    input2 = G_define_standard_option(G_OPT_R_INPUTS);
+    input2->key = "eto";
+    input2->description =
+	_("Names of meteorological station ETo raster maps [0-400] [mm/d or cm/d]");
+
+    input3 = G_define_option();
+    input3->key = "eto_doy_min";
+    input3->type = TYPE_DOUBLE;
+    input3->required = YES;
+    input3->description = _("Value of DOY for ETo first day");
+    
+    input4 = G_define_option();
+    input4->key = "start_period";
+    input4->type = TYPE_DOUBLE;
+    input4->required = YES;
+    input4->description = _("Value of DOY for the first day of the period studied");
+
+    input5 = G_define_option();
+    input5->key = "end_period";
+    input5->type = TYPE_DOUBLE;
+    input5->required = YES;
+    input5->description = _("Value of DOY for the last day of the period studied");
+
+    output = G_define_standard_option(G_OPT_R_OUTPUT);
+    
+    /* init nfiles */
+    nfiles = 1;
+    nfiles1 = 1;
+    nfiles2 = 1;
+
+    /********************/
+
+    if (G_parser(argc, argv))
+	exit(EXIT_FAILURE);
+
+    ok = 1;
+    names = input->answers;
+    ptr = input->answers;
+    names1 = input1->answers;
+    ptr1 = input1->answers;
+    names2 = input2->answers;
+    ptr2 = input2->answers;
+    etodoy = atof(input3->answer);
+    startperiod = atof(input4->answer);
+    endperiod = atof(input5->answer);
+    result = output->answer;
+
+    /****************************************/
+    if (endperiod<startperiod) {
+	G_fatal_error(_("The DOY for end_period can not be smaller than start_period"));
+	ok = 0;
+    }
+    if (etodoy>startperiod) {
+	G_fatal_error(_("The DOY for start_period can not be smaller than eto_doy_min"));
+	ok = 0;
+    }
+    if (G_legal_filename(result) < 0) {
+	G_fatal_error(_("<%s> is an illegal name"), result);
+	ok = 0;
+    }
+    for (; *ptr != NULL; ptr++) {
+	if (nfiles > MAXFILES)
+	    G_fatal_error(_("Too many ETa files. Only %d allowed."),
+			  MAXFILES);
+	name = *ptr;
+	/* find map in mapset */
+	mapset = (char *) G_find_cell2(name, "");
+	if (mapset == NULL) {
+	    G_fatal_error(_("Raster map <%s> not found"), name);
+	    ok = 0;
+	}
+	if (!ok)
+	    continue;
+	infd[nfiles] = Rast_open_cell_old(name, mapset);
+	if (infd[nfiles] < 0) {
+	    ok = 0;
+	    continue;
+	}
+	/* Allocate input buffer */
+	in_data_type[nfiles] = Rast_raster_map_type(name, mapset);
+	if ((infd[nfiles] = Rast_open_cell_old(name, mapset)) < 0)
+	    G_fatal_error(_("Unable to open raster map <%s>"), name);
+	if ((Rast_get_cellhd(name, mapset, &cellhd)) < 0)
+	    G_fatal_error(_("Unable to read file header of raster map <%s>"), name);
+	inrast[nfiles] = Rast_allocate_raster_buf(in_data_type[nfiles]);
+	nfiles++;
+    }
+    nfiles--;
+    if (nfiles <= 1)
+	G_fatal_error(_("The min specified input map is two"));
+	
+	/****************************************/
+    ok = 1;
+    for (; *ptr1 != NULL; ptr1++) {
+	if (nfiles1 > MAXFILES)
+	    G_fatal_error(_("Too many ETa files. Only %d allowed."),
+			  MAXFILES);
+	name1 = *ptr1;
+	/* find map in mapset */
+	mapset = (char *) G_find_cell2(name1, "");
+	if (mapset == NULL) {
+	    G_fatal_error(_("Raster map <%s> not found"), name1);
+	    ok = 0;
+	}
+	if (!ok)
+	    continue;
+	infd1[nfiles1] = Rast_open_cell_old(name1, mapset);
+	if (infd1[nfiles1] < 0) {
+	    ok = 0;
+	    continue;
+	}
+	/* Allocate input buffer */
+	in_data_type1[nfiles1] = Rast_raster_map_type(name1, mapset);
+	if ((infd1[nfiles1] = Rast_open_cell_old(name1, mapset)) < 0)
+	    G_fatal_error(_("Unable to open raster map <%s>"), name1);
+	if ((Rast_get_cellhd(name1, mapset, &cellhd)) < 0)
+	    G_fatal_error(_("Unable to read file header of raster map <%s>"), name1);
+	inrast1[nfiles1] = Rast_allocate_raster_buf(in_data_type1[nfiles1]);
+	nfiles1++;
+    }
+    nfiles1--;
+    if (nfiles1 <= 1)
+	G_fatal_error(_("The min specified input map is two"));
+
+
+	/****************************************/
+    if (nfiles != nfiles1)
+	G_fatal_error(_("ETa and ETa_DOY file numbers are not equal!"));
+
+	/****************************************/
+
+    ok = 1;
+    for (; *ptr2 != NULL; ptr2++) {
+	if (nfiles > MAXFILES)
+	    G_fatal_error(_("Too many ETa files. Only %d allowed."),
+			  MAXFILES);
+	name2 = *ptr2;
+	/* find map in mapset */
+	mapset = (char *) G_find_cell2(name2, "");
+	if (mapset == NULL) {
+	    G_fatal_error(_("Raster map <%s> not found"), name2);
+	    ok = 0;
+	}
+	if (!ok)
+	    continue;
+	infd2[nfiles2] = Rast_open_cell_old(name2, mapset);
+	if (infd2[nfiles2] < 0) {
+	    ok = 0;
+	    continue;
+	}
+	/* Allocate input buffer */
+	in_data_type2[nfiles2] = Rast_raster_map_type(name2, mapset);
+	if ((infd2[nfiles2] = Rast_open_cell_old(name2, mapset)) < 0) {
+	    G_fatal_error(_("Unable to open raster map <%s>"), name2);
+	}
+	if ((Rast_get_cellhd(name2, mapset, &cellhd)) < 0) {
+	    G_fatal_error(_("Unable to read file header of raster map <%s>"), name2);
+	}
+	inrast2[nfiles2] = Rast_allocate_d_raster_buf();
+	nfiles2++;
+    }
+    nfiles2--;
+    if (nfiles2 <= 1)
+	G_fatal_error(_("The min specified input map is two"));
+
+    /* Allocate output buffer, use input map data_type */
+    nrows = G_window_rows();
+    ncols = G_window_cols();
+    outrast = Rast_allocate_raster_buf(out_data_type);
+
+   
+    /* Create New raster files */
+    if ((outfd = Rast_open_raster_new(result, 1)) < 0)
+	G_fatal_error(_("Unable to create raster map <%s>"), result);
+
+    /*******************/
+    /* Process pixels */
+    double doy[MAXFILES];
+    double sum[MAXFILES];
+
+    for (row = 0; row < nrows; row++) 
+    {
+	DCELL d_out;
+	DCELL d_ETrF[MAXFILES];
+	DCELL d[MAXFILES];
+	DCELL d1[MAXFILES];
+	DCELL d2[MAXFILES];
+	G_percent(row, nrows, 2);
+
+	/* read input map */
+	for (i = 1; i <= nfiles; i++) 
+	    if ((Rast_get_d_raster_row(infd[i], inrast[i], row)) <	0) 
+		G_fatal_error(_("Unable to read raster map <%s> row %d"), name, row);
+	
+	for (i = 1; i <= nfiles1; i++) 
+	    if ((Rast_get_d_raster_row(infd1[i], inrast1[i], row)) < 0) 
+		G_fatal_error(_("Unable to read raster map <%s> row %d"), name1, row);
+
+	for (i = 1; i <= nfiles2; i++) 
+	    if ((Rast_get_d_raster_row (infd2[i], inrast2[i], row)) < 0) 
+		G_fatal_error(_("Unable to read raster map <%s> row %d"), name2, row);
+
+	/*process the data */
+	for (col = 0; col < ncols; col++) 
+        {
+            int	d1_null=0;
+            int	d_null=0;
+	    for (i = 1; i <= nfiles; i++) 
+            {
+		    if (Rast_is_d_null_value(&((DCELL *) inrast[i])[col]))
+		    	d_null=1;
+		    else
+	                d[i] = (double)((DCELL *) inrast[i])[col];
+	    }
+	    for (i = 1; i <= nfiles1; i++) 
+            {
+		    if (Rast_is_d_null_value(&((DCELL *) inrast1[i])[col]))
+			d1_null=1;
+		    else
+	                d1[i] = ((DCELL *) inrast1[i])[col];
+	    }
+
+	    for (i = 1; i <= nfiles2; i++) 
+		    d2[i] = ((DCELL *) inrast2[i])[col];
+
+	    /* Find out the DOY of the eto image    */
+	    for (i = 1; i <= nfiles1; i++) 
+            {
+		if ( d_null==1 || d1_null==1 )
+			Rast_set_d_null_value(&outrast[col],1);	
+		else
+		{
+			doy[i] = d1[i] - etodoy+1;
+			if (Rast_is_d_null_value(&d2[(int)doy[i]]) || d2[(int)doy[i]]==0 )
+				Rast_set_d_null_value(&outrast[col],1);
+			else
+				d_ETrF[i] = d[i] / d2[(int)doy[i]];
+		} 
+	    }
+
+	    for (i = 1; i <= nfiles1; i++) 
+            {
+		/* do nothing	*/
+		if ( d_null==1 || d1_null==1)
+                {
+			/*G_message("  null value ");*/
+                }
+		else
+		{
+			DOYbeforeETa[i]=0; DOYafterETa[i]=0;
+			if (i == 1)   
+				DOYbeforeETa[i] = startperiod;
+			else
+			{
+ 				int k=i-1;
+				while (d1[k]>=startperiod )
+				{
+					if (d1[k]<0)	 // case were d1[k] is null
+						k=k-1;					
+					else
+					{
+						DOYbeforeETa[i] = 1+((d1[i] + d1[k])/2.0);
+						break;
+					}			
+				}
+
+			}
+	
+			if (i == nfiles1)  
+				DOYafterETa[i] = endperiod;
+			else
+			{
+				int k=i+1;
+				while (d1[k]<=endperiod)
+				{
+					if (d1[k]<0)   // case were d1[k] is null
+						k=k+1;
+					else
+					{
+						DOYafterETa[i] = (d1[i] + d1[k]) / 2.0;
+						break;
+	   				}					
+				}
+			}
+		}	
+	    }
+
+	    sum[MAXFILES] = 0.0;
+	    for (i = 1; i <= nfiles1; i++) 
+            {
+		if(d_null==1 || d1_null==1)
+                {
+		    /* do nothing	 */
+		} 
+                else
+                {
+			if (DOYbeforeETa[i]==0 || DOYbeforeETa[i]==0 ) 	
+                            Rast_set_d_null_value(&outrast[col],1);
+			else 
+                        {
+				bfr = (int)DOYbeforeETa[i];
+				aft = (int)DOYafterETa[i];
+				sum[i]=0.0;
+				for (j = bfr; j < aft; j++) 
+					sum[i] += d2[(int)(j-etodoy+1)];
+			}
+		}
+	    }
+	
+	    d_out = 0.0;
+	    for (i = 1; i <= nfiles1; i++)
+            {
+		if(d_null==1 || d_null==1)
+			Rast_set_d_null_value(&outrast[col],1);
+		else
+                {	
+			d_out += d_ETrF[i] * sum[i];
+		     	outrast[col] = d_out;
+		}	
+	    }
+	}
+	if (Rast_put_raster_row(outfd, outrast, out_data_type) < 0)
+	    G_fatal_error(_("Unable to write to raster map<%s>"), result);
+    }
+
+    for (i = 1; i <= nfiles; i++) {
+	G_free(inrast[i]);
+	Rast_close_cell(infd[i]);
+	G_free(inrast1[i]);
+	Rast_close_cell(infd1[i]);
+	G_free(inrast2[i]);
+	Rast_close_cell(infd2[i]);
+    }
+    G_free(outrast);
+    Rast_close_cell(outfd);
+
+    /* Color table from 0.0 to 10.0 */
+    Rast_init_colors(&colors);
+    Rast_add_color_rule(0.0, 0, 0, 0, 10.0, 255, 255, 255, &colors);
+    /* Metadata */
+    Rast_short_history(result, "raster", &history);
+    Rast_command_history(&history);
+    Rast_write_history(result, &history);
+
+    exit(EXIT_SUCCESS);
+}

+ 2 - 2
imagery/i.fft/Makefile

@@ -2,8 +2,8 @@ MODULE_TOPDIR = ../..
 
 PGM = i.fft
 
-LIBES     = $(GMATHLIB) $(GISLIB) $(RASTRLIB) $(FFTWLIB) $(MATHLIB)
-DEPENDENCIES= $(GMATHDEP) $(GISDEP) $(RASTRDEP)
+LIBES     = $(GMATHLIB) $(GISLIB) $(RASTERLIB) $(FFTWLIB) $(MATHLIB)
+DEPENDENCIES= $(GMATHDEP) $(GISDEP) $(RASTERDEP)
 
 include $(MODULE_TOPDIR)/include/Make/Module.make
 

+ 1 - 1
imagery/i.fft/main.c

@@ -37,7 +37,7 @@
 #include <stdlib.h>
 #include <math.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/gmath.h>
 #include <grass/glocale.h>
 

+ 2 - 2
imagery/i.gensig/Makefile

@@ -2,8 +2,8 @@ MODULE_TOPDIR = ../..
 
 PGM = i.gensig
 
-LIBES     = $(IMAGERYLIB) $(GISLIB) $(RASTRLIB) $(GMATHLIB)
-DEPENDENCIES= $(IMAGERYDEP) $(GISDEP) $(RASTRDEP) $(GMATHDEP)
+LIBES     = $(IMAGERYLIB) $(GISLIB) $(RASTERLIB) $(GMATHLIB)
+DEPENDENCIES= $(IMAGERYDEP) $(GISDEP) $(RASTERDEP) $(GMATHDEP)
 
 include $(MODULE_TOPDIR)/include/Make/Module.make
 

+ 1 - 1
imagery/i.gensig/alloc.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include "local_proto.h"
 
 double *vector(int nl, int nh)

+ 1 - 1
imagery/i.gensig/can_invert.c

@@ -1,6 +1,6 @@
 #include <math.h>
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include "local_proto.h"
 
 int can_invert(double **a, int n)

+ 1 - 1
imagery/i.gensig/closefiles.c

@@ -1,4 +1,4 @@
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/imagery.h>
 #include "files.h"
 

+ 1 - 1
imagery/i.gensig/covariance.c

@@ -1,6 +1,6 @@
 #include <stdlib.h>
 
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include <grass/imagery.h>
 #include <grass/glocale.h>
 

+ 1 - 1
imagery/i.gensig/eigen.c

@@ -1,5 +1,5 @@
 #include <grass/gis.h>
-#include <grass/Rast.h>
+#include <grass/raster.h>
 #include "local_proto.h"
 #include <math.h>
 double **matrix(), *vector();

+ 0 - 0
imagery/i.gensig/get_train.c


部分文件因为文件数量过多而无法显示