#!/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: List all registered raster maps in the grass sqlite database #% keywords: general, database #%End #%option #% key: type #% type: string #% description: Data type #% answer: rast #% options: rast #% required : no #%END #%option #% key: selection #% type: string #% description: The columns which should be selected #% answer: name,creator,datatype,ctime #% options: name,ctime,mtime,vtime_start,vtime_end,min,max,category_num,datatype,rows,cols,creator #% multiple: yes #% required : yes #%END #%option #% key: where #% type: string #% description: The where statement for data filtering #% answer: ctime > DATETIME('1950-01-01 10:00:00') #% required : no #%END #%option #% key: order #% type: string #% description: The order of the data #% answer: name #% options: name,ctime,mtime,vtime_start,vtime_end,min,max,category_num,datatype,rows,cols,creator #% required : no #%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 ### setup enviro vars ### eval `g.gisenv` : ${GISBASE?} ${GISDBASE?} ${LOCATION_NAME?} ${MAPSET?} source ${GISBASE}/etc/r.rast4d/globals/defines.sh echo "select $GIS_OPT_SELECTION from $GRASTER_VIEW_NAME where $GIS_OPT_WHERE order by $GIS_OPT_ORDER" echo "select $GIS_OPT_SELECTION from $GRASTER_VIEW_NAME where $GIS_OPT_WHERE order by $GIS_OPT_ORDER;" | $GRAST4D_DBM $GRAST4D_DATABASE exit 0