Martin Landa 69c2771227 wxGUI: clean up utils.ListOfMapsets() 15 years ago
..
compat b671e428c5 parse docstrings by doxygen 16 years ago
docs 887ca66ce8 wxGUI: document prompt key shortcuts 15 years ago
gui_modules 69c2771227 wxGUI: clean up utils.ListOfMapsets() 15 years ago
icons e07098f492 wxGUI: remove redundancy from icon files 15 years ago
images 5e6bb6afda finish file rename 15 years ago
nviz 4b2c2b4f24 etc/wxpython -> etc/gui/wxpython 15 years ago
scripts dc584a3c8a Merge with devbr6, but spgrass6 not working, so the module is still broken. 15 years ago
support 7ffd1bebc6 fix update menudata support script 15 years ago
vdigit a229c00df4 Use only versioned library names 15 years ago
xml 90fdbba8e0 wxGUI/modeler: various minor fixes 15 years ago
Makefile 03c30ad488 Convert wxGUI NVIZ module to Python 15 years ago
README 6c2e2e888f first steps towards config dir (.grass7) 15 years ago
build_ext.py 44f32dc891 Don't try to parse *.make files; use environment variables 16 years ago
gis_set.py 90c164da18 wxGUI: class names sychronized (Help*) 15 years ago
gis_set_error.py 83fd10dfd0 show error dialog when wxGUI is used 15 years ago
wxgui.py 2e8c922d7b wxGUI: more fixes for wxPython 2.8.11 15 years ago
wxpythonlib.dox 5599ac8fc0 doxygen fix 16 years ago

README

wxPython GRASS Graphical User Interface
=======================================

$Date$

1 - REQUIREMENTS

GRASS GIS >= 6.3
Python >= 2.4 (Python 3 not supported)
Python ElementTree (only for Python <= 2.4)
wxPython >= 2.8.1.1 (wxPython <= 2.8.9.2 requires swig <= 1.3.36)
swig >= 1.3.31 (required only for vector digitizer)
NumPy >= 1.0.4

Get wxPython 2.8.x packages from:
* Source: http://www.wxpython.org/download.php
* Debian GNU/Linux: http://wiki.wxpython.org/InstallingOnUbuntuOrDebian
[ deb http://apt.wxwidgets.org/ etch-wx main ]
http://www.bitpim.org/developer.html -> "Install wxPython"
* Fedora: http://www.wxpython.org/download.php
* Mandriva: included in main distribution
* OpenSuSe: http://download.opensuse.org/repositories/Application:/Geo/
* Ubuntu: deb http://wxpython.wxcommunity.com/apt/ubuntu/dapper /
deb http://wxpython.wxcommunity.com/apt/ubuntu/feisty /

* MacOSX: http://www.wxpython.org/download.php
* MS-Windows: http://www.wxpython.org/download.php

Get Python from:
* Python.org for Source, MS-Windows, OS X: http://www.python.org/download/
* ActiveStates for AIX, HP-UX, Linux (x86), Linux 64-bit (x86_64 AMD64), Mac OS X,
Solaris (SPARC), Windows:
http://www.activestate.com/store/download.aspx?prdGUID=b08b04e0-6872-4d9d-a722-7a0c2dea2758

E.g. On Debian GNU/Linux install these packages:
apt-get install libwxbase2.8-0 libwxbase2.8-dbg libwxbase2.8-dev \
libwxgtk2.8-0 libwxgtk2.8-dbg libwxgtk2.8-dev \
python-wxgtk2.8 wx2.8-doc wx2.8-examples \
wx2.8-headers wx2.8-i18n python-numpy

On Mandriva 2009 GNU/Linux, install these packages:
urpmi lib64wxgtk2.8 lib64wxgtk2.8-devel lib64wxgtkgl2.8 wxgtk2.8 \
lib64wxPythonGTK2.8 lib64wxPythonGTK2.8-devel wxPythonGTK wxPythonGTK-wxversion


MS-WINDOWS ONLY REQUIREMENTS

Python Extensions for MS-Windows >= Build 210

Get Python Extensions for MS-Windows from:
http://sourceforge.net/project/platformdownload.php?group_id=78018
Get NumPy from:
http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103


2 - STARTUP WITH GRASS INITIALIZATION

If you want to launch wxPython GUI automatically when you start
GRASS, edit your .grass7/rc file to replace

GRASS_GUI: tcltk (or whatever you have here)

with

GRASS_GUI: wxpython

or easier start new GRASS session with -wxpython switch.

$ grass70 -wxpython


3 - STARTUP FROM GRASS TERMINAL

Simply run

$ g.gui wxpython

from the GRASS terminal.

You can also specify workspace file to load on startup.

$ g.gui gui=wxpython workspace=myworkspace.gxw


4 - CLI Display scripts

Note: This section is out-dated!

This is going to be replacement for command line tools like d.rast and
d.vect.

Now add directory "scripts" in gui directory to your $PATH. These
little programs should later go to GRASS Scripts directory or became
Python scripts or C programs. Now they are only small BASH wrappers
which can be easily and fast customized.

$~ export PATH=scripts/:$PATH

Start GRASS:

$~ grass70 ~/grassdata/spearfish60/user1

Use command p.mon (shell script in gui/scripts directory) to start map
display:

GRASS> p.mon anything

After a while, new window should appear. If this is your case, add some
raster layer to the map display:

GRASS> p.rast aspect

What about a bit transparency?

GRASS> p.rast elevation.dem opacity=0.5

And try the vector layer too

GRASS> p.vect roads

NOTE: only map name is currently supported. No other option will influence
the map layout

Alternatively you can use more universal p.cmd:

GRASS> p.cmd "d.rast map=elevation.dem@PERMANENT catlist=1300-1400 -i"

You should be able to zoom && pan through the map, once the layers are
displayed. You should be also able to store the display content as well as
clear the display and start from scratch.


5 - DEBUGGING

To enable GUI debug messages on given level set GRASS_DEBUG_WX
environment variable, e.g.

$ export GRASS_WX_DEBUG=3


6 - EXTENSIONS - VECTOR DIGITIZER AND 3D VIEWER

To enable digitizer you need to compile 'vdigit' or 'nviz'
component. Note that you must configure GRASS with C++ (--with-cxx),
Python (--with-python) and wxWidgets (--with-wxwidgets) support.