[GRASS-user] temporary layer creation

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi
I want to need to create a temporary raster layer - is there a
function to create a unique name for this raster?

Thanks

Rainer

- --
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44

Fax (D): +49 - (0)3 21 21 25 22 44

email: Rainer@krugs.de

Skype: RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk6BtxQACgkQoYgNqgF2egpRRACeMw2Rfu+lz+gDvoBlG4Wka0zx
BZYAoICB0Qu2NkDu8xFvUuahfztmriGR
=gpcF
-----END PGP SIGNATURE-----

On Tue, Sep 27, 2011 at 1:44 PM, Rainer M Krug <r.m.krug@gmail.com> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi
I want to need to create a temporary raster layer - is there a
function to create a unique name for this raster?

Check
http://grass.osgeo.org/wiki/Parallel_GRASS_jobs#The_Grid_Engine_script
...
# generate machine (blade) unique TMP string
UNIQUE=`mktemp`
MYTMP=`basename $UNIQUE`
...

"mktemp" is part of "coreutils" on my Linux machine (maybe use it with
--dry-run).

Markus

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 27/09/11 16:35, Markus Neteler wrote:

On Tue, Sep 27, 2011 at 1:44 PM, Rainer M Krug <r.m.krug@gmail.com>
wrote:

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Hi I want to need to create a temporary raster layer - is there
a function to create a unique name for this raster?

Check
http://grass.osgeo.org/wiki/Parallel_GRASS_jobs#The_Grid_Engine_script

...

# generate machine (blade) unique TMP string UNIQUE=`mktemp`
MYTMP=`basename $UNIQUE` ...

"mktemp" is part of "coreutils" on my Linux machine (maybe use it
with --dry-run).

Thanks - that's an idea. But if I see it correctly, you use it to
create a temporary mapset - I would only need a temporary raster - is
there an easier way to achieve that, apart from checking in (one of
the) the directory where the rasters are stored?

Rainer

Markus

- --
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44

Fax (D): +49 - (0)3 21 21 25 22 44

email: Rainer@krugs.de

Skype: RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk6B8qwACgkQoYgNqgF2egr1GQCfZzHpKXCL9B1PzhPCTNIgcjAG
IHMAnA7LprGPhtewNAx2x+llVDjYF4FG
=ZUUG
-----END PGP SIGNATURE-----

On Tue, Sep 27, 2011 at 5:58 PM, Rainer M Krug <r.m.krug@gmail.com> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 27/09/11 16:35, Markus Neteler wrote:

On Tue, Sep 27, 2011 at 1:44 PM, Rainer M Krug <r.m.krug@gmail.com>
wrote:

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Hi I want to need to create a temporary raster layer - is there
a function to create a unique name for this raster?

Check
http://grass.osgeo.org/wiki/Parallel_GRASS_jobs#The_Grid_Engine_script

...

# generate machine (blade) unique TMP string UNIQUE=`mktemp`
MYTMP=`basename $UNIQUE` ...

"mktemp" is part of "coreutils" on my Linux machine (maybe use it
with --dry-run).

Thanks - that's an idea. But if I see it correctly, you use it to
create a temporary mapset - I would only need a temporary raster - is
there an easier way to achieve that, apart from checking in (one of
the) the directory where the rasters are stored?

The idea was to generate a machine unique name. That can be
used for anything then since it is in the $MYTMP variable.

Markus

Rainer M Krug wrote:

I want to need to create a temporary raster layer - is there a
function to create a unique name for this raster?

Most scripts create a name based upon the name of the script, the PID
(obtained from the shell variable $$), and ".tmp".

--
Glynn Clements <glynn@gclements.plus.com>