- Discussion about the suitability of the proposed change on the talk side of this wiki page; discussion of the possible method on this side of the page.
Hi all!
That rather radical ideas I present here are rather for future, at least for GRASS 8,
but I'd like present it now for long-term reflection.
Probably all notice that for over two years there is big increase in add-on repository
(including me). There are modules of different quality: from fully GRASS toolsets,
to shell or python scripts, from actively developed tools to abandoned,
from all-purpose tools to very specialized etc. I also think that that activity
will be grown due to substitute shell script by python
Similar situation is in main GRASS branch: there are modules for all like conversion tools,
interpolation methods, georeferencing etc, and very specialized modules for very limited
group of users (like wild fire), there are also some modules out of date.
I'm not enthusiastic about moving new modules into main branch. Almost every module has
different coding style and it will lasting in future that GRASS would be difficult to maintain.
On the other hand some people complains that some interesting modules are only available as
add-ons (I assume for some reasons they cannot install it)
So my suggestion is to rearrange future GRASS form two layers (main branch/add-on) into
three layers architecture:
1) GRASS core layer: much limited limited than now, only GIS environment and basic,
all-puropse tools, slow changes, great stability
2) GRASS toolset layer: oficcial GRASS thematic tools and toolsets (like terrain analysis,
hydrological analysis, photo-interpretation, landscape analysis etc,) every toolset with its
maintainer, rapid development, new ready to use tools after quality control may appear here,
also some of current main branch tool shall be moved to that layer
3) GRASS community layer: everything else like experimental, actively development new tools,
that what do not pass quality control, simple scripts, etc....
What benefits:
for developers and contributors: much clear situation and better publication path.
Toolset layer should be much more open for new tools than current GRASS main branch
for users: faster access to new tools.
There is no doubt that new tools are faster developed (less risk) than GRASS core
Binaries with toolsets could be maintained as separate apt/urpmi/pacman/yum/exe etc packages,
so it may appear in linux repository separetly form GRASS core.
There is only loose ideas. Most of them are of course taken from R (core/toolsets/rest of packages;
separate core and package development) but I think it is worth of some discuss ...
regards
Jarek
Repository layout
Current repository layout
- grass
|- trunk
|- raster/
|- vector/
|- ...
- grass-addons
|- raster/
|- vector/
|- ...
Proposed repository layout
- grass
|- trunk
|- raster/
|- vector/
|- ...
- grass-tools
|- trunk
|- raster/
|- vector/
|- ...
- grass-addons
|- raster/
|- vector/
|- ...
Proposed toolboxes
Toolbox is a topic-based set of modules used for solving common GIS analysis, like hydrology, networking, LRS, etc.
Managing toolboxes
g.extension is designed to manage locally installed GRASS Addons. It allows to install single addons modules and also toolboxes (flag -t
). Note that toolbox support is experimental.
g.extension -tl
List of available extensions (toolboxes):
Hydrology (HY)
* r.stream.basins
* r.stream.channel
* r.stream.distance
* r.stream.extract
* r.stream.order
* r.stream.segment
* r.stream.slope
* r.stream.snap
* r.stream.stats
...
- list available modules from Addons
g.extension -l
List of available extensions (modules):
...
r.stream.slope
...
- install new toolbox ("Hydrology")
g.extension -t extension=HY
- install single module from "Hydrology" toolbox
g.extension extension=r.stream.slope
Module g.extension also allows to list installed extensions
g.extension -ta
List of installed extensions (toolboxes):
HY
g.extension -a
List of installed extensions (modules):
r.stream.basins
r.stream.channel
r.stream.distance
r.stream.extract
r.stream.order
r.stream.segment
r.stream.slope
r.stream.snap
r.stream.stats
- remove locally installed toolbox
g.extension -ft extension=HY operation=remove
g.extension -f extension=r.stream.slope operation=remove
List of toolboxes
Toolbox name |
Toolbox code |
Description |
Correlate toolbox
|
3D Raster
|
R3
|
All `r3.*` modules
|
|
3D Visualization
|
V3
|
nviz_cmd
|
|
Atmospheric tools
|
AT
|
Subset of image processing tool
|
|
Cartography
|
CA
|
ps.map, ps.output
|
|
Database
|
DB
|
All `db.*` modules
|
Vector analysis
|
Geostatistcal
|
GS
|
v.krige maybe other
|
|
GUI
|
GI
|
wxGUI
|
|
Hydrology
|
HY
|
r.watershed, r.terraflow, `r.stream.*` modules in addons, maybe other, r.flow, r.sim.water, r.sim.sediment
|
Raster analysis
|
Image Processing
|
IM
|
All `i.*` modules, selected r.* modules
|
|
Interoperability tools
|
IO
|
All the various import/export modules except for GDAL/OGR
|
Raster analysis, Vector analysis, Image Processing, Database
|
Landscape analysis
|
LA
|
All `r.li.*` modules, maybe other
|
Raster analysis
|
Lidar analysis
|
LI
|
All `v.lidar.*` modules, v.surf.bspline, r.in.xyz
|
|
Linear Reference Systems
|
LS
|
All `v.lrs.*` modules
|
Vector analysis
|
Network analysis
|
NA
|
All `v.net.*` modules, maybe other
|
Vector analysis
|
Raster analysis
|
RA
|
A lot of basic `r.*` modules (like r.buffer, r.reclass, r.fillnull...)
|
|
Terrain analysis
|
TA
|
Different kind of analysis: soil (r.sun,), terrain (r.slope.aspect, r.los), geomorphometry (r.param.scale)
|
Raster analysis
|
Vector analysis
|
VA
|
A lot of basic `v.*` modules (like v.buffer, v.centroid, v.overlay...)
|
Database
|
List of modules (trunk)
Display
Database
General
Imagery
Misc
Postscript
Module |
Core/Tools/Addons |
Toolbox(es)
|
ps.map |
C |
|
Raster
3D raster (voxel)
Vector
Various
List of selected AddOns modules
See GRASS AddOns for full list of available modules. Feel free to extend this list.
How to implement
Proposal 1
- add html tag <param> in the description.html with these options:
<param name = "core"> for core module
<param name = "tool" value="tool_code/codes"> for toolbox
<param name = "addons" [value="tool_code/codes"]> for addons, value is optional
- create a script to generate a xml file for each toolbox
- add toolbox option in g.extension to read the xml and install the modules
Proposal 2
- modules (currently only Addons) are described (name, description, keywords, files) in metadata XML file called modules.xml
- similarly toolboxes are described (name, code, correlate modules, list of modules) in toolboxes.xml
g.extension reads (from remote server http://grass.osgeo.org/addons/grass7) modules.xml when listing available modules (-l), and toolboxes.xml when listing available toolboxes (-lt). When installing toolbox using g.extension the module reads toolboxes.xml and installs in the loop given list of modules. When all modules are installed it also updates local metadata files - GRASS_ADDON_BASE/modules.xml and GRASS_ADDON_BASE/toolboxes.xml. These local metadata files are checked when listing locally installed toolboxes or single modules (-a or -ta).
Proposal 3
Use a modified version of pip (a tool for installing and managing Python packages)
With Pip you can add/change repository, compile C/Fortran module, manage dependencies, install from some version control system (use
URLs like hg+http://domain/repo -- or prefix git+, svn+ etc), and using virtualenv