- Creates copies of maps and other elements
Copies available data files in the current mapset search path to the user's current mapset.
, map management
g.copy [raster=from,to] [raster_3d=from,to] [vector=from,to] [label=from,to] [region=from,to] [group=from,to] [--overwrite] [--help] [--verbose] [--quiet] [--ui]
- Allow output files to overwrite existing files
- Print usage summary
- Verbose module output
- Quiet module output
- Force launching GUI dialog
- raster map(s) to be copied
- 3D raster map(s) to be copied
- vector map(s) to be copied
- paint label file(s) to be copied
- region definition(s) to be copied
- imagery group(s) to be copied
module creates a copy of existing raster maps,
vector maps, or other elements. The copy is always created in
the current mapset. The source data can be in the current mapset,
in an explicitly specified mapset, or in a mapset which is in the
current mapset search path (typically the PERMANENT mapset).
The maps and other elements to copy are specified in pairs
from,to according to their types.
Although typically only one map is copied in one module call,
multiple pairs can be provided for each type and multiple types
can be provided at the same time.
A user may access data stored under the other mapsets listed in their
mapset search path. However, the user may only modify data stored
under their own current mapset. g.copy
allows the user to copy
existing data files from
other mapsets to
current 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.
Errors typically occur when a map or other element does not exist,
are the same, to
already exists and overwriting (e.g., by --overwrite
) is not
enabled, or the to
element has an illegal name.
When only one map or other element is requested to be copied and the copying
is not possible or fails, an error is reported.
If multiple maps or other elements are copied in one command,
g.copy attempts to copy as much as possible
even when problems occur with one of the elements.
In that case, copying of the element causing problems is skipped, and
g.copy proceeds with copying the remaining elements.
If nothing can be copied or an error occurred during one of the copy
operations, an error message is reported after other possible copy
operations were performed.
If the user wished to copy the existing raster
to a file called soils.ph
to copy an existing vector map roads
to a file
, the user could type:
# or even combined:
g.copy raster=soils,soils.ph vector=roads,rds.old
Data files can also be specified by their mapsets. For
example, the below command copies the raster map named
soils from the mapset wilson to a new
file called soils to be placed under the user's
If no mapset name is specified, g.copy
searches for the
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 g.mapsets
U.S. Army Construction Engineering
g.copy source code
Latest change: Thursday Feb 03 11:10:06 2022 in commit: 547ff44e6aecfb4c9cbf6a4717fc14e521bec0be
Main index |
General index |
Topics index |
Keywords index |
Graphical index |
GRASS Development Team,
GRASS GIS 8.3.dev Reference Manual