README 4.3 KB

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