Skip to content

v.report

Reports geometry statistics for vector maps.

v.report [-cd] map=name [layer=string] option=string [units=string] [sort=string] [separator=character] [--verbose] [--quiet] [--qq] [--ui]

Example:

v.report map=name option=string

grass.script.run_command("v.report", map, layer="1", option, units=None, sort=None, separator="pipe", flags=None, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("v.report", map="name", option="string")

Parameters

map=name [required]
    Name of vector map
    Or data source for direct OGR access
layer=string
    Layer number or name
    Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
    Default: 1
option=string [required]
    Value to calculate
    Allowed values: area, length, coor
units=string
    Units
    Allowed values: miles, feet, meters, kilometers, acres, hectares, percent
sort=string
    Sort the result
    Allowed values: asc, desc
    asc: Sort in ascending order
    desc: Sort in descending order
separator=character
    Field separator
    Special characters: pipe, comma, space, tab, newline
    Default: pipe
-c
    Do not include column names in output
-d
    Report for geometries with no database records
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog

map : str, required
    Name of vector map
    Or data source for direct OGR access
    Used as: input, vector, name
layer : str, optional
    Layer number or name
    Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
    Used as: input, layer
    Default: 1
option : str, required
    Value to calculate
    Allowed values: area, length, coor
units : str, optional
    Units
    Allowed values: miles, feet, meters, kilometers, acres, hectares, percent
sort : str, optional
    Sort the result
    Allowed values: asc, desc
    asc: Sort in ascending order
    desc: Sort in descending order
separator : str, optional
    Field separator
    Special characters: pipe, comma, space, tab, newline
    Used as: input, separator, character
    Default: pipe
flags : str, optional
    Allowed values: c, d
    c
        Do not include column names in output
    d
        Report for geometries with no database records
verbose: bool, optional
    Verbose module output
    Default: False
quiet: bool, optional
    Quiet module output
    Default: False
superquiet: bool, optional
    Very quiet module output
    Default: False

DESCRIPTION

v.report generates a table showing the area present in each of the categories of a user-selected data layer.

Area is given in hectares, square meters, and square kilometers. If the units option is used, area is given in acres, square feet, and square miles.

Feet and acre units are always reported in their common versions (i.e. the International Foot, exactly 5280 feet in a mile), even when the coordinate reference system's standard map unit is the US Survey foot.

v.report works on the full map data; therefore, the current region is ignored. If you wish to spatially limit the statistics, a map subset must be created with v.in.region and v.overlay, and then run v.report on the new map.

EXAMPLE

North Carolina sample dataset:

v.report zipcodes_wake option=area units=hectares

In the output, there is an extra column added containing the results.

SEE ALSO

v.in.region, v.to.db, v.overlay

AUTHOR

Markus Neteler, GDF Hannover

SOURCE CODE

Available at: v.report source code (history)
Latest change: Friday Feb 07 19:16:09 2025 in commit a82a39f