#!/bin/sh

############################################################################
#
# MODULE:       nviz
# PURPOSE:      3D visualization and query of GRASS data
# COPYRIGHT:    (C) 2003,2005 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.
#############################################################################

## template generated 'with nviz --script'
#%Module
#% description: nviz - Visualization and animation tool for GRASS data.
#% keywords: raster, vector, visualization
#%End
#%Flag
#% key: q
#% description: Quickstart - Do not load any data
#%End
#%Flag
#% key: k
#% description: Exit after completing script launched from the command line
#%End
#%Flag
#% key: x
#% description: Start in Demo mode (skip the "please wait" message)
#%End
#%Flag
#% key: v
#% description: Verbose module output (default=quiet)
#%End
#%Option
#% key: elevation
#% type: string
#% required: no
#% multiple: yes
#% key_desc: name
#% description: Name of raster map(s) for Elevation
#% gisprompt: old,cell,raster
#% guisection: Raster
#%End
#%Option
#% key: color
#% type: string
#% required: no
#% multiple: yes
#% description: Name of raster map(s) for Color
#% gisprompt: old,cell,raster
#% guisection: Raster
#%End
#%Option
#% key: vector
#% type: string
#% required: no
#% multiple: yes
#% description: Name of vector lines/areas overlay map(s)
#% gisprompt: old,vector,vector
#% guisection: Vector
#%End
#%Option
#% key: points
#% type: string
#% required: no
#% multiple: yes
#% description: Name of vector points overlay file(s)
#% gisprompt: old,vector,vector
#% guisection: Vector
#%End
#%Option
#% key: volume
#% type: string
#% required: no
#% multiple: yes
#% description: Name of existing 3d raster map
#% gisprompt: old,grid3,3d-raster
#% guisection: Raster
#%End
#%Option
#% key: path
#% type: string
#% required: no
#% multiple: no
#% description: Set alternative panel path
#%End
#%Option
#% key: script
#% type: string
#% required: no
#% multiple: no
#% description: Execute script file at startup
#%End
#%Option
#% key: state
#% type: string
#% required: no
#% multiple: no
#% description: Load previously saved state file
#%End


if [ $# -eq 0 ] ; then
  ##nviz is opened in GUI
  exec "$GISBASE/etc/nviz2.2/nviz" -f "$GISBASE/etc/nviz2.2/scripts/nviz2.2_script"
  exit 0
fi

exec "$GISBASE/etc/nviz2.2/nviz" -f "$GISBASE/etc/nviz2.2/scripts/nviz2.2_script" -- ${1+"$@"}
