Learn R Programming

ENiRG (version 1.0.1)

map.info: Retrieve metadata of a raster file from current GRASS location.

Description

Metadata about GRASS environment and about a map (i.e., raster map resolution, type and range) will be returned as a list. User can choose GRASS format to store the information, i.e. in a .txt file, or to have output as a list in R.

Usage

map.info(map.name, format = "grass")

Arguments

map.name
character string. Name of a raster map stored in GRASS as returned from list.maps.
format
character string, by default "grass". Preferred output format between GRASS output format ("grass") and R list ("r").

Value

Return either a list or text.

References

https://grass.osgeo.org/grass70/manuals/r.info.html

See Also

import.egvs, initGRASS

Examples

Run this code
## Not run: 
# # starting GRASS session
# initGRASS("/usr/bin/grass-7.0.0", home=tempdir())
# initGRASS("C:/GRASS", home=tempdir())
# 
# ## Path to file
# file1 <- paste(system.file(package = "ENiRG"),"/ext/tann.asc", sep="")
# import.egvs(file1, "tann")
# 
# map.info("tann", format="r")
# 
# ## End(Not run)

Run the code above in your browser using DataLab