4
#% description: Displays and overlays raster map layers in the active display frame on the graphics monitor
9
#% description: Invert catlist
16
#% description: Raster map to be displayed
17
#% gisprompt: old,cell,raster
24
#% key_desc: cat[-cat]
25
#% description: List of categories to be displayed (INT maps)
32
#% key_desc: val[-val]
33
#% description: List of values to be displayed (FP maps)
40
#% key_desc: val[-val]
41
#% description: Set opacity between 0-100%
45
if [ -z "$GISBASE" ] ; then
46
echo "You must be in GRASS GIS to run this program." 1>&2
50
if [ "$1" != "@ARGS_PARSED@" ] ; then
51
exec g.parser "$0" "$@"
56
cmdfile="`g.gisenv get=GRASS_PYCMDFILE`"
58
if [ -e ${cmdfile} ] && [ -n "${cmdfile}" ]; then
61
g.message -e "GRASS_PYCMDFILE - File not found. Run p.mon"
66
eval "`echo ${GIS_OPT_MAP} | sed -e 's/^/NAME=/' -e 's/@/; MAPSET=/'`;"
70
if [ -z "${MAPSET}" ]; then
73
mapset="mapset=${MAPSET}"
78
eval "`g.findfile element=cell file=${NAME} ${mapset}`"
83
if [ -z "${GIS_OPT_CATLIST}" ]; then
86
CATLIST="${GIS_OPT_CATLIST}"
89
if [ -z "${GIS_OPT_VALLIST}" ]; then
92
VALLIST="${GIS_OPT_VALLIST}"
95
if [ -z "${GIS_OPT_OPACITY}" ]; then
98
OPACITY="${GIS_OPT_OPACITY}"
101
if [ "${GIS_FLAG_I}" -eq "1" ]; then
108
#cmd="self.map.AddRasterLayer(self, $NAME $MAPSET $CATLIST $VALLIST $INVERCATS $INVERT $OPACITY)"
110
cmd="addraster ${name} ${mapset} ${CATLIST} ${VALLIST} ${INVERT} ${OPACITY}"
113
echo "${cmd}" >> "${cmdfile}"