找回密码
 注册
查看: 376|回复: 0

R语言 spgrass6包 initGRASS()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 15:06:47 | 显示全部楼层 |阅读模式
initGRASS(spgrass6)
initGRASS()所属R语言包:spgrass6

                                        Initiate GRASS session
                                         启动GRASS会话

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Run GRASS interface in an R session not started within GRASS. In general, most users will use initGRASS in throwaway locations, to use GRASS modules  on R objects without the need to define and populate a location. The function initializes environment variables used by GRASS, the .gisrc used by GRASS for further environment variables, and a temporary location.
运行在R会话内未启动GRASS GRASS接口。在一般情况下,大多数用户会使用initGRASS在一次性的位置,使用R对象的GRASS模块,而不需要定义和填充的位置。该函数初始化环境变量,使用草,草为进一步的环境变量。gisrc,和一个临时位置。

The locking functions are used internally, but are exposed for experienced R/GRASS scripters needing to use the GRASS module “g.mapset” through initGRASS in an existing GRASS location. In particular, “g.mapset” may leave a .gislock file in the current MAPSET, so it may be important to call unlink_.gislock to clean up before quitting the R session.
在内部使用锁定功能,但暴露经验丰富的R / GRASS的脚本编写需要使用GRASS的模块“g.mapset”,通过initGRASS在现有草地位置。特别是“g.mapset”可能会留下一个.gislock文件在当前的图集,所以可能会调用“unlink_.gislock前清理退出的R会话。


用法----------Usage----------


initGRASS(gisBase, home, SG, gisDbase, location, mapset, override = FALSE, use_g.dirseps.exe = TRUE, pid)
get.GIS_LOCK()
set.GIS_LOCK(pid)
unset.GIS_LOCK()
unlink_.gislock()



参数----------Arguments----------

参数:gisBase
The directory path to GRASS binaries and libraries
GRASS二进制文件和库文件的目录路径


参数:home
The directory in which to create the .gisrc file; defaults to $HOME on Unix systems and to USERPROFILE on Windows systems; can usually be set to tempdir()
要在其中创建。gisrc文件的目录,默认为在Unix系统上$HOME和USERPROFILE在Windows系统上,通常可以设置为tempdir()


参数:SG
An optional SpatialGrid object to define the DEFAULT_WIND of the temporary location
一个可选的SpatialGrid对象定义DEFAULT_WIND的临时位置


参数:gisDbase
if missing, tempdir() will be used; GRASS GISDBASE directory for the working session
如果缺少,tempdir()将被使用;工作会议的GRASS GISDBASE目录的


参数:location
if missing, basename(tempfile()) will be used; GRASS location directory for the working session
如果缺少,basename(tempfile())将使用的GRASS位置目录工作会议


参数:mapset
if missing, basename(tempfile()) will be used; GRASS mapset directory for the working session
如果缺少,basename(tempfile())将使用GRASS图集目录工作会议


参数:override
default FALSE, set to TRUE if accidental trashing of GRASS .gisrc files and locations is not a problem
默认是false,设置为TRUE,如果意外捣毁GRASS。gisrc的文件和位置是没有问题的


参数:use_g.dirseps.exe
default TRUE; when TRUE appears to work for WinGRASS Native binaries, when FALSE for QGIS GRASS binaries; ignored on other platforms.
默认情况下TRUE,TRUE时会出现本机二进制文件,当WinGRASS FALSE为QGIS GRASS二进制文件,忽略其他平台上工作。


参数:pid
default as.integer(round(runif(1, 1, 1000))), integer used to identify GIS_LOCK; the value here is arbitrary, but probably should be set correctly
默认的as.integer(round(runif(1, 1, 1000))),整数用于识别GIS_LOCK,这里的值是任意的,但可能必须正确设定


Details

详细信息----------Details----------

The function establishes an out-of-GRASS working environment providing GRASS commands with the environment variable support required, and may also provide a temporary location for use until the end of the running R session if the home argument is set to tempdir(), and the gisDbase argument is not given. Running gmeta6 shows where the location is, should it be desired to archive it before leaving R.
功能建立了一个草的工作环境,提供GRASS命令的环境变量所需的支持,也可以提供一个临时的位置使用,直到正在运行的R会话结束,如果home参数设置为 tempdir(),gisDbase参数没有。运行gmeta6的位置在哪里,应该是需要进行归档之前离开R.


值----------Value----------

The function runs gmeta6 before returning the current values of the running GRASS session that it provides.
该函数运行gmeta6前的运行GRASS会话,它提供了返回当前值。


注意----------Note----------

If any package command fails with a UTF-8 error from the XML package, try using setXMLencoding to work around the problem that GRASS modules declare –interface-description output as UTF-8 without ensuring that it is (French is of 6.4.0 RC5 latin1).
如果任何软件包命令失败,出现一个UTF-8错误的XML包,请尝试使用setXMLencoding来解决这个问题,GRASS模块的声明接口描述输出UTF-8,而确保它是(法国是6.4.0 RC5拉丁文)。


(作者)----------Author(s)----------


Roger S. Bivand, e-mail: <a href="mailto:Roger.Bivand@nhh.no">Roger.Bivand@nhh.no</a>



参见----------See Also----------

gmeta6
gmeta6


实例----------Examples----------


## Not run: [#不运行:]
initGRASS("/usr/local/grass-6.4.0", home=tempdir())
initGRASS("C:/GRASS", home=tempdir())

## End(Not run)[#(不执行)]

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-18 16:30 , Processed in 0.023325 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表