WxPython-based GUI for GRASS: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
(→‎Map display window: out-dated roadmap removed)
(use == as reference section, add howto section)
Line 3: Line 3:
__TOC__
__TOC__


= Overview =
== Overview ==


* A nice summary of the progress to date, written by Jachym Cepicky:
* A nice summary of the progress to date, written by Jachym Cepicky:
Line 10: Line 10:
* [[User:Landa|Martin Landa]]: [http://gama.fsv.cvut.cz/~landa/publications/2008/gis-ostrava-08/paper/landa-grass-gui-wxpython.pdf New GUI for GRASS GIS based on wxPython] ([http://gis2008.com/indexe.html GIS Ostrava 2008], January 27-30, 2008, Ostrava, Czech Republic)
* [[User:Landa|Martin Landa]]: [http://gama.fsv.cvut.cz/~landa/publications/2008/gis-ostrava-08/paper/landa-grass-gui-wxpython.pdf New GUI for GRASS GIS based on wxPython] ([http://gis2008.com/indexe.html GIS Ostrava 2008], January 27-30, 2008, Ostrava, Czech Republic)


== Requirements ==
=== Requirements ===
   
   
* [http://svn.osgeo.org/grass/grass/trunk/gui/wxpython/README README]
* [http://svn.osgeo.org/grass/grass/trunk/gui/wxpython/README README]


== Development ==
=== Development ===


Do you want to help with the development?
Do you want to help with the development?
Line 24: Line 24:
How to get [http://trac.osgeo.org/grass/wiki/HowToContribute write access] to the GRASS SVN repository.
How to get [http://trac.osgeo.org/grass/wiki/HowToContribute write access] to the GRASS SVN repository.


= Screenshots =
== Screenshots ==


* [http://svn.osgeo.org/grass/grass-addons/screenshots/wxpython SVN]
* [http://svn.osgeo.org/grass/grass-addons/screenshots/wxpython SVN]
Line 30: Line 30:
* Various screenshots from [[:Category:WxGUI|GRASS-Wiki]]
* Various screenshots from [[:Category:WxGUI|GRASS-Wiki]]


== GNU/Linux ==
=== GNU/Linux ===


<center>
<center>
Line 46: Line 46:
</center>
</center>


== Mac OS ==
=== Mac OS ===


== MS Windows ==
=== MS Windows ===


<center>
<center>
Line 69: Line 69:
</center>
</center>


= Components =
== Components ==


== Layer Manager ==
=== Layer Manager ===


'''Status:''' prototype implemented.
'''Status:''' prototype implemented.
Line 87: Line 87:
</div>
</div>


=== Roadmap ===
==== Roadmap ====


* Implement fully-featured command prompt (search engine based on keywords, module groups, auto complete feature for module names, map names, etc.)
* Implement fully-featured command prompt (search engine based on keywords, module groups, auto complete feature for module names, map names, etc.)
** [http://swapoff.org/cly CLY module for Python]
** [http://swapoff.org/cly CLY module for Python]


== Map display window ==
=== Map display window ===


'''Status:''' prototype implemented.
'''Status:''' prototype implemented.
Line 107: Line 107:
</center>
</center>


== Module GUIs ==
=== Module GUIs ===


'''Status:''' prototype implemented.
'''Status:''' prototype implemented.
Line 138: Line 138:
[[Image:wxgrass-d-rgb.png|center|600px]]
[[Image:wxgrass-d-rgb.png|center|600px]]


== Startup GUI ==
=== Startup GUI ===


'''Status:''' prototype implemented.
'''Status:''' prototype implemented.
Line 148: Line 148:
[[Image:Wxgrass-startup.png|center|400px]]
[[Image:Wxgrass-startup.png|center|400px]]


== Location wizard ==
=== Location wizard ===


'''Status:''' prototype implemented.
'''Status:''' prototype implemented.
Line 164: Line 164:
[[Image:Wxgui-location-wizard.png|center|thumb|600px|Location wizard]]
[[Image:Wxgui-location-wizard.png|center|thumb|600px|Location wizard]]


== Cartography tools ==
=== Cartography tools ===


'''Status:''' development not started yet.
'''Status:''' development not started yet.


=== GUI for ps.map ===
==== GUI for ps.map ====


* [http://grass.osgeo.org/grass63/manuals/html63_user/ps.map.html ps.map] is a cartographic composer, intended to be a stand-alone hardcopy plot generator. It is not meant to be a '''Print''' button for the maps currently displayed in the map canvas, that will need it own controls.
* [http://grass.osgeo.org/grass63/manuals/html63_user/ps.map.html ps.map] is a cartographic composer, intended to be a stand-alone hardcopy plot generator. It is not meant to be a '''Print''' button for the maps currently displayed in the map canvas, that will need it own controls.
Line 190: Line 190:
** text labels
** text labels


==== Outputs ====
===== Outputs =====


* ps.map instructions file
* ps.map instructions file
Line 197: Line 197:
* PDF File (pstopdf? ps2pdf? GNU Ghostscript?) [PostScript tmp file]
* PDF File (pstopdf? ps2pdf? GNU Ghostscript?) [PostScript tmp file]


==== Inputs ====
===== Inputs =====


* Ability to load in saved ps.map scripts. I consider this to be a low priority, deal with it after map creation is fully functional. Start with scripts saved using the GUI, after that is working expand to load any ps.map instructions file.
* Ability to load in saved ps.map scripts. I consider this to be a low priority, deal with it after map creation is fully functional. Start with scripts saved using the GUI, after that is working expand to load any ps.map instructions file.


==== Prototype g-ps.map ====
===== Prototype g-ps.map =====
* [http://les-ejk.cz/files/programs/grass/gpsmap-0.1.2.tgz gpsmap-0.1.2.tgz]
* [http://les-ejk.cz/files/programs/grass/gpsmap-0.1.2.tgz gpsmap-0.1.2.tgz]
* [http://les-ejk.cz/tmp/gpsmap.png g-ps.map Screenshot]
* [http://les-ejk.cz/tmp/gpsmap.png g-ps.map Screenshot]
* [http://www.nabble.com/status-of-g-ps.map-tf4465835.html#a12733414 Jachym's posting]
* [http://www.nabble.com/status-of-g-ps.map-tf4465835.html#a12733414 Jachym's posting]


=== Direct printing ===
==== Direct printing ====


Implement direct printing of map canvas content using GRASS PS driver or Cairo driver.
Implement direct printing of map canvas content using GRASS PS driver or Cairo driver.
Line 223: Line 223:
* [http://www.opengeospatial.org/standards/symbol OpenGIS Symbology Encoding Implementation Specification]
* [http://www.opengeospatial.org/standards/symbol OpenGIS Symbology Encoding Implementation Specification]


== Georectifier ==
=== Georectifier ===


'''Status:''' prototype implemented.
'''Status:''' prototype implemented.
Line 236: Line 236:
</center>
</center>


== Profile Analysis Tool ==
=== Profile Analysis Tool ===


'''Status:''' prototype implemented.
'''Status:''' prototype implemented.
Line 249: Line 249:
</center>
</center>


== Vector digitizer ==
=== Vector digitizer ===


'''Status:''' prototype implemented.
'''Status:''' prototype implemented.
Line 270: Line 270:
</center>
</center>


==== Roadmap ====
===== Roadmap =====


* Implement all features available in v.digit {{done}}
* Implement all features available in v.digit {{done}}
Line 300: Line 300:
-->
-->


== Raster digitizer ==
=== Raster digitizer ===


'''Status:''' development not started yet.
'''Status:''' development not started yet.
Line 311: Line 311:
* merge with Georectifier? (i.points, i.vpoints)
* merge with Georectifier? (i.points, i.vpoints)


==== Category Labels ====
===== Category Labels =====


* Write with new r.category import tool
* Write with new r.category import tool
Line 322: Line 322:
* how to deal with FP maps & cats?
* how to deal with FP maps & cats?


== Ortho photos ==
=== Ortho photos ===


'''Status:''' development not started yet.
'''Status:''' development not started yet.
Line 328: Line 328:
* To replace i.ortho.photo and friends
* To replace i.ortho.photo and friends


== Attribute table manager ==
=== Attribute table manager ===


'''Status:''' prototype implemented.
'''Status:''' prototype implemented.
Line 343: Line 343:
[[Image:Wxgui-attribute-table-manager.png|center|thumb|600px|Attribute Table Manager]]
[[Image:Wxgui-attribute-table-manager.png|center|thumb|600px|Attribute Table Manager]]


=== Roadmap ===
==== Roadmap ====


* Rewrite and extent GRASS SQL Builder (sqlbuiler.py) -- as an extension for Attribute Table Manager
* Rewrite and extent GRASS SQL Builder (sqlbuiler.py) -- as an extension for Attribute Table Manager
* Implement some fancy features (ideas?)
* Implement some fancy features (ideas?)


== NVIZ replacement ==
=== NVIZ replacement ===


'''Status:''' under development.
'''Status:''' under development.
Line 354: Line 354:
Detailed information [[wxNVIZ]].
Detailed information [[wxNVIZ]].


== Imagery tools ==
=== Imagery tools ===


'''Status:''' development not started yet.
'''Status:''' development not started yet.


== Graphical modeller ==
=== Graphical modeller ===


'''Status:''' development not started yet.
'''Status:''' development not started yet.


= Known issues =
== Known issues ==


* See and report in trac: [http://trac.osgeo.org/grass/query?status=new&status=assigned&status=reopened&component=wxGUI&order=priority List of open issues]
* See and report in trac: [http://trac.osgeo.org/grass/query?status=new&status=assigned&status=reopened&component=wxGUI&order=priority List of open issues]
Line 368: Line 368:
* Warning "widget class `GtkPizza' has no property named `row-ending-details'", http://trac.osgeo.org/grass/ticket/204
* Warning "widget class `GtkPizza' has no property named `row-ending-details'", http://trac.osgeo.org/grass/ticket/204


= General GUI Design =
== General GUI Design ==


== Layout ==
=== Layout ===


* [http://www.wxwidgets.org/manuals/stable/wx_wxlayoutalgorithm.html wxLayoutAlgorithm]
* [http://www.wxwidgets.org/manuals/stable/wx_wxlayoutalgorithm.html wxLayoutAlgorithm]
Line 379: Line 379:
* [http://en.wikipedia.org/wiki/Single_document_interface Single document interface]
* [http://en.wikipedia.org/wiki/Single_document_interface Single document interface]


== HowTo ==


 
== Useful links ==
= Useful links =


* [http://www.poromenos.org/tutorials/python 10 minutes Python tutorial] for programmers of other languages
* [http://www.poromenos.org/tutorials/python 10 minutes Python tutorial] for programmers of other languages


= References =
== References ==


* [[User:Landa|Martin Landa]]: [http://gama.fsv.cvut.cz/~landa/publications/2008/gis-ostrava-08/paper/landa-grass-gui-wxpython.pdf New GUI for GRASS GIS based on wxPython] ([http://gis2008.com/indexe.html GIS Ostrava 2008], January 27-30, 2008, Ostrava, Czech Republic)
* [[User:Landa|Martin Landa]]: [http://gama.fsv.cvut.cz/~landa/publications/2008/gis-ostrava-08/paper/landa-grass-gui-wxpython.pdf New GUI for GRASS GIS based on wxPython] ([http://gis2008.com/indexe.html GIS Ostrava 2008], January 27-30, 2008, Ostrava, Czech Republic)

Revision as of 22:58, 20 August 2008

See also GRASS GUI and GRASS and Python.

Overview

Requirements

Development

Do you want to help with the development?

  • basic Python programming ability required
  • GUI programming experience welcomed (especially wxPython)
  • GRASS user (or better developer) experience

How to get write access to the GRASS SVN repository.

Screenshots

GNU/Linux

Start-up screen
Vector digitizer
Attribute Table Manager
Querying vector map layers (attribute data)

Mac OS

MS Windows

Start-up screen
GUI dialog d.vect
Attribute Table Manager
Running command (r.buffer)
Querying vector map layer (editable mode)

 

Components

Layer Manager

Status: prototype implemented.

The GRASS GIS Layer Manager provides an interactive graphical interface to GRASS commands. The Layer Manager includes a set of pull-down menus for all GRASS GIS functions (analysis, file I/O, GIS configuration and management), toolbar that manage display map layers in map display windows, layer tree in which map layers to display are organized, command output window and integrated command line prompt.

Roadmap

  • Implement fully-featured command prompt (search engine based on keywords, module groups, auto complete feature for module names, map names, etc.)

Map display window

Status: prototype implemented.

Each Map display window has a unique set of layers to display and region setting (zoom). The map display window includes main toolbar with basic tools including zooming, panning, data querying, simple analyse functions (measure, profile, histogram, etc.), overlay management, etc. From main toolbar are accessible additional toolbars, currently only Digitization tool is available. Under development is Georectification tool.

Module GUIs

Status: prototype implemented.

Generated from XML using --interface-description.

E.g. for d.rgb

Description:
 Displays three user-specified raster map layers as red, green, and blue overlays in the active graphics frame.

Keywords:
 display

Usage:
 d.rgb [-ox] red=name green=name blue=name [--verbose] [--quiet]

Flags:
  -o   Overlay (non-null values only)
  -x   Don't add to list of commands in monitor
 --v   Verbose module output
 --q   Quiet module output

Parameters:
    red   Name of raster map to be used for <red>
  green   Name of raster map to be used for <green>
   blue   Name of raster map to be used for <blue>

Startup GUI

Status: prototype implemented.

Start new GRASS session with

grass -wxpython

Location wizard

Status: prototype implemented.

Wizard for creating new GRASS project location based on:

  • Coordinate system
  • EPSG code
  • Georeferenced file
  • PROJ.4 string
  • XY

See also GRASS Location Wizard.

Location wizard

Cartography tools

Status: development not started yet.

GUI for ps.map

  • ps.map is a cartographic composer, intended to be a stand-alone hardcopy plot generator. It is not meant to be a Print button for the maps currently displayed in the map canvas, that will need it own controls.
  • The GUI will prepare a semi-WYSIWYG + tree menu controls which can write a ps.map control file, and then run ps.map to create PostScript and PDF output directly. Loading a ps.map control file is harder and can happen later.
  • For a start at a Tcl/Tk composer see gui/tcltk/d.m/print.tcl
see also these discussions and pyGTK prototype by Jachym Cepicky
  • Start with most important mapping instructions
    • paper
    • scale
    • maploc
    • rast
    • vects
    • grids
    • scalebar
    • mapinfo
    • text labels
Outputs
  • ps.map instructions file
  • PostScript file [ps.map instructions tmp file]
  • lpr [PostScript tmp file]
  • PDF File (pstopdf? ps2pdf? GNU Ghostscript?) [PostScript tmp file]
Inputs
  • Ability to load in saved ps.map scripts. I consider this to be a low priority, deal with it after map creation is fully functional. Start with scripts saved using the GUI, after that is working expand to load any ps.map instructions file.
Prototype g-ps.map

Direct printing

Implement direct printing of map canvas content using GRASS PS driver or Cairo driver.

Georectifier

Status: prototype implemented.

Profile Analysis Tool

Status: prototype implemented.

Vector digitizer

Status: prototype implemented.

See also GRASS Digitizing tool.

Replacement of v.digit module integrated to Map display window (Screenshots).

Vector digitizer (2008/04)
Vector digitizer (2007/11)
Vector digitizer - fill valid areas (closed boundary + centroid) (2008/07)
Vector digitizer - background raster maps with different opacity level (2008/07)
Roadmap
  • Implement all features available in v.digit
  • Back-end
    • v.edit (slow)
    • digit library
  • Implement new requested features
    • display vertices
    • animate moving vector objects by mouse
    • snap to vertex (v.edit tool=add/move/vertexmove snap=vertex)
    • snap to vector objects of background map(s) (v.edit tool=add/move/vertexmove snap=node/vertex bgmap=map)
    • unsplit (remove pseudo nodes, v.build.polylines functionality) (v.edit tool=merge) v.edit tool=merge)
    • copy features from background map (v.edit tool=copy bgmap=map)
    • query tool
      • select lines according their length (v.edit tool=select query=length thresh=value)
      • select dangles (v.edit tool=select query=dangle thresh=value)
    • z bulk-labeling (automated assignment of z coordinate to 3D lines) (v.edit tool=bulk)
    • undo
    • personalized menu
    • exit without save

Raster digitizer

Status: development not started yet.

  • r.digit (merge with v.digit?)
Probably write a front end for r.in.poly, that's all the old r.digit is.
  • d.rast.edit
Idea: get cell center coords and new values from GUI interaction, then pass those through r.in.xyz, and r.patch the new values over the top of the old map.
  • merge with Georectifier? (i.points, i.vpoints)
Category Labels
  • Write with new r.category import tool
    • Back-end component complete: r.category module is now updated to handle a rules= file and other goodies like dynamic labels
  • Read with one of r.category, r.describe, r.report, r.stats, ???
    • probably need to add a new flag to one of those to print flat "%d %s", cat, label
or read the cats/ file directly, it's already flat ascii.
  • how to deal with FP maps & cats?

Ortho photos

Status: development not started yet.

  • To replace i.ortho.photo and friends

Attribute table manager

Status: prototype implemented.

Allows:

  • To browse attribute data, perform SQL select statements
  • Modify attribute data, insert new records to attribute table, delete existing records
  • Highlight selected items in Map Display Window
  • Extract selected items into new vector map layer
  • Modify attribute table - add, drop, rename columns
  • Modify vector map layer DB connestion settings - add, remove or modify layers
Attribute Table Manager

Roadmap

  • Rewrite and extent GRASS SQL Builder (sqlbuiler.py) -- as an extension for Attribute Table Manager
  • Implement some fancy features (ideas?)

NVIZ replacement

Status: under development.

Detailed information wxNVIZ.

Imagery tools

Status: development not started yet.

Graphical modeller

Status: development not started yet.

Known issues

General GUI Design

Layout

See also

HowTo

Useful links

References