#!/bin/sh ############################################################################ # # AUTHOR(S): Soeren Gebbert soerengebbert gmx de # PURPOSE: grass temporal data management # COPYRIGHT: (C) 2007 by the GRASS Development Team # # This program is free software under the GNU General Public # License (>=v2). Read the file COPYING that comes with GRASS # for details. # ############################################################################# #%Module #% description: Register or Update raster maps in the grass sqlite database #% keywords: raster, database #%End #%option #% key: input #% type: string #% gisprompt: old,cell,raster #% description: Raster map to register or update #% required : yes #% multiple: yes #%END #Only run if started in GRASS if [ -z "$GISBASE" ] ; then echo "You must be in GRASS GIS to run this program." exit 1 fi #Parse the arguments, if g.parser not work, skip the test's if [ "$1" != "@ARGS_PARSED@" ] ; then exec g.parser "$0" "$@" if [ $? -ne 0 ] ; then echo "g.parser failed, no Test available" exit 1 fi fi # source some library functions ### setup enviro vars ### eval `g.gisenv` : ${GISBASE?} ${GISDBASE?} ${LOCATION_NAME?} ${MAPSET?} source ${GISBASE}/etc/r.rast4d/lib/remove_raster.sh # remove the table entries for i in `echo $GIS_OPT_INPUT | sed s/,/\ /g | xargs` ; do remove_raster_map $i remove_raster_map_metadata $i remove_raster_map_time $i # do not really remove the raster maps # g.remove rast=$i done exit 0