g.copy(1)
π g.copy β GRASS GIS User's Manual π
okay bestie, welcome to g.copy, from the GRASS GIS User's Manual. she's a general-purpose queen and she's about to make copies of literally everything you own. no cap. π
β¨ NAME β¨
g.copy β creates copies of maps and other elements. π«
She copies available data files in the current mapset search path to the user's current mapset. that's the whole gig. iconic behavior honestly.
π·οΈ KEYWORDS π·οΈ
general, map management, copy
πΈ SYNOPSIS πΈ
g.copy
g.copy --help
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]
π© Flags π©
--overwriteβ bestie this one lets your output files just bulldoze over existing files. allow output files to overwrite existing files. use with intention, ok? π--helpβ prints the usage summary. your little cheat sheet π«Ά--verboseβ verbose module output. she will NOT stop talking and honestly? we love that π¬--quietβ quiet module output. the introvert setting π€«--uiβ force launching GUI dialog. for when you want the pretty buttons β¨
π Parameters π
raster=from,toβ raster map(s) to be copied πΊοΈraster_3d=from,toβ 3D raster map(s) to be copied π§vector=from,toβ vector map(s) to be copied πlabel=from,toβ paint label file(s) to be copied π¨region=from,toβ region definition(s) to be copied πgroup=from,toβ imagery group(s) to be copied π―
π« DESCRIPTION π«
so the g.copy module creates a copy of existing raster maps, vector maps, or other elements. the copy is always created in the current mapset β no exceptions, she's loyal like that. 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. multitasking queen!! π
πΊοΈ Relation to mapsets πΊοΈ
A user may access data stored under the other mapsets listed in their mapset search path. However β and this is the important part bestie β the user may only modify data stored under their own current mapset. read that again. π’
g.copy allows the user to copy existing data files from other mapsets to the user's current mapset (g.mapset -p). The files to be copied must exist in the user's current mapset search path (g.mapsets -p) and project; output is sent to the relevant data element directory(ies) under the user's current mapset. π
π Behavior on error π
Errors typically occur when a map or other element does not exist, from and to are the same, to element 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. she tries her best and reports back fr fr π«‘
π EXAMPLES π
If the user wished to copy the existing raster file soils to a file called soils.ph and to copy an existing vector map roads to a file called rds.old, the user could type:
g.copy raster=soils,soils.ph
g.copy vector=roads,rds.old
# 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 current mapset:
g.copy raster=soils@wilson,soils
If no mapset name is specified, g.copy searches for the named from 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). π
π SEE ALSO π
g.access, g.list, g.mapsets, g.remove, g.rename
go read those too bestie, they're all part of the squad π«Ά
π AUTHOR π
Michael Shapiro, U.S. Army Construction Engineering Research Laboratory
π₯ SOURCE CODE π₯
Available at: g.copy source code (history)
and that's the whole page, babe π this was the GRASS GIS 8.4.2 Reference Manual, page accessed Saturday Jan 17 05:40:39 2026, Β© 2003-2025 GRASS Development Team, running on GRASS 8.4.2. slay, go copy something. π¦β¨
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms