Description Usage Arguments Value Author(s) Examples
GRASS LOCATION metadata are read into a list in R; helper function getLocationProj returns an spproj-compliant PROJ.4 string of projection information. The helper function gmeta2grd
creates a GridTopology object from the current GRASS mapset region definitions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | gmeta(ignore.stderr = FALSE)
getLocationProj(ignore.stderr = FALSE)
gmeta2grd(ignore.stderr = FALSE)
## S3 method for class 'gmeta'
print(x, ...)
get.ignore.stderrOption()
get.stop_on_no_flags_parasOption()
get.useGDALOption()
get.pluginOption()
get.echoCmdOption()
get.useInternOption()
get.legacyExecOption()
get.defaultFlagsOption()
get.suppressEchoCmdInFuncOption()
set.ignore.stderrOption(value)
set.stop_on_no_flags_parasOption(value)
set.useGDALOption(value)
set.pluginOption(value)
set.echoCmdOption(value)
set.useInternOption(value)
set.legacyExecOption(value)
set.defaultFlagsOption(value)
set.suppressEchoCmdInFuncOption(value)
|
ignore.stderr |
default FALSE, can be set to TRUE to silence |
x |
S3 object returned by gmeta |
... |
arguments passed through print method |
value |
logical value for setting options on |
Returns list of g.gisenv, g.region -g3, and g.proj values
Roger S. Bivand, e-mail: Roger.Bivand@nhh.no.
1 2 3 4 5 6 7 8 9 10 11 12 | if (nchar(Sys.getenv("GISRC")) > 0 &&
read.dcf(Sys.getenv("GISRC"))[1,"LOCATION_NAME"] == "nc_basic_spm_grass7") {
G <- gmeta()
print(G)
CRS(getLocationProj())
grd <- gmeta2grd()
print(grd)
ncells <- prod(slot(grd, "cells.dim"))
df <- data.frame(k=rep(1, ncells))
mask_SG <- SpatialGridDataFrame(grd, data=df)
print(summary(mask_SG))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.