v.in.region
Creates a vector polygon from the current region extent.
v.in.region [-d] output=name [type=string] [cat=integer] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]
Example:
v.in.region output=name
grass.script.run_command("v.in.region", output, type="area", cat=1, flags=None, overwrite=False, verbose=False, quiet=False, superquiet=False)
Example:
gs.run_command("v.in.region", output="name")
Parameters
output=name [required]
Name for output vector map
type=string
Select type: line or area
Allowed values: line, area
Default: area
cat=integer
Category value
Default: 1
-d
Densify lines using region resolution
--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--qq
Very quiet module output
--ui
Force launching GUI dialog
output : str, required
Name for output vector map
Used as: output, vector, name
type : str, optional
Select type: line or area
Allowed values: line, area
Default: area
cat : int, optional
Category value
Used as: input, cats
Default: 1
flags : str, optional
Allowed values: d
d
Densify lines using region resolution
overwrite: bool, optional
Allow output files to overwrite existing files
Default: False
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.in.region creates a new vector map from current region extent.
If the output of v.in.region is to be used for raster reprojection, the -d flag should be used after setting the region to the raster map to be reprojected with r.proj.
EXAMPLE
The example is based on the North Carolina sample data. To create a bounding box vector map based on a raster map, the computational region is first set to the raster map. Then a vector bounding box is created based on the actual computational region (in this case precisely reflecting the pixel geometry of the raster map), resulting in a new vector polygon:
g.region raster=soils_Kfactor -p
v.in.region output=soils_Kfactor_bbox
v.info map=soils_Kfactor_bbox
SEE ALSO
AUTHOR
Radim Blazek
SOURCE CODE
Available at: v.in.region source code
(history)
Latest change: Friday Feb 07 19:16:09 2025 in commit a82a39f