g.rename(1)
π g.rename β the GRASS GIS glow-up page π
okay bestie, welcome to g.rename(1) from the GRASS GIS User's Manual. this is the one that gives your files a whole new name and a whole new identity. main character rebrand energy, no cap. π
β¨ NAME β¨
g.rename β renames data base element files in the user's current mapset. literally just that. a rename. a rebrand. a slay. π
π·οΈ KEYWORDS π·οΈ
general, map management, rename
π SYNOPSIS π
g.rename
g.rename --help
g.rename [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 output files straight-up overwrite files that already exist. yes it's giving bold. yes you should think about it first. π--helpβ prints the usage summary so you're not out here guessing.--verboseβ verbose module output, aka the module tells you everything it's doing.--quietβ quiet module output, aka shhh, no commentary, just vibes.--uiβ forces the GUI dialog to launch. for when you want the pretty buttons. β¨
π Parameters π
raster=from,toβ raster map(s) to be renamed.raster_3d=from,toβ 3D raster map(s) to be renamed.vector=from,toβ vector map(s) to be renamed.label=from,toβ paint label file(s) to be renamed.region=from,toβ region definition(s) to be renamed.group=from,toβ imagery group(s) to be renamed.
π DESCRIPTION π
so here's the tea. g.rename lets you rename data base element files in the user's current mapset. that's the whole job. the way that it just... does it. π
you can hand g.rename every single thing it needs right there on the command line by specifying:
- the type of data base element to be renamed β one or more of:
raster,raster_3d,vector,icon,labels,region, andgroup; - the specific file element in the current mapset to be renamed (the old one); and
- the new name to be assigned to this file element (the new one) in the current mapset.
then the file element old gets renamed to new. that's it. glow-up complete. π¦
and if you're feeling lazy (valid), you can just type g.rename --help with no arguments on the command line and get a menu of existing data base element types and files to choose from for possible renaming:
raster raster map(s) to be renamed
raster_3d 3D raster map(s) to be renamed
vector vector map(s) to be renamed
labels paint label file(s) to be renamed
region region definition(s) to be renamed
group imagery group(s) to be renamed
π NOTES π
if a data base element has support files (which, lowkey, is super common with raster maps), those support files get renamed too. they're a package deal. they move as a unit. periodt. π
not me trying to rename a file to itself π if you set the new file name equal to the old file name (like, for example,g.rename raster=soils,soils),g.renamewill not execute the rename β it'll just say that no rename is needed. iconic honestly. however,g.renamewill let you overwrite other existing files in the current mapset by making the new file name that of an already existing file. so like, be aware. that's a whole thing. π
for portability reasons, g.rename is ignoring case of names. so if you wanna change the case of a map name, here's the two-step: first rename the map to a name which differs by more than case, then rename it to the intended name. two renames. a little journey. you got this. π«Ά
πΈ EXAMPLE πΈ
# rename raster map
g.rename raster=oldrast,newrast
# rename vector map
g.rename vector=oldvect,newvect
# combined renaming
g.rename raster=oldrast,newrast vector=oldvect,newvect
look at that combined renaming at the end. multi-tasking. efficiency. ate. π₯
π SEE ALSO π
g.copy, g.list, g.remove
π AUTHOR π
Michael Shapiro, U.S.Army Construction Engineering Research Laboratory
π SOURCE CODE π
Available at: g.rename source code (history)
Accessed: Saturday Jan 17 05:40:40 2026
Main index | General index | Topics index | Keywords index | Graphical index | Full index
and that's a wrap bestie!! this page is from GRASS GIS 8.4.2, page g.rename(1), Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual, last accessed Saturday Jan 17 05:40:40 2026. go rename something cute. mwah. ππβ¨
π¦ 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