<div dir="ltr">Vaclav,<div><br></div><div>That's very cool -- nice way of doing this!</div><div><br></div><div>Best,</div><div>Tom</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 3, 2015 at 8:44 PM, Vaclav Petras <span dir="ltr"><<a href="mailto:wenzeslaus@gmail.com" target="_blank">wenzeslaus@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi all,<br><br>I'm happy to announce new command line interface of the `grass` program [1, 2] available in trunk.<br><br></div>Certainly you already know that you can start GRASS GIS session in the specified Location and Mapset in the following way:<br><div><br>grass71 .../grassdata/location/mapset/<br><br> The new interface adds `--exec` flag for specifying a command which will be executed inside that GRASS session:<br><br>grass71 .../grassdata/location/mapset/ --exec r.univar map=elevation<br><br></div><div>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].<br><br>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.<br></div><div><br>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.<br><br></div><div>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.<br></div><div><br></div><div>Vaclav<br></div><div><br>[1] <a href="https://trac.osgeo.org/grass/changeset/65252" target="_blank">https://trac.osgeo.org/grass/changeset/65252</a><br>[2] <a href="https://trac.osgeo.org/grass/changeset/65294" target="_blank">https://trac.osgeo.org/grass/changeset/65294</a><br>[3] <a href="http://grass.osgeo.org/grass71/manuals/grass7.html#exec-interface-example" target="_blank">http://grass.osgeo.org/grass71/manuals/grass7.html#exec-interface-example</a><br>[4] <a href="http://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly" target="_blank">http://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly</a><br>[5] <a href="https://trac.osgeo.org/grass/changeset/65306" target="_blank">https://trac.osgeo.org/grass/changeset/65306</a><br>[6] <a href="https://trac.osgeo.org/grass/ticket/2579" target="_blank">https://trac.osgeo.org/grass/ticket/2579</a><br><br></div></div>
<br>_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Thomas E Adams, III<div>718 McBurney Drive</div><div>Lebanon, OH 45036</div><div><br></div><div>1 (513) 739-9512 (cell)</div><div><br></div></div>
</div>