# # glconf.pl # # GRASSLinks config file - MOST user settings go here; # this read by glinks.pl, keep both + GL_forms in cgi-bin directory # #------------------------------------------------------------------------- # NAME: set_glvars # Sets variables needed to run GL on this web server set. # REQUIRES: Must be configured for local site. #------------------------------------------------------------------------- sub set_glvars { # Web HTML docs path $HTML_DOCS = "/home/httpd/html"; # GL contact person for email $GL_MAILTO = "mailto://coopl\@bcc.orst.edu"; # GL dies if any process takes more than $TIME_OUT seconds $TIME_OUT = 240; # HTML htdocs directory for GL files $HTML_PATH = "/glinks"; $HTML_FULLPATH = "$HTML_DOCS" . "$HTML_PATH"; # Grasslinks access log file - use for debugging $GL_ACCESS_LOG = "$HTML_FULLPATH/logs/glaccess.log"; # Directory for the many temp files created by GL; # should have cron job clean it out every hour or so #$TMP = "/home/httpd/html/glinks/tmp"; $TMP = "$HTML_FULLPATH/tmp"; # The HTML_TMP is a link from the htdocs directory to the # temp directory so that tmp gif images can be viewed in GLinks $HTML_TMP = "$HTML_PATH/tmp"; # These two temp files are the html files created during process # of this script, one of which will be returned to user $html_tmp = "$TMP/$$.out"; $error_tmp = "$TMP/$$.error"; # HTML default color background scheme $color_bg1 = "cccccc"; $color_bg2 = "ccccef"; # The name of the main grasslinks perl script $GL_ACTION = "/cgi-bin/glinks.pl"; # The name and location of accessory HTML FORMS $GL_FORMS = "/home/httpd/cgi-bin/GL_forms.pl"; # File listing info on all GL data files $GLDATA_LIST = "/home/httpd/cgi-bin/GL_list"; # GL main url or path to grasslinks index.html $GL_URL = "$HTML_PATH/index.html"; # GL Help file $GL_HELP = "$HTML_PATH/help.html"; # HTML File listing info on all GL data files $GL_MATRIX = "GL_matrix.html"; # Home directory of user under which web server runs # DELETED because web server has no home directory # $WEBHOME = "/home/nobody"; # MAX Number of simultaneous GLinks sessions $N_GL_USERS = 3; # path for some helper programs #$PBM_PATH = "$HTML_FULLPATH/progs"; $PBM_PATH = "/usr/bin"; # not used much now because webserver usually wont allow programs # to run from htmldocs: see $SCRIPT_PATH in set_GRASSvars below $ENV{PROG_PATH} = "$HTML_FULLPATH/progs"; $PROG_PATH = $ENV{PROG_PATH}; # Stuff for gif image legends ############################################ # the dummy grass raster file used to create legend gif boxes $LEGEND_RASTER = "thumbnail\@grasslinks0"; # The html directory that will contain the legend gifs $LGIF_PATH = "$HTML_PATH/legendGifs"; # The full path of the directory containing the legend gifs $LGIF_FULLPATH = "$HTML_FULLPATH/legendGifs"; # maximum number of legend categories to display $MAX_LEGEND_CATS = 24; # maximum number of legend table columns $MAX_LEGEND_COLS = 2; # size of legend gifbox in pixels $LEGEND_GIF_PSIZE = 10; ############################################ # Stuff for new legends and scalebars $scalefactor = 1; # set all valid GL operations for this script # if you have a new analysis routine add here %GL_ANALYSES = ( "display1", "ok", "display2", "ok", "display3", "ok", "report1", "ok", "report1a", "ok", "report2", "ok", "report3", "ok", "reclass1", "ok", "reclass2", "ok", "reclass3", "ok", "buffer1", "ok", "buffer2", "ok", "buffer3", "ok", "combine1", "ok", "combine2", "ok", "combine3", "ok" ); # set all valid GL projects for this script # NEW just allow entire alphabet why not %GL_PROJECTS = ( "a", "ok", "b", "ok", "c", "ok", "d", "ok", "e", "ok", "f", "ok", "g", "ok", "h", "ok", "i", "ok", "j", "ok", "k", "ok", "l", "ok", "m", "ok", "n", "ok", "o", "ok", "p", "ok", "q", "ok", "r", "ok", "s", "ok", "t", "ok", "u", "ok", "v", "ok", "w", "ok", "x", "ok", "y", "ok", "z", "ok" ); # GL Header - set header for all GL html files # used in the subroutine begin_html $GL_HEADER = "\"GRASSLinks\"3.2b at OSU "; } #------------------------------------------------------------------------- # NAME: set_GRASSvars # Sets variables specific to GRASS as it runs under GL. # REQUIRES: Must be configured for local site. #------------------------------------------------------------------------- sub set_GRASSvars { $ENV{GISBASE} = "/usr/local/grass5"; #$ENV{GISDBASE} = "/usr/local/data"; $ENV{GISDBASE} = "/home2/data"; $ENV{LOCATION_NAME} = $project{location}; # NEW!! Location from GL_list $ENV{ETC} = "$ENV{GISBASE}/etc"; $ENV{PATH} = "$ENV{GISBASE}/bin:$ENV{GISBASE}/scripts:$ENV{GISBASE}/garden/bin:/usr/bin:/usr/local/bin:/bin"; $GISBASE = $ENV{GISBASE}; $GISDBASE = $ENV{GISDBASE}; $LOCATION_NAME = $ENV{LOCATION_NAME}; $ETC = $ENV{ETC}; $PATH = $ENV{PATH}; $SCRIPT_PATH = "$GISBASE/scripts"; # the color table for the dummy raster used for gif boxes $LEGEND_COLR_TABLE = "$GISDBASE/$LOCATION_NAME/grasslinks0/colr/thumbnail"; $DEFAULT_REGION = $project{region}; #project dependent $DEFAULT_MAP_TITLE = "GRASSLinks Map"; # for map title $DEFAULT_SITELABELS = "no"; # for sites $DEFAULT_COLOR = "black"; # for vector and site maps $DEFAULT_SSIZE = "1"; # size of marker for site maps %siteform = ""; # global hash of siteslayer_name=>siteform_name $DEFAULT_GIFSIZE = 500; # for vector and site maps }