GRASS logo

NAME

v.example - {SHORT DESCRIPTION}.

KEYWORDS

vector, grid

SYNOPSIS

v.example
v.example --help
v.example [-p] output=name box=width,height [polygon_aoi=name] [layer=string] [column=name] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:

-p
Print attribute values of given column for input vector polygon_aoi
--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:

output=name [required]
Base name for tiles.
box=width,height [required]
Width and height of boxes in grid
polygon_aoi=name
Name of input vector map
Polygon to extract grid-tiles for
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
column=name
Name of attribute column

Table of contents

DESCRIPTION

v.example is an example for a GRASS GIS addon. Here comes a short description of the module and under Notes the usage of this example addon is explained. Note that this README.md is part of the documentation as well as part of the required components of a GRASS GIS addon.

New paragraph for more detailed description.

NOTES

Rather technical notes are here.

Description of the algorithm or method

Hints for usage, e.g. for large maps or a large number of input arguments.

Example GRASS GIS addon

This Repository contains a GRASS GIS addon including all meta files
like github workflows, linter configs, test setup etc.
When starting a new vector related GRASS GIS addon, it is recommended
to use this repository as a starting point.

See also common GRASS GIS addon methods which can be reused when writing your own addon.

See also README about How to create a GRASS GIS addon including
best practises, structure, how to name it and more sources which might be usefull.

Use pre-commit

It is highly recommended to install and use pre-commit
before submitting any new or modified code or any other content. The pre-commit
Git hooks set checks validity and executes automated formatting for
a range of file formats, including Python. Pre-commit installs
all necessary tools in a virtual environment upon first use.

If you never used pre-commit before, you must start by installing it on your
system. You only do it once:

python -m pip install pre-commit

Pre-commit must then be activated in the code repository. Change the directory
to the root folder and use the install command:

cd <actinia-core_source_dir>

# once per repo
pre-commit install

Pre-commit will then be automatically triggered by the git commit command. If
it finds any problem it will abort the commit and try to solve it automatically.
In that case review the changes and run again git add and
git commit.

It is also possible to run pre-commit manually, e.g:

pre-commit run linting --all-files

Or to target a specific set of files:

pre-commit run --files src/*

The pre-commit hooks set is defined in
.pre-commit-config.yaml.

It is possible to temporally disable the pre-commit hooks in the repo, e.g. while
working on older branches:

pre-commit uninstall

And to reactivate pre-commit again:

git switch main
pre-commit install

EXAMPLE

Create grid for current region with grid box size of 1000 x 1000

v.example output=tiles box=1000,1000

Extract tiles only for a given polygon “poly_aoi”

v.select ainput=tiles atype=area binput=poly_aoi btype=area operator=overlap output=tiles_aoi

Image with the result

image-alt
Figure: Vector map …. something.

SEE ALSO

AUTHORS

Name, mundialis

SOURCE CODE

Available at: v.example source code (history)

Accessed: Monday Jul 27 12:30:43 2026


Main index | Vector index | Topics index | Keywords index | Graphical index | Full index

© 2003-2026 GRASS Development Team, GRASS 8.5.1dev Reference Manual