README 4.7 KB

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