[Qgis-developer] GRASS toolbox enhancements
marco.pasetti at alice.it
marco.pasetti at alice.it
Wed May 14 11:43:01 EDT 2008
Hi all,
Yesterday and today I played a bit with the GRASS toolbox, starting from some missing or not-working *pieces* that I usually use in my jobs and that would like very much to have in the GRASS toolbox, thus avoiding me to use the tollbox shell (or even GRASS itself) for such *common* tasks: that's what I did:
1) I removed the g.region module and replaced it with 8 different g.region modules.
why? Because g.region is very useful, as long as setting the correct for particular tasks
why 8? Because the GRASS toolbox currently doesn't permit to select exclusive options. We need to build a module for each exclusive option needed.
Here's the new modules:
1.1) g.region.raster - Set the region to match a raster map
1.2) g.region.multiple.raster - Set the region to match multiple raster maps *
1.3) g.region.region - Set the region from a named region
1.4) g.region.res - Change the 2D grid resolution (both N-S and E-W) of the current region
1.5) g.region.save - Save the current region as a named region
1.6) g.region.vector - Set the region to match a vector map
1.7) g.region.multiple.vector - Set the region to match multiple vector maps *
1.8) g.region.zoom - Shrink the current region until it meets non-NULL data from a given raster map
* this is actually a walk-around; I needed to set the option as file to let user type in multiple map names separated by a comma; the single version, though, is very comfortable because it automatically lists all the map available in the work space... even if you can't select more than one
2) I added the r.patch module; such as the g.region.multiple.* modules, this is a walk-around
3) I modified the r.proj module, that was useless since it was impossible to select the raster map to reproject; such as the r.patch modules, this is a walk-around
4) I added the r.proj.res module; it's the copy of the r.proj module, plus the feature to let redifine the resolution of the raster map while reprojecting
5) I modified the v.in.db module; now it's possible to pick up the db file via GUI, select the table name and db driver
6) I worked on the v.in.ogr module: the module was useless since it was impossible to select the input and parameters values; I fixed it, added some important options and flags, and re-designed the v.in.ogr modules as follows:
6.1) v.in.ogr.list - list all available layers in a given OGR data source
6.2) v.in.ogr - Import OGR/PostGIS vector layers
6.3) v.in.ogr.loc - Import OGR/PostGIS vector layers and create a fitted location
6.4) v.in.ogr.all - Import all the OGR/PostGIS vector layers in a given data source
6.5) v.in.ogr.all.loc - Import all the OGR/PostGIS vector layers in a given data source and create a fitted location
6.6) v.in.shape - Import ESRI Shapefile vector layers
6.7) v.in.shape.loc - Import ESRI Shapefile vector layers and create a fitted location
The last two modules are very comfortable since they use the *pick up* file GUI tool, with a filter set to *shp files
7) I added the v.patch module; such as the r.patch modules, this is a walk-around
I tested all the new and modified modules with qgis-0.10.0 on MS Windows (my build), and they all work very, very fine ;-)
Dowload the following files (I have problems with attaches today):
- default.qgc.diff -> to patch the /src/plugins/grass/config/default.qgc file
- modules_files.tar.gz -> unpack to /src/plugins/grass/modules
http://www.webalice.it/marco.pasetti/qgis/default.qgc.diff <http://www.webalice.it/marco.pasetti/qgis/default.qgc.diff> -> needed to patch the /src/plugins/grass/config/default.qgc file [ patch -p0 <default.qgc.diff ]
http://www.webalice.it/marco.pasetti/qgis/modules.tar.gz <http://www.webalice.it/marco.pasetti/qgis/modules.tar.gz> -> unpack to /src/plugins/grass/modules
cmakesetup ..
make
make install
and test ;-)
Comments will be very appreciated
Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20080514/3d2ab3c8/attachment.html
More information about the Qgis-developer
mailing list