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

R语言 RSAGA包 rsaga.grid.calculus()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-28 21:19:06 | 显示全部楼层 |阅读模式
rsaga.grid.calculus(RSAGA)
rsaga.grid.calculus()所属R语言包:RSAGA

                                        SAGA Module Grid Calculus
                                         SAGA模块网格微积分

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

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

Perform Arithmetic Operations on Grids
执行算术运算网格


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


rsaga.grid.calculus(in.grids, out.grid, formula,
        env = rsaga.env(), ...)
rsaga.linear.combination(in.grids, out.grid,
        coef, cf.digits = 16, remove.zeros = FALSE,
        remove.ones = TRUE, env = rsaga.env(), ...)



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

参数:in.grids
input character vector: SAGA grid files (default file extension: .sgrd)
:输入字符向量:SAGA网格文件(默认文件扩展名:.sgrd)


参数:out.grid
output: grid file resulting from the cell-by-cell application of 'formula' to the grids. Existing files will be overwritten!
输出:网格文件导致从单元通过单元“公式”的网格中的应用。现有的文件将被覆盖!


参数:formula
character string of formula specifying the arithmetic operation to be performed on the in.grids (see Details); if this is a formula, only the right hand side will be used.
式的字符串上执行指定的算术运算的in.grids(详细),如果这是一个公式,只将被用于右手侧。


参数:coef
numeric: coefficient vector to be used for the linear combination of the in.grids. If coef as one more element than in.grids, the first one will be interpreted as an intercept.
数值:要用于的in.grids的线性组合的系数向量。如果coef作为一个元素比in.grids,第一个将被解释为一个拦截。


参数:cf.digits
integer: number of digits used when converting the coefficients to character strings (trailing zeros will be removed)
整数时使用的数字位数转换coefficients字符串(尾随零将被删除)


参数:remove.zeros
logical: if TRUE, terms (grids) with coefficient (numerically) equal to zero (after rounding to cf.digits digits) will be removed from the formula
逻辑:如果TRUE“条款(网格)的系数(数值)等于零(cf.digits数字四舍五入后)将被删除从公式


参数:remove.ones
logical: if TRUE (default), factors equal to 1 (after rounding to cf.digits digits) will be removed from the formula
逻辑:如果TRUE(默认),等于1(cf.digits数字四舍五入后)的因素将被从公式中删除


参数:env
character string, either '2.0.4' (default) or '2.0.5'; the command line arguments for the grid calculator module  changed from SAGA GIS 2.0.4 to 2.0.5, the function is now able to handle both situations; if using a different SAGA GIS version, try one of these two options, or look at rsaga.get.usage and use rsaga.geoprocessor directly; sorry for the inconvenience  
字符串,2 .0.4(默认)或2 .0.5; SAGA GIS的网格计算器模块的命令行参数改变2.0.4到2.0.5,现在的功能是能够处理这两种情况下;如果使用不同的SAGA GIS版本,请尝试这两个选项之一,或看rsaga.get.usage使用rsaga.geoprocessor直接的不便表示抱歉


参数:...
optional arguments to be passed to rsaga.geoprocessor, including the env RSAGA geoprocessing environment
可选参数传递给rsaga.geoprocessor,包括env RSAGAGEO处理环境


Details

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

The in.grids are represented in the formula by the letters a (for in.grids[1]), b etc. Thus, if in.grids[1] is Landsat TM channel 3 and in.grids[2] is channel 4, the NDVI formula (TM3-TM4)/(TM3+TM4) can be represented  by the character string "(a-b)/(a+b)" (any spaces are removed) or the formula ~(a-b)/(a+b) in the formula argument.
in.grids是代表中的formula的字母a(用于in.grids[1])b等等。因此,如果in.grids[1]是Landsat TM遥感通道3和in.grids[2]是频道4,则的NDVI式(TM3-TM4)/(TM3 + TM4)可以表示为字符串"(a-b)/(a+b)"(任何空格被删除)或公式<X >~(a-b)/(a+b)参数。

In addition to +, -, *, and /, the following operators and  functions are available for the formula definition:
除了+, - ,*,/,下列运算符和函数可用于formula定义:

^power
^电源

sin(a)sine
SIN(A)正弦

cos(a)cosine
余弦(一)余弦

tan(a)tangent
棕褐色(一)切线

asin(a)arc sine
ASIN(一)圆弧正弦

acos(a)arc cosine
ACOS(一)反余弦

atan(a)arc tangent
ATAN()反正切

atan2(a,b)arc tangent of b/a
atan2的(一,二)b / a的弧正切

abs(a)absolute value
ABS(A)绝对值

int(a)convert to integer
(一)转换为整数

sqrt(a)square root
SQRT()平方根

ln(a)natural logarithm
LN(一)自然对数

mod(a,b)modulo
MOD(A,B)模

gt(a, b)returns 1 if a greater b
GT(A,B)返回1,如果一个更大的b

lt(a, b)returns 1 if a lower b
LT(A,B)返回1,如果一个较低的b

eq(a, b)returns 1 if a equal b
式(A,B)返回1,如果等于B

ifelse(switch, x, y)returns x if switch equals 1 else y
ifelse(开关,X,Y),如果开关返回x等于1,否则&#376;

Using remove.zeros=FALSE might have the side effect that no data areas in the grid with coefficient 0 are passed on to the results
使用remove.zeros=FALSE可能有副作用,无数据区传递网格中的系数为0的结果


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

The type of object returned depends on the intern argument passed to the rsaga.geoprocessor. For intern=FALSE it is a numerical error code (0: success), or otherwise (default)
返回的对象的类型取决于intern参数传递的rsaga.geoprocessor。对于intern=FALSE它是一个数字错误代码(0:成功),或以其他方式(默认)


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

This function uses module 1 in the SAGA library grid_calculus.
此功能使用模块1在SAGA库grid_calculus中。


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


Alexander Brenning (R interface), Olaf Conrad (SAGA module)



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

local.function, focal.function, and multi.focal.function for a more flexible framework for combining grids or applying local and focal functions;
local.function,focal.function和multi.focal.function相结合的网格或应用本地和联络功能更灵活的框架;


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


## Not run: [#不运行:]
# using SAGA grids:[使用SAGA格:]
# calculate the NDVI from Landsat TM bands 3 and 4:[计算NDVI从陆地卫星TM波段3和4:]
rsaga.grid.calculus(c("tm3.sgrd","tm4.sgrd"), "ndvi.sgrd", ~(a-b)/(a+b))
# apply a linear regression equation to grids:[应用线性回归方程网格:]
coefs = c(20,-0.6)
# maybe from a linear regression of mean annual air temperature (MAAT)[也许从一元线性回归的年平均气温(MAAT)]
# against elevation - something like:[对高度 - 是这样的:]
# coefs = coef( lm( maat ~ elevation ) )[COEFS系数(LM(MAAT高程))]
rsaga.linear.combination("elevation.sgrd", "maat.sgrd", coefs)
# equivalent:[相当于:]
rsaga.grid.calculus("elevation.sgrd", "maat.sgrd", ~ 20 - 0.6*a)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-27 04:01 , Processed in 0.030992 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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