logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

r.object.geometry - Calculates geometry parameters for raster objects.

Authors

       Moritz Lennert
       Markus Metz (diagonal clump tracing)

Description

r.object.geometry calculates form statistics of raster objects in the input map  and  writes  it  to  the
       output text file (or standard output if no output filename or ’-’ is given), with fields separated by the
       chosen  separator.   Objects  are  defined as clumps of adjacent cells with the same category value (e.g.
       output of r.clump or i.segment).

       By default, values are in pixels. If values in meters is desired, the user can set the -m  flag.  If  the
       current working region is in lat-long or has non-square pixels, using meters is recommended.

       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

Keywords

       raster, statistics, reclass, clumps

Name

r.object.geometry  - Calculates geometry parameters for raster objects.

See Also

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

Source Code

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

       Accessed: Friday Apr 04 01:19:17 2025

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

       © 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual

GRASS 8.4.1                                                                            r.object.geometry(1grass)

Synopsis

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

   Flags:-m
           Use meters as units instead of cells

       --overwrite
           Allow output files to overwrite existing files

       --help
           Print usage summary

       --verbose
           Verbose module output

       --quiet
           Quiet module output

       --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

See Also