-
Notifications
You must be signed in to change notification settings - Fork 4
/
g.copy
113 lines (113 loc) · 4.32 KB
/
g.copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
.TH g.copy
.SH NAME
\fIg.copy\fR \- Copies available data files in the user's current mapset
search path and location to the appropriate element directories under
the user's current mapset.
.br
.I "(GRASS File Management Program)"
.SH SYNOPSIS
\fBg.copy\fR
.br
\fBg.copy help\fR
.br
.nf
\fBg.copy \fR[\fBrast\*=\fIfrom,to\fR] [\fBvect\*=\fIfrom,to\fR] [\fBicon\*=\fIfrom,to\fR] [\fBlabels\*=\fIfrom,to\fR] [\fBsites\*=\fIfrom,to\fR]
\fB[region\*=\fIfrom,to\fR] [\fBgroup\*=\fIfrom,to\fR]
.fi
.SH DESCRIPTION
A user may access data stored under the other mapsets listed
in his mapset search path.
However, the user may only modify data stored under his own current mapset.
.I g.copy
allows the user to copy existing data files \fIfrom\fR other mapsets
\fIto\fR the user's current mapset ($MAPSET). The files to be
copied must exist in the user's current mapset search path and location;
output is sent to the relevant data element directory(ies) under
the user's current mapset.
.LP
The user specifies the type(s) of data files he wishes to copy
(raster, vector, etc.),
the name of the existing file to be copied (i.e., the \fIfrom\fR file name),
and the name of the new file copy to be placed in the user's current mapset
(the \fIto\fR file name). This information can be given either
(non-interactively) on the command line, or entered in response to
program prompts given via the standard parser interface described in
the manual entry for \fIparser\fR.
.LP
Information can be entered on the command line in the following format:
.LP
.nf
.RS
\fBg.copy \fR[\fBrast\*=\fIfrom,to\fR] [\fBvect\*=\fIfrom,to\fR] [\fBicon\*=\fIfrom,to\fR] [\fBlabels\*=\fIfrom,to\fR] [\fBsites\*=\fIfrom,to\fR]
\fB[region\*=\fIfrom,to\fR] [\fBgroup\*=\fIfrom,to\fR]
.RE
.fi
.LP
For example, if the user wished to copy the existing raster file \fIsoils\fR
to a file called \fIsoils.ph\fR and to copy an existing vector file \fIroads\fR
to a file called \fIrds.old\fR, the user could type:
.LP
.RS
\fBg.copy rast\*=soils,soils.ph vect\*=roads,rds.old\fR
.RE
.LP
Data files can also be specified by their mapsets. For example,
the below command copies the raster file named \fIsoils\fR from the
mapset \fIwilson\fR to a new file called \fIsoils\fR to be placed under
the user's current mapset:
.LP
.RS
\fBg.copy rast\*='soils@wilson',soils\fR
.RE
.LP
If no mapset name is specified, \fIg.copy\fR searches for the named
\fIfrom\fR map in each of the mapset directories listed in the user's
current mapset search path in the order in which mapsets are listed there
(see \fIg.mapsets\fR).
.LP
If the user does not enter parameter values but instead types only
\fBg.copy\fR on the command line the program will prompt the user for
a data type, the name of a file of this data type to copy,
and the name of a new file to hold the copy.
After both file names have been entered, the copy is created and the user
is again prompted for a data element to be copied, until the user
hits RETURN.
When prompted for file names, the user may enter 'list' to see a list
of existing files, or hit RETURN to end the file listing.
.bp
.LP
\fBParameters:\fR
.IP \fBrast\*=\fIfrom,to\fR 20
where \fIfrom\fR is an existing raster map layer to be copied,
and \fIto\fR is the name given to the copy.
.IP \fBvect\*=\fIfrom,to\fR 20
where \fIfrom\fR is an existing binary vector map layer to be copied,
and \fIto\fR is the name given to the copy.
.IP \fBicon\*=\fIfrom,to\fR 20
where \fIfrom\fR is an existing paint icon file to be copied,
and \fIto\fR is the name given to the copy.
.IP \fBlabels\*=\fIfrom,to\fR 20
where \fIfrom\fR is an existing /paint/labels file to be copied,
and \fIto\fR is the name given to the copy.
.IP \fBsites\*=\fIfrom,to\fR 20
where \fIfrom\fR is an existing \fIsite_lists\fR file to be copied,
and \fIto\fR is the name given to the copy.
.IP \fBregion\*=\fIfrom,to\fR 20
where \fIfrom\fR is an existing region definition (\fIwindows\fR) file
to be copied, and \fIto\fR is the name given to the copy.
.IP \fBgroup\*=\fIfrom,to\fR 20
where \fIfrom\fR is an existing imagery group file to be copied,
and \fIto\fR is the name given to the copy.
.SH NOTE
If a file has support files (e.g., as do raster data files),
these support files will also be copied.
.SH SEE ALSO
.I g.access,
.I g.list,
.I g.mapsets,
.I g.remove,
.I g.rename,
and
.I parser
.SH AUTHOR
Michael Shapiro, U.S. Army Construction Engineering Research Laboratory