r.recode.rules 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/sh
  2. #
  3. ############################################################################
  4. #
  5. # MODULE: r.colors.rules for GRASS 5.7
  6. # AUTHOR(S): Michael Barton
  7. # PURPOSE: Permit use of rules in r.recode from GRASS 5.7
  8. # COPYRIGHT: (C) 2004 by the GRASS Development Team
  9. #
  10. # This program is free software under the GNU General Public
  11. # License (>=v2). Read the file COPYING that comes with GRASS
  12. # for details.
  13. #
  14. #############################################################################
  15. #%Module
  16. #% description: r.recode.rules - Use rules to recode categories in raster map
  17. #%End
  18. #%option
  19. #% key: input
  20. #% type: string
  21. #% gisprompt: old,cell,raster
  22. #% description: Name of raster map to recode
  23. #% required : yes
  24. #%end
  25. #%option
  26. #% key: output
  27. #% type: string
  28. #% gisprompt: old,cell,raster
  29. #% description: Name of recoded raster map
  30. #% required : yes
  31. if [ -z "$GISBASE" ] ; then
  32. echo "You must be in GRASS GIS to run this program."
  33. exit 1
  34. fi
  35. if [ "$1" != "@ARGS_PARSED@" ] ; then
  36. exec g.parser "$0" "$@"
  37. fi
  38. exec "$GISBASE/etc/grass-xterm-wrapper" -e "$GISBASE/etc/grass-run.sh" r.recode "input=$GIS_OPT_INPUT" "output=$GIS_OPT_OUTPUT"