README 4.4 KB

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