README 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. wxPython GRASS Graphical User Interface
  2. =======================================
  3. $Date$
  4. 1 - REQUIREMENTS
  5. GRASS GIS >= 6.3
  6. Python >= 2.4 (Python 3 not supported)
  7. Python ElementTree (only for Python <= 2.4)
  8. wxPython >= 2.8.1.1 (wxPython <= 2.8.9.2 requires swig <= 1.3.36)
  9. swig >= 1.3.31 (required only for vector digitizer)
  10. NumPy >= 1.0.4
  11. Get wxPython 2.8.x packages from:
  12. * Source: http://www.wxpython.org/download.php
  13. * Debian GNU/Linux: http://wiki.wxpython.org/InstallingOnUbuntuOrDebian
  14. [ deb http://apt.wxwidgets.org/ etch-wx main ]
  15. http://www.bitpim.org/developer.html -> "Install wxPython"
  16. * Fedora: http://www.wxpython.org/download.php
  17. * Mandriva: included in main distribution
  18. * OpenSuSe: http://download.opensuse.org/repositories/Application:/Geo/
  19. * Ubuntu: deb http://wxpython.wxcommunity.com/apt/ubuntu/dapper /
  20. deb http://wxpython.wxcommunity.com/apt/ubuntu/feisty /
  21. * MacOSX: http://www.wxpython.org/download.php
  22. * MS-Windows: http://www.wxpython.org/download.php
  23. Get Python from:
  24. * Python.org for Source, MS-Windows, OS X: http://www.python.org/download/
  25. * ActiveStates for AIX, HP-UX, Linux (x86), Linux 64-bit (x86_64 AMD64), Mac OS X,
  26. Solaris (SPARC), Windows:
  27. http://www.activestate.com/store/download.aspx?prdGUID=b08b04e0-6872-4d9d-a722-7a0c2dea2758
  28. E.g. On Debian GNU/Linux install these packages:
  29. apt-get install libwxbase2.8-0 libwxbase2.8-dbg libwxbase2.8-dev \
  30. libwxgtk2.8-0 libwxgtk2.8-dbg libwxgtk2.8-dev \
  31. python-wxgtk2.8 wx2.8-doc wx2.8-examples \
  32. wx2.8-headers wx2.8-i18n python-numpy
  33. On Mandriva 2009 GNU/Linux, install these packages:
  34. urpmi lib64wxgtk2.8 lib64wxgtk2.8-devel lib64wxgtkgl2.8 wxgtk2.8 \
  35. lib64wxPythonGTK2.8 lib64wxPythonGTK2.8-devel wxPythonGTK wxPythonGTK-wxversion
  36. MS-WINDOWS ONLY REQUIREMENTS
  37. Python Extensions for MS-Windows >= Build 210
  38. Get Python Extensions for MS-Windows from:
  39. http://sourceforge.net/project/platformdownload.php?group_id=78018
  40. Get NumPy from:
  41. http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103
  42. 2 - STARTUP WITH GRASS INITIALIZATION
  43. If you want to launch wxPython GUI automatically when you start
  44. GRASS, edit your .grass7/rc file to replace
  45. GRASS_GUI: tcltk (or whatever you have here)
  46. with
  47. GRASS_GUI: wxpython
  48. or easier start new GRASS session with -wxpython switch.
  49. $ grass70 -wxpython
  50. 3 - STARTUP FROM GRASS TERMINAL
  51. Simply run
  52. $ g.gui wxpython
  53. from the GRASS terminal.
  54. You can also specify workspace file to load on startup.
  55. $ g.gui gui=wxpython workspace=myworkspace.gxw
  56. 4 - CLI Display scripts
  57. Note: This section is out-dated!
  58. This is going to be replacement for command line tools like d.rast and
  59. d.vect.
  60. Now add directory "scripts" in gui directory to your $PATH. These
  61. little programs should later go to GRASS Scripts directory or became
  62. Python scripts or C programs. Now they are only small BASH wrappers
  63. which can be easily and fast customized.
  64. $~ export PATH=scripts/:$PATH
  65. Start GRASS:
  66. $~ grass70 ~/grassdata/spearfish60/user1
  67. Use command p.mon (shell script in gui/scripts directory) to start map
  68. display:
  69. GRASS> p.mon anything
  70. After a while, new window should appear. If this is your case, add some
  71. raster layer to the map display:
  72. GRASS> p.rast aspect
  73. What about a bit transparency?
  74. GRASS> p.rast elevation.dem opacity=0.5
  75. And try the vector layer too
  76. GRASS> p.vect roads
  77. NOTE: only map name is currently supported. No other option will influence
  78. the map layout
  79. Alternatively you can use more universal p.cmd:
  80. GRASS> p.cmd "d.rast map=elevation.dem@PERMANENT catlist=1300-1400 -i"
  81. You should be able to zoom && pan through the map, once the layers are
  82. displayed. You should be also able to store the display content as well as
  83. clear the display and start from scratch.
  84. 5 - DEBUGGING
  85. To enable GUI debug messages on given level set GRASS_DEBUG_WX
  86. environment variable, e.g.
  87. $ export GRASS_WX_DEBUG=3
  88. 6 - EXTENSIONS - VECTOR DIGITIZER AND 3D VIEWER
  89. To enable digitizer you need to compile 'vdigit' or 'nviz'
  90. component. Note that you must configure GRASS with C++ (--with-cxx),
  91. Python (--with-python) and wxWidgets (--with-wxwidgets) support.