r.region(1)

πŸ’– r.region(1) πŸ’–

okay bestie, welcome to the GRASS GIS User's Manual 🫢 this page is literally all about r.region, and by the end you're gonna be setting raster boundaries like it's nothing. no cap. ✨


🌸 NAME 🌸

r.region β€” sets the boundary definitions for a raster map. that's the whole vibe. πŸ’…

πŸŽ€ KEYWORDS πŸŽ€

raster, metadata, geometry

πŸ¦‹ SYNOPSIS πŸ¦‹

r.region
r.region --help
r.region [-cda] map=name  [region=name]   [raster=name]   [vector=name]
[n=value]   [s=value]   [e=value]   [w=value]   [align=name]   [--help]
[--verbose]  [--quiet]  [--ui]

🌈 Flags 🌈

  • -c β€” set it from the current region. simple, iconic, no drama. ✨
  • -d β€” set it from the default region. starting fresh energy. πŸ“
  • -a β€” auto-adjustment for lat/lon. it will attempt to fix small precision errors in resolution and extents. like, it's trying its best and honestly? valid. πŸ’œ
  • --help β€” print usage summary. your emotional support flag. πŸ™ˆ
  • --verbose β€” verbose module output. it will tell you everything, main character monologue style. πŸ‘‘
  • --quiet β€” quiet module output. the strong silent type. πŸ’€
  • --ui β€” force launching GUI dialog. for when you want the pretty buttons. πŸŽ€

πŸ’… Parameters πŸ’…

  • map=name [required] β€” name of the raster map to change. yes bestie, this one is mandatory, don't skip it. 😭
  • region=name β€” set region from a named region. name-drop your region file. ✨
  • raster=name β€” set region to match this raster map. twin where have you been. πŸ¦‹
  • vector=name β€” name of vector map; set region to match this vector map. same energy, vector edition. 🌈
  • n=value β€” value for the northern edge. up top. ⭐
  • s=value β€” value for the southern edge. down low. ⭐
  • e=value β€” value for the eastern edge. right side. ⭐
  • w=value β€” value for the western edge. left side. ⭐
  • align=name β€” raster map to align to. match their posture fr fr. πŸ’–

🌟 DESCRIPTION 🌟

so the r.region program lets you manage the boundaries of a raster map. you can set those boundaries yourself, directly, and/or set them from a region definition file (which lives under the windows directory in your current mapset, iykyk), or from a raster map, a vector map, or a 3dview file. lots of options, all slay. πŸ”₯

the align parameter sets the current resolution equal to that of the named raster map, and aligns the boundaries to a row and column edge in the named map. okay but here's the important part bestie: alignment only moves the existing boundaries outward to the edges of the next nearest cell in the named raster map β€” not to the named map's edges. to do that latter thing, you use the raster=name option instead. don't mix these up, it's giving "i read the manual and you didn't". πŸ’…

πŸ“ NOTES πŸ“

after all the updates have been applied, the raster map's resolution settings are recomputed from the boundaries and the number of rows and columns in the raster map. it's math, it's automatic, it's fine. ✨

also!! the n=value can be specified as a function of its current value: n=n+value increases the current northing, while n=n-value decreases it. and this is also true for s=value, e=value, and w=value. so you can just nudge things around, no biggie. πŸŽ€

πŸ“ EXAMPLES πŸ“

assign absolute coordinates to a map:

r.region map=mymap n=220750 s=220000 w=638300 e=639000

shift a map (using offsets β€” here by +100 map units in the NS direction, -50 in the EW direction):

r.region map=mymap n=n+100 e=e-50 w=w-50 s=s+100

look at that. immaculate. no notes. πŸ‘‘

πŸ’œ SEE ALSO πŸ’œ

r.support, g.region, v.transform

✨ AUTHOR ✨

Glynn Clements Based upon g.region

πŸ”₯ SOURCE CODE πŸ”₯

Available at: r.region source code (history)

Accessed: Saturday Jan 17 05:40:56 2026

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index


and that's the whole page bestie, you ate. πŸ’…βœ¨

okay so final sign-off: this whole thing is part of the GRASS GIS 8.4.2 Reference Manual, Β© 2003-2025 GRASS Development Team, and the manual itself is running GRASS 8.4.2. so go forth and set those boundaries, you absolute icon. πŸ«ΆπŸ’–πŸŒΈ

πŸ“¦ where this page comes from