Friday, March 28, 2008

How to set console environment in JGrass (Update1)

Following JGrass development some of you asked to me to update the post regarding the GRASS settings of the console environment in JGrass.
So from the last post in this field the options are less and the preferences are summarized in the following panel, as shown in the picture below.



Just fill in the blank of the main options if they are not set by default:
  1. MAPSET: the path of the mapset on which to work
  2. GRASS: the path to the GISBASE
All the other preferences are optional.

NOTE: The GISBASE is the folder in which there is the GRASS installation and it is different from the operating system and the installation type the user has done. To better simplify the things this is the folder in which there are the two main GRASS installation folders bin and lib.
This is valid in case of the user has a valid GRASS installation, and mainly for linux and mac users. For windows users there is the included GRASS executable in the JGrass plugins. By default the field of GRASS options in the preferences panel is completed with the right path, if not here the user has to write the path of the folder, in the plugins, containing the grass installation. In general it is: ... pathtoJGrassinstallationfolder\plugins\eu.hydrologis.jgrass.grass_1.0.0\windows\grass\grass\.

In addition at the windows preferences for the console the user has to set also the runtime Console preferences. The menu, shown below, is visible just right clicking on the console window and for GRASS commands the only important field is the MAPSET definition.


At this time the console environment is ready to use for GRASS commands. For example typing
  • grass r.info adige_pit
  • grass r.in.gdal --help
  • and so on...
Some nice hints to use the console editor:
  1. to run all the commands written in the console editor just right click and run
  2. to run only a selection of the written text, simply select the whole command to run and the right click and run
  3. it is possible to have some hinst form JGrass for writing the command, just wait a second after typing the "." in the commands names and after the "--" in the options.



Hope this helps the users in GRASS settings and command executing.

Hope also the develpers will not change this preferences again... :-) it will be not so exiting writing thousand post on the same topic... :-)

1 comment:

moovida said...

Well done Silli!
Oh, and btw, you should edit the old post instead of creating a new one, since for sure developers will change this sooner or later... they are so bored :P