[GRASS-user] New CLI option --tmp-location in 7.5 to enhance --exec
Nikos Alexandris
nik at nikosalexandris.net
Thu Aug 16 03:39:09 PDT 2018
* 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)
?
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 --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20180816/a059f33d/attachment.sig>
More information about the grass-user
mailing list