r.object.geometry(1)

πŸ’– r.object.geometry πŸ’–

okay bestie, welcome to the r.object.geometry page from the GRASS GIS User's Manual β€” she's a little raster stats queen and she's about to tell you exactly how big and how weirdly shaped your objects are. no cap. πŸŽ€


✨ NAME ✨

r.object.geometry β€” Calculates geometry parameters for raster objects. πŸ’…


πŸ”‘ KEYWORDS πŸ”‘

raster, statistics, reclass, clumps


🌸 SYNOPSIS 🌸

r.object.geometry
r.object.geometry --help
r.object.geometry [-m] input=name  [output=name]   [separator=character]
[--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]

🚩 Flags:

  • -m β€” Use meters as units instead of cells. (the glow-up from "cells" to "actual real-world distance" πŸ’«)
  • --overwrite β€” Allow output files to overwrite existing files. (she will simply replace them, no apology 🫢)
  • --help β€” Print usage summary.
  • --verbose β€” Verbose module output. (she talks more πŸ—£οΈ)
  • --quiet β€” Quiet module output. (she talks less 🀫)
  • --ui β€” Force launching GUI dialog.

🧸 Parameters:

  • input=name [required] β€” Name of input raster map.
  • output=name β€” Name for output file.
  • separator=character β€” Field separator.
    • Special characters: pipe, comma, space, tab, newline
    • Default: pipe

πŸ’œ DESCRIPTION πŸ’œ

r.object.geometry calculates form statistics of raster objects in the input map and writes it to the output text file β€” or to standard output if you don't give an output filename, or if you pass '-' β€” with fields separated by the separator you chose. πŸ¦‹

Objects are defined as clumps of adjacent cells with the same category value (like, say, the output of r.clump or i.segment). it's giving "find the blobs, describe the blobs". ✨

By default, values are in pixels. If you want values in meters, set the -m flag. And listen β€” if your current working region is in lat-long, or has non-square pixels, using meters is recommended. fr fr. 🌍

Statistics currently calculated are exactly the same as in v.to.db (except for compact_square and mean coordinates):

  • area
  • perimeter
  • compact_square (compactness compared to a square: compact_square = 4 * sqrt(area) / perimeter)
  • compact_circle (compactness compared to a circle: compact_circle = perimeter / ( 2 * sqrt(PI * area) ))
  • fractal dimension ( fd = 2 * ( log(perimeter) / log(area + 0.001) ) )
  • mean x coordinate of object (in map units)
  • mean y coordinate of object (in map units)

🌈 EXAMPLE 🌈

g.region raster=soilsID
r.object.geometry input=soilsID output=soils_geom.txt

look at her go. iconic. πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€

i.segment, r.clump, v.to.db


🫢 AUTHORS 🫢

  • Moritz Lennert
  • Markus Metz (diagonal clump tracing)

πŸ“¦ SOURCE CODE πŸ“¦

Available at: r.object.geometry source code (history)

Accessed: Saturday Jan 17 05:40:51 2026

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


Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual

and that's the whole page bestie, mwah πŸ’‹ β€” this was GRASS 8.4.2, r.object.geometry(1), accessed Saturday Jan 17 05:40:51 2026. go measure some clumps, you absolute main character. πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from