README 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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 2007.0: http://mpa.itc.it/markus/wxpython_rpms/mandriva2007.0/
  17. * Mandriva 2007.1 (spring): available from main/backports (see
  18. http://club.mandriva.com/xwiki/bin/view/Downloads/MirrorFinder2 )
  19. Also http://www.wxpython.org/download.php
  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. 2 - STARTUP WITH GRASS INITIALIZATION
  41. If you want to launch wxPython GUI automatically when you start
  42. GRASS, edit your .grassrc6 file to replace
  43. GRASS_GUI: tcktk (or whatever you have here)
  44. with
  45. GRASS_GUI: wxpython
  46. or easier start new GRASS session with -wxpython switch.
  47. $ grass63 -wxpython
  48. 3 - STARTUP FROM GRASS TERMINAL
  49. Simply run
  50. $ g.gui wxpython
  51. from the GRASS terminal.
  52. You can also specify workspace file to load on startup.
  53. $ g.gui gui=wxpython workspace=myworkspace.gxw
  54. 4 - CLI Display scripts
  55. Note: This section is out-dated!
  56. This is going to be replacement for command line tools like d.rast and
  57. d.vect.
  58. Now add directory "scripts" in gui directory to your $PATH. These
  59. little programs should later go to GRASS Scripts directory or became
  60. Python scripts or C programs. Now they are only small BASH wrappers
  61. which can be easily and fast customized.
  62. $~ export PATH=scripts/:$PATH
  63. Start GRASS:
  64. $~ grass63 ~/grassdata/spearfish60/user1
  65. Use command p.mon (shell script in gui/scripts directory) to start map
  66. display:
  67. GRASS> p.mon anything
  68. After a while, new window should appear. If this is your case, add some
  69. raster layer to the map display:
  70. GRASS> p.rast aspect
  71. What about a bit transparency?
  72. GRASS> p.rast elevation.dem opacity=0.5
  73. And try the vector layer too
  74. GRASS> p.vect roads
  75. NOTE: only map name is currently supported. No other option will influence
  76. the map layout
  77. Alternatively you can use more universal p.cmd:
  78. GRASS> p.cmd "d.rast map=elevation.dem@PERMANENT catlist=1300-1400 -i"
  79. You should be able to zoom && pan through the map, once the layers are
  80. displayed. You should be also able to store the display content as well as
  81. clear the display and start from scratch.
  82. 5 - DEBUGGING
  83. To enable GUI debug messages on given level set GRASS_DEBUG_WX
  84. environment variable, e.g.
  85. $ export GRASS_WX_DEBUG=3
  86. 6 - ICON THEMES
  87. Currently two icon themes are available:
  88. * original GRASS (based on TCL/TK GUI prototype)
  89. * Silk-based (default)
  90. User can change icon theme in Preferences dialog
  91. ('Config->Preferences').
  92. 7 - DIGITIZATION TOOL
  93. To enable digitizer you need to compile 'vdigit'
  94. component. Note that you must configure GRASS with C++ (--with-cxx),
  95. Python (--with-python) and wxWidgets (--with-wxwidgets) support.
  96. NOTE: There is no need to do the following symlink or ldconfig on OSX.
  97. First, create a symlink to _gdi_.so shared library
  98. $ sudo ln -s `locate _gdi_.so` /usr/local/lib/libgdi.so
  99. e.g.
  100. $ sudo ln -s /usr/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/_gdi_.so /usr/local/lib/libgdi.so
  101. Then update LD_LIBRARY_PATH or add '/usr/local/lib' to /etc/ld.so.conf
  102. (in this case run 'sudo ldconfig').
  103. TODO: Don't use direct linking here.
  104. Then you can compile the driver
  105. $ cd gui/wxpython/vdigit
  106. $ make