~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to gui/scripts/r.recode.file

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
#
3
 
############################################################################
4
 
#
5
 
# MODULE:       r.recode.file for GRASS 6
6
 
# AUTHOR(S):    Michael Barton 
7
 
# PURPOSE:      Permit use of rules in r.recode from GRASS 6
8
 
# COPYRIGHT:    (C) 2003 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
 
 
16
 
 
17
 
#%Module
18
 
#%  description: r.recode.file - Use ascii rules file to recode categories in raster map
19
 
#%  keywords: raster, recode
20
 
#%End
21
 
#%option
22
 
#% key: input
23
 
#% type: string
24
 
#% gisprompt: old,cell,raster
25
 
#% description: Name of raster map to recode
26
 
#% required : yes
27
 
#%end
28
 
#%option
29
 
#% key: output
30
 
#% type: string
31
 
#% gisprompt: old,cell,raster
32
 
#% description: Name of recoded raster map
33
 
#% required : yes
34
 
#% end
35
 
#%option
36
 
#% key: rules_file
37
 
#% type: string
38
 
#% gisprompt: old_file,file,file
39
 
#% description: ASCII file containing reclassification rules
40
 
#% required : yes
41
 
#%end
42
 
 
43
 
if  [ -z "$GISBASE" ] ; then
44
 
 echo "You must be in GRASS GIS to run this program."
45
 
 exit 1
46
 
fi   
47
 
 
48
 
if [ "$1" != "@ARGS_PARSED@" ] ; then
49
 
  exec g.parser "$0" "$@"
50
 
fi
51
 
 
52
 
eval `exec r.recode input=$GIS_OPT_INPUT output=$GIS_OPT_OUTPUT < $GIS_OPT_RULES_FILE`