GRASS logo

Note: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the current manual page.

NAME

v.what.rast.label - Uploads raster values and labels to vector point layer

KEYWORDS

vector, sampling, raster, position, querying, attribute table, surface information

SYNOPSIS

v.what.rast.label
v.what.rast.label --help
v.what.rast.label [-oc] vector=name raster=name[,name,...] [raster2=name[,name,...]] output=name [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:

-o
Include columns of input vector map
-c
Include point coordinates
--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:

vector=name [required]
Name of vector map
Name vector points map for which to add raster values & labels
raster=name[,name,...] [required]
Name of raster map(s) with labels to be queried
raster2=name[,name,...]
Name of raster map(s) without labels to be queried
output=name [required]
Name of output point layer

Table of contents

DESCRIPTION

v.what.rast.label retrieves raster values and labels from one or more given raster maps for each point stored in the input vector map. The name of the columns with the raster values start with ID_, followed by the name of the raster layer from which the values are taken. For the name of the column with the raster labels, the name of the raster from which the label is taken is used.

Optionally, the user can define raster layers without labels. In that case only the raster values are uploaded to a column with the name of that raster.

Another option is to add columns with point coordinates to the attribute table of the output vector layer.

The user can opt to include the attribute columns of the input vector layer in the output. In that case, the columns with the raster values and labels will appear after the columns from the input vector layer.

NOTES

Points and centroids with shared category number cannot be processed. To solve this, unique categories may be added with v.category in a separate layer. See v.what.rast for details.

If you only want to upload raster values at positions of vector points to the attribute table of that vector layer, use v.what.rast instead.

EXAMPLES

Get the POI within the bounds of the land use map.

g.region raster=landuse
v.in.region output=regionbounds
v.select ainput=points_of_interest binput=regionbounds output=POI_select operator=within

Extract raster values and labels from landuse map. Columns from the input map (POI_select) are not included.

v.what.rast.label vector=POI_select raster=landuse raster2=elevation output=POI_landuse1

Extract raster values and labels from landuse map. Use the -0 flag to include the columns from the input map (POI_select)

v.what.rast.label -o vector=POI_select raster=landuse raster2=elevation output=POI_landuse2

Extract raster values and labels from landuse map and values from elevation map. Use the -0 flag to include the columns from the input map (POI_select)

v.what.rast.label -o vector=POI_select@user1 raster=landuse raster2=elevation output=POI_landuse3

Extract raster values and labels from landuse map and values from elevation map. Use the -0 flag to include the columns from the input map (POI_select). Use the -c flag to include the point coordinates

v.what.rast.label -o -c vector=POI_select@user1 raster=landuse@PERMANENT raster2=elevation@PERMANENT output=POI_landuse4

SEE ALSO

v.what.rast, v.what.rast.multi (addon)

AUTHORS

Paulo van Breugel

SOURCE CODE

Available at: v.what.rast.label source code (history)

Latest change: Monday Jan 30 19:52:26 2023 in commit: cac8d9d848299297977d1315b7e90cc3f7698730


Note: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the current manual page.

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

© 2003-2023 GRASS Development Team, GRASS GIS 8.2.2dev Reference Manual