r.buildvrt(1grass)

πŸ’– r.buildvrt β€” the manual, but make it make sense ✨

okay bestie, so this is r.buildvrt from the GRASS User's Manual and she is that girl. let's get into it πŸŽ€


🌸 NAME 🌸

r.buildvrt β€” build a VRT (Virtual Raster) from the list of input raster maps. that's it, that's the whole job, and she does it flawlessly πŸ’…

🏷️ KEYWORDS 🏷️

raster, mosaic, virtual raster β€” iykyk πŸ¦‹


✨ SYNOPSIS ✨

r.buildvrt
r.buildvrt --help
r.buildvrt  [input=name[,name,...]]   [file=name]  output=name
[title=phrase]   [--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]

πŸŽ€ Flags: πŸŽ€

  • --overwrite β€” let the output files just bulldoze over existing files. she said move, periodt.
  • --help β€” print the usage summary, aka the cheat sheet 🫢
  • --verbose β€” verbose module output, she's gonna tell you everything.
  • --quiet β€” quiet module output. shhh 🀫 no yapping.
  • --ui β€” force launching the GUI dialog. main character graphical era πŸ‘‘

πŸ¦‹ Parameters: πŸ¦‹

  • input=name[,name,...] β€” name of input raster files (yes, a whole lil comma-separated list of them).
  • file=name β€” input file with one raster map name per line. one per line bestie, she's organized like that πŸ“‹
  • output=name [required] β€” name for the output raster map. required, so like, don't forget it πŸ’€
  • title=phrase β€” title for the resultant raster map. give her a name, a moment, a title card 🌟

πŸ’œ DESCRIPTION πŸ’œ

r.buildvrt builds a virtual raster (VRT) that is a mosaic of the list of input raster maps. the whole purpose of such a VRT is to provide fast access to small subsets of the VRT β€” and also with multiple simultaneous read requests. multi-tasking icon behavior fr fr πŸ”₯


🌈 NOTES 🌈

r.buildvrt creates a list of raster maps that can be located in different mapsets. the output is a read-only link to the original raster maps, which is only valid if the original raster maps remain in the originally indicated mapset. so if you move them, she's just a link to nothing. ghosted 😭

a VRT can also be built from raster maps registered with r.external. however β€” and hear me out β€” GRASS VRTs built from external registered data (see below) are known to have performance issues. not her fault, it's just the vibe over there πŸ™ˆ

reading the whole VRT is slower than reading the equivalent single raster map. only reading small parts of the VRT provides a performance benefit. so like, read a little, not the whole thing. snack, don't feast πŸ“

a GRASS virtual raster can be regarded as a simplified version of GDAL's virtual raster format. the GRASS equivalent is simpler because issues like nodata, projection, resolution, resampling, masking are already handled by native GRASS raster routines. she's low-maintenance, she handles herself ✨


πŸ”₯ EXAMPLES πŸ”₯

πŸŽ€ VRT from a DEM in the North Carolina sample dataset πŸŽ€

in this exercise a low resolution DEM is resampled to a high resolution DEM. this is subsequently cut into small tiles and from that a virtual tile mosaik is created:

# set the computational region to elevation map
g.region raster=elev_state_500m -p
# enforce higher resolution
g.region res=50 -p
# resample the 500 meter DEM to 50 meter resolution
r.resamp.interp input=elev_state_500m output=elev_state_50m method=bilinear
# create tiles from resulting large 50 m elevation map
r.tile input=elev_state_50m output=elev_state_50m_tile_ width=1000 height=1000 overlap=0
# for convenience, dump list of tile names to a file
g.list type=raster pattern=elev_state_50m_tile_* output=tilelist.csv
# build a mosaik as VRT from tile list
r.buildvrt file=tilelist.csv output=elev_state_50m_vrt

look at her go πŸ˜­πŸ’–


πŸ’€ KNOWN ISSUES πŸ’€

users may experience significant performance degradation with virtual rasters built with r.buildvrt over GDAL-linked (r.external) raster maps β€” especially on slower file systems with latency like NFS. πŸ’€

performance degradation may also occur on local file systems, but is usually less severe. for such use cases consider using the GRASS addon r.buildvrt.gdal or building GDAL VRTs, e.g. with gdalbuildvrt.

ngl if your filesystem is on NFS, maybe sit this one out or switch strategies. she's warning you with love 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

r.tile, r.patch, r.external r.buildvrt.gdal

the equivalent GDAL utility gdalbuildvrt ⭐


🌸 AUTHOR 🌸

Markus Metz Sponsored by mundialis 🫑


πŸ“¦ SOURCE CODE πŸ“¦

available at: r.buildvrt source code (history)

latest change: Friday Apr 17 01:04:26 2026 in commit: 32a143358df26b2e518b03c7e0d79541e8d1e5b1

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


and that's the whole page bestie πŸŽ€ no cap. huge thanks to the GRASS Development Team β€” Β© 2003-2026 β€” and this is all from the GRASS 8.5.0 Reference Manual. you're reading r.buildvrt straight outta GRASS 8.5.0. slay, go build yourself a mosaic πŸ’–βœ¨πŸŒˆ

πŸ“¦ where this page comes from