~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to general/g.filename/description.html

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<h2>DESCRIPTION</h2>
2
 
 
3
 
<em>g.filename</em> is designed for Bourne shell scripts that need to know 
4
 
the full file name, including it's path, for mapset elements, like raster,
5
 
vector and site maps, region definitions and imagery groups.
6
 
<p>
7
 
The list of element names to search for is not fixed; any subdirectory of the
8
 
mapset directory is a valid element name.
9
 
<p>
10
 
However, the user can find the list of standard GRASS element names in
11
 
the file $GISBASE/etc/element_list. This is the file which
12
 
g.remove/g.rename/g.copy use to determine which files need to be
13
 
deleted/renamed/copied for a given entity type.
14
 
 
15
 
<!-- unused
16
 
<h2>OPTIONS</h2>
17
 
 
18
 
<h3>Parameters:</h3>
19
 
 
20
 
<dl>
21
 
<dt><b>element=</b><em>name</em> 
22
 
 
23
 
<dd>The name of a GRASS data base element (i.e., directory
24
 
within the GRASS mapset location).
25
 
 
26
 
<dt><b>mapset=</b><em>name</em> 
27
 
 
28
 
<dd>The name of a GRASS data base mapset.  As a
29
 
convenience, a single dot (.) can be used to designate the
30
 
current mapset.
31
 
 
32
 
<dt><b>file=</b><em>name</em> 
33
 
 
34
 
<dd>The name of a GRASS data base file.
35
 
</dl>
36
 
-->
37
 
<h2>OUTPUT</h2>
38
 
 
39
 
<em>g.filename</em>
40
 
writes one line to standard output:
41
 
 
42
 
<dl>
43
 
<dd>
44
 
file='<em>full_file_pathname'</em>
45
 
</dl>
46
 
 
47
 
The output is a <em>/bin/sh</em> command to set the
48
 
variable specified by the file <em>name</em> to the full
49
 
UNIX path name for the data base file.  This variable may
50
 
be set in the <em>/bin/sh</em> as follows:
51
 
 
52
 
<dl>
53
 
<dd>
54
 
<div class="code"><pre>
55
 
eval `g.filename element=<em>name</em> mapset=<em>name</em> file=<em>name</em>`
56
 
</pre></div>
57
 
</dl>
58
 
 
59
 
 
60
 
<h2>NOTES</h2>
61
 
 
62
 
This routine generates the filename, but does not care if the file (or mapset
63
 
or element) exists or not. This feature allows shell scripts to create new data
64
 
base files as well as use existing ones.
65
 
 
66
 
<p>
67
 
 
68
 
If the mapset is the current mapset, <em>g.filename</em>
69
 
automatically creates the <em>element</em> specified if it
70
 
doesn't already exist.  This makes it easy to add new files
71
 
to the data base without having to worry about the
72
 
existence of the required data base directories.  (This
73
 
program will not create a new mapset, however, if that
74
 
specified does not currently exist.)
75
 
 
76
 
<p>
77
 
The program exits with a 0 if everything is ok;  it exits
78
 
with a non-zero value if there is an error, in which case
79
 
file=<em>'full_file_pathname'</em> is not output.
80
 
 
81
 
<h2>SEE ALSO</h2>
82
 
 
83
 
<em><a href="g.ask.html">g.ask</a></em><br>
84
 
<em><a href="g.findfile.html">g.findfile</a></em><br>
85
 
<em><a href="g.gisenv.html">g.gisenv</a></em><br>
86
 
<em><a href="parser.html">parser</a></em>
87
 
 
88
 
<h2>AUTHOR</h2>
89
 
 
90
 
Michael Shapiro,
91
 
U.S.Army Construction Engineering Research Laboratory
92
 
 
93
 
<p><i>Last changed: $Date: 2011-11-08 12:29:50 +0100 (Tue, 08 Nov 2011) $</i>