d.grid(1)
β¨ d.grid(1) β¨
okay bestie, welcome to the GRASS GIS User's Manual entry for d.grid(1) β she's a display module and she's literally here to put a grid on your screen π
π NAME π
d.grid β overlays a user-specified grid in the active display frame on the graphics monitor.
π·οΈ KEYWORDS π·οΈ
display, cartography, graticule, grid
π SYNOPSIS π
d.grid
d.grid --help
d.grid [-agwcdfnbt] size=value [origin=east,north] [direction=string]
[width=float] [color=name] [border_color=name] [text_color=name]
[bgcolor=name] [fontsize=integer] [--help] [--verbose] [--quiet]
[--ui]
π© Flags π©
-aβ aligns the origin to the east-north corner of the current region-gβ draws a geographic grid (referenced to the current ellipsoid)-wβ draws a geographic grid (referenced to the WGS84 ellipsoid)-cβ draws'+'marks instead of grid lines-dβ draws'.'marks instead of grid lines-fβ draws fiducial marks instead of grid lines-nβ disables grid drawing-bβ disables border drawing-tβ disables text drawing--helpβ prints the usage summary--verboseβ verbose module output--quietβ quiet module output--uiβ forces the GUI dialog to launch
π§ Parameters π§
size=value[required] β the size of the grid to be drawn, in map units.0means use the north-south resolution of the current region. Accepts map units orDDD:MM:SSformat. Example:"1000"or"0:10"origin=east,northβ the lines of the grid pass through this coordinate. Default:0,0direction=stringβ draw only east-west lines, north-south lines, or both. Options:both,east-west,north-south. Default:bothwidth=floatβ grid line widthcolor=nameβ grid color. Either a standard color name or anR:G:Btriplet. Default:grayborder_color=nameβ border color. Either a standard color name or anR:G:Btriplet. Default:blacktext_color=nameβ text color. Either a standard color name or anR:G:Btriplet. Default:graybgcolor=nameβ background color. Either a standard color name, anR:G:Btriplet, or"none". Default:nonefontsize=integerβ font size for the gridline coordinate labels. Options:1-72. Default:9
π DESCRIPTION π
d.grid overlays a grid of user-defined size and color in the active display frame on the graphics monitor. The grid can be created as a standard rectangular grid or as a geographic grid. no cap π«Ά
If you hand her the -g flag, a geographic (projected) grid gets drawn. With -g on, the size argument accepts both decimal degrees and colon separated ddd:mm:ss coordinates (eg. 00:30:00 for half of a degree). And listen β a geographic grid cannot be drawn for a latitude/longitude or XY projection. That's just how it is, bestie. π
Colors can be standard named GRASS colors (red, green, aqua, etc.) or a numerical R:G:B triplet, where the component values range from 0-255. Grid color is set with the color option. The text_color and bgcolor options set the color of the text and its background.
- The grid drawing may be turned off by using the
-nflag. - The border drawing may be turned off by using the
-bflag. - The coordinate text may be turned off by using the
-tflag.
Wanna draw grid lines at different intervals, like at high latitudes? Run the module twice: once with direction=east-west at one interval size, and again with direction=north-south at another interval size. two passes, one slay β¨
π¦ EXAMPLES π¦
To draw a red geographic grid with 30 minute grid spacing, run one of the following commands:
d.grid -g size=00:30:00 color=red
or
d.grid -g size=0.5 color=255:0:0
Figure: Showing a geographic grid in red line color
To draw a blue standard rectangular grid at a 500 (meter) spacing run the following:
d.grid size=500 color=blue
Figure: Showing a rectangular grid in blue line color
π SEE ALSO π
d.barscale, d.legend, d.geodesic, d.rhumbline, d.erase, d.frame, d.rast, v.mkgrid
π AUTHORS π
- James Westervelt, U.S. Army Construction Engineering Research Laboratory
- Geogrid support: Bob Covill
- Border support: Markus Neteler
- Text and RGB support: Hamish Bowman
- Background color implemented as part of GSoC 2016 by Adam Laza, CTU in Prague
π» SOURCE CODE π»
Available at: d.grid source code (history)
Accessed: Saturday Jan 17 05:40:35 2026
Main index | Display index | Topics index | Keywords index | Graphical index | Full index
and that's the whole page, bestie π«Ά she's serving GRASS 8.4.2, the reference manual is Β© 2003-2025 GRASS Development Team, and honestly? iconic behavior. periodt. π β¨
π¦ 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