[GRASS-user] Announcing new command line interface of `grass` program in trunk

Vincent Bain bain at toraval.fr
Wed Jun 3 23:49:14 PDT 2015


Great news ! thank you Vaclav for this new step in gis system
integration : Shell one-liners surely will enjoy...

Vincent

Le mercredi 03 juin 2015 à 20:44 -0400, Vaclav Petras a écrit :
> Hi all,
> 
> I'm happy to announce new command line interface of the `grass`
> program [1, 2] available in trunk.
> 
> 
> Certainly you already know that you can start GRASS GIS session in the
> specified Location and Mapset in the following way:
> 
> grass71 .../grassdata/location/mapset/
> 
> The new interface adds `--exec` flag for specifying a command which
> will be executed inside that GRASS session:
> 
> grass71 .../grassdata/location/mapset/ --exec r.univar map=elevation
> 
> 
> This starts GRASS session, executes whatever command is specified
> after `--exec` flag and then ends showing the (text) output of the
> module as if the module would be executed manually in the GRASS
> session. And example showing this in combination with r.external to
> get the data into the Mapset is in the documentation [3].
> 
> This interface is meant to remove the need for lengthy manual setup of
> environmental variables followed by execution of GRASS modules in the
> mock-up GRASS session [4]. The idea is to use correct GRASS session
> maintained by `grass` program which means that any GRASS-related code
> must be passed to the `grass` program as opposed to direct execution
> in the former case.
> 
> 
> The interface can run any module or custom script with or without
> parameters. GUI tools including g.gui [5] can be called as well which
> opens new possibilities for application developers.
> 
> 
> The interface is the first implementation and currently is fully
> operational only on Linux and similar systems but it benefits from a
> lot of stable code which was already in place. Try it out and feel
> free to comment here, on grass-dev or in the related ticket [6]. There
> is definitively many potential improvements and it would be great to
> know what the community demands.
> 
> 
> 
> Vaclav
> 
> 
> [1] https://trac.osgeo.org/grass/changeset/65252
> [2] https://trac.osgeo.org/grass/changeset/65294
> [3]
> http://grass.osgeo.org/grass71/manuals/grass7.html#exec-interface-example
> [4]
> http://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly
> [5] https://trac.osgeo.org/grass/changeset/65306
> [6] https://trac.osgeo.org/grass/ticket/2579
> 
> 
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user




More information about the grass-user mailing list