GRASS GIS

Starting GRASS - there are a few different ways to start GRASS:

- Double-click GRASS.app.

- Drag a mapset folder onto GRASS.app to start GRASS in that mapset.

- In a Terminal, type (the mapset path is optional):

open -a "GRASS-6.4.app" {/path/to/db/location/mapset}

GRASS.app opens a Terminal window to start GRASS in the normal commandline way.  After starting the Terminal it quits, leaving GRASS running in the Terminal.  While a GRASS session is running you can run GRASS.app again to start another session.

On Panther and Tiger, X11 is also started regardless of the GUI you use.  On Leopard and above, X11 is started by the system when it's needed.

Setup

See GRASS documentation for details on setup and use.  See Apple's Help Viewer (from most any application's Help menu) for command documentation.

If you have used GRASS before, it will pick up your preferences for GUI/Text, so you should make sure they are set correctly. So if the GUI doesn't start, check your GRASS_GUI setting.

Note: if you use the Apple default bash shell, make sure you don't have a .cshrc init hanging around.  This could be from a previous version of OS X, or installed software might add one for some reason.  Some commands might not run correctly if this file exists, yet you are using bash, so delete it if it exists.

If you don't like the xterm that opens when you start X11 (you don't need it since GRASS runs in Terminal.app), do the following:

On Panther or Tiger, edit /etc/X11/xinit/xinitrc and near the bottom add a # to the beginning of the xterm & line.

On Leopard and above, type this in a Terminal:

defaults write org.x.X11_launcher app_to_run /usr/X11/bin/xlsclients

Something must be set for app_to_run, or X11 will not function properly, and xlsclients is regarded as safe and inconspicuous.

After running GRASS the first time, you can change your preference for whether the GUI or Terminal-only starts by using g.gisenv.

g.gisenv set="GRASS_GUI=val"

Where val is 'wxpython' or 'tcltk' for the GUI or 'text' for a plain Terminal.

R

Using R with GRASS.app needs a bit of simple setup.  Install R for Mac OS X, at least v2.3.0.  Install the GDAL R package from the GDAL framework (there are install instructions included with that), not from a repository.  Remember to use a user level install location for extra packages.

Next, install the maptools package from CRAN binary repository with the R.app Package Installer.

Finally, use the Package Installer to install the spgrass6 package from the CRAN source repository.

See the GRASS stats page for info on how to use R with GRASS.

MPEG

There are a few different ways to create animations in GRASS.  xganim animates a series of rasters on the fly, and is useful for a quick check of an animation, but it requires Motif or Lesstif in X11 and this package may not include it.  There is a TclTk version of xganim in the TclTk GUI.

The OGSF GRASS library can be built with mpeg support using the ffmpeg libraries, this is used only in NVIZ.  ffmpeg is a difficult one to build on any platform because it is in constant flux, and none of the binaries available include the libraries.  Without ffmpeg, NVIZ can only generate a series of images which can then be run through any mpeg program.  This package may have ffmpeg support.

The last option built into GRASS, r.out.mpeg, starts with rasters and generates an mpeg1 video using an external program mpeg-encode (aka ppmtompeg).  The two problems with this are: mpeg1 is low quality, and you can't use it on an NVIZ image sequence, just rasters.  A copy of ppmtompeg may be included in the GRASS application package.

There is also a completely external option.  There are many mpeg encoding programs available.  Pick one of your choice and feed the NVIZ image sequence to that outside of GRASS.  ffmpegX is a handy package ready-made for Mac OS X.  It includes commandline binaries for ffmpeg AND many other encoders, including the popular mencoder.  You can either use the GUI, or run them from the Terminal - all the individual programs are in the app package's Resources folder, except a couple external ones in the ffmpegX Application Support.

GPS

A copy of gpsbabel may be included for v.in.gpsbabel to use.  If not, you need to install a separate GPSBabel application.  Serial ports (both old-style and USB) on OS X are named a little different than most 'nix systems, and they will all go thru USB, including old RS-232 serial.  You need to use the cu.* ports.  All ports are in /dev.

Old RS-232 serial will have to go thru a Serial-USB converter, like the Keyspan USA-19W.  These will usually have a name like USA19QW3d1P1.1, or /dev/cu.USA19QW3d1P1.1.

To figure out your GPS port, you can try the following.  With the GPS (including a serial-USB adaptor, if needed for your GPS) not connected, type this in a Terminal:

ls /dev/cu.*

Then connect the GPS (with the serial-USB adaptor, if needed), and type that ls command again.  Note what was added, that should be the port to use (with /dev/ prefixed to it).

© 2006-2008 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2).

- William Kyngesburye
kyngchaos@kyngchaos.com
http://www.kyngchaos.com/