[GRASS-user] New CLI option --tmp-location in 7.5 to enhance --exec

Vaclav Petras wenzeslaus at gmail.com
Sat Aug 18 19:05:00 PDT 2018


On Thu, Aug 16, 2018 at 6:39 AM, Nikos Alexandris <nik at nikosalexandris.net>
wrote:
>
> * Vaclav Petras <wenzeslaus at gmail.com> [2018-08-14 23:20:16 -0400]:
>
> ..
>
>> If you are interested, please, test this new functionality. It is an
>> opportunity to provide feedback before this feature lands in the 7.6
>> release.
>>
>> Here are some things to try:
>>
>> * Execute a module in a location created based on EPSG:
>>
>>  grass --tmp-location EPSG:3358 --exec g.region -p
>>
>> * Execute Python script in a location created based on EPSG:
>>
>>  grass --tmp-location EPSG:3358 --exec script.py
>>
>> * Examine the created location using a Bash command:
>>
>>  grass --tmp-location EPSG:3358 --exec bash -c "g.proj -p && g.region -p
>> && g.mapset -p && g.gisenv GISDBASE,LOCATION_NAME sep=/"
>>
>> * Get SRS/CRS for a file:
>>
>>  grass --tmp-location ~/data/elevation.tiff --exec g.proj -p
>
>
> Perhaps test if the file exists and, if not, exit with an informative
error
> message?
>
> In Python:
>
> import os.path
> os.path.isfile(fname)
> ?

Hi Nikos,

sounds good to me. Do you want to submit an issue and suggest a patch?

Vashek

> Currently, if the file does not exist, the process hangs:
>
> ```
> Cleaning up temporary files...
> Starting GRASS GIS...
> ```
>>
>> * Get help text for a module:
>>
>>  grass --tmp-location XY --exec r.neighbors --help
>>
>> See the documentation and `grass --help` for more hints (and let me know
>> how these can be enhanced).
>>
>> Best regards,
>> Vaclav
>>
>>
>> https://trac.osgeo.org/grass/ticket/3537
>> https://trac.osgeo.org/grass/ticket/3585
>> https://trac.osgeo.org/grass/ticket/3586
>> https://trac.osgeo.org/grass/changeset/72790
>> https://trac.osgeo.org/grass/changeset/73096
>> https://trac.osgeo.org/grass/changeset/73098
>> https://trac.osgeo.org/grass/changeset/73099
>
>
> All works.
> Fantastic work!
>
> Kudos Radek and Vaclav,
> Nikos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20180818/5c8188d1/attachment.html>


More information about the grass-user mailing list