asc.from.raster(SDMTools)
asc.from.raster()所属R语言包:SDMTools
Raster conversion functions for adehabitat, raster and sp packages
光栅转换功能adehabitat,光栅和SP的包
译者:生物统计家园网 机器人LoveR
描述----------Description----------
asc.from.raster and asc.from.sp extracts data from objects of class 'RasterLayer' (raster package) and class 'SpatialGridDataFrame' (sp package) into an object of class 'asc' (SDMTools & adehabitat packages). <br> <br> raster.from.asc and sp.from.asc does the reverse.<br><br> as.asc creates an object of class 'asc' (SDMTools & adehabitat packages) from a matrix of data. Code & helpfile associated with as.asc were modified from adehabitat package.
asc.from.raster和asc.from.sp中提取数据对象之类的RasterLayer的“(光栅包)类的SpatialGridDataFrame(SP包),对象类ASC(SDMTools和adehabitat包)。参考参考raster.from.asc和sp.from.asc则相反。参考参考as.asc创建一个对象从一个矩阵类ASC(SDMTools adehabitat包)的数据。代码和修改adehabitat包帮助文件与as.asc。
用法----------Usage----------
asc.from.raster(x)
raster.from.asc(x,projs=NA)
asc.from.sp(x)
sp.from.asc(x,projs=CRS(as.character(NA)))
as.asc(x, xll = 1, yll = 1, cellsize = 1, type = c("numeric", "factor"),
lev = levels(factor(x)))
参数----------Arguments----------
参数:x
is an object of class 'asc', 'RasterLayer' or 'SpatialGridDataFrame'. For the function as.asc, a matrix
一个目的是类递增,RasterLayer或SpatialGridDataFrame。有关的功能as.asc,以矩阵
参数:projs
is a CRS projection string of the Proj4 package
是CRS投影字符串的PROJ4封装
参数:xll
the x coordinate of the center of the lower left pixel of the map
左下像素的图的中心的x坐标
参数:yll
the y coordinate of the center of the lower left pixel of the map
左下像素的图的中心的y坐标
参数:cellsize
the size of a pixel on the studied map
研究的图上的像素的大小
参数:type
a character string. Either "numeric" or "factor"
一个字符串。无论是"numeric"或"factor"
参数:lev
if type = "factor", either a vector giving the labels of the factor levels, or the name of a file giving the correspondence table of the map (see adehabitat as.asc helpfile details)
如果type = "factor",无论是一个向量给因子水平的标签,或一个文件,在图上的对应表(见adehabitat as.asc帮助文件细节的名称)
Details
详细信息----------Details----------
These functions provide capabilities of using scripts / functions from many packages including adehabitat (plus e.g, SDMTools), sp (plus e.g., maptools, rgdal) and raster.
这些功能使用脚本/包,包括adehabitat(加如SDMTools)的,SP(例如,maptools,加上rgdal)和栅格功能从提供的功能。
值----------Value----------
Returns an object of class requested.
返回请求的类的对象。
(作者)----------Author(s)----------
Jeremy VanDerWal <a href="mailto:jjvanderwal@gmail.com">jjvanderwal@gmail.com</a>
实例----------Examples----------
#create a simple object of class 'asc'[创建一个简单的对象类的ASC“]
tasc = as.asc(matrix(rep(x=1:10, times=1000),nr=100)); print(tasc)
str(tasc)
#convert to RasterLayer[转换为RasterLayer]
traster = raster.from.asc(tasc)
str(traster)
#convert to SpatialGridDataFrame[转换为SpatialGridDataFrame]
tgrid = sp.from.asc(tasc)
str(tgrid)
#create a basic object of class asc[创建一个基本的对象的类递增]
tasc = as.asc(matrix(rep(x=1:10, times=1000),nr=100)); print(tasc)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|