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

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

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

                                        Read and write GRASS 6+ vector object files
                                         读取和写入GRASS 6 +矢量对象文件

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

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

readVECT6 moves one GRASS 6+ vector object file with attribute data through a temporary shapefile to a Spatial*DataFrame object of type determined by the GRASS 6+ vector object; writeVECT6 moves a Spatial*DataFrame object through a temporary shapefile to a GRASS vector object file. vect2neigh returns neighbour pairs with shared boundary length as described by Markus Neteler, in https://stat.ethz.ch/pipermail/r-sig-geo/2005-October/000616.html. cygwin_clean_temp can be called to try to clean the GRASS mapset-specific temporary directory under cygwin.
readVECT6移动一个GRASS 6 +矢量对象通过一个临时的shapefile空间的GRASS 6 *数据框对象的类型与属性数据文件+矢量对象,“writeVECT6通过移动空间*数据框对象临时的shapefile到GRASS矢量对象文件。 vect2neigh返回邻居对共享边界长度由Markus Neteler,的https://stat.ethz.ch/pipermail/r-sig-geo/2005-October/000616.html。 cygwin_clean_temp可以被称为Cygwin下尝试到干净的草地的图集,具体的临时目录。


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


readVECT6(vname, layer, type=NULL, plugin=NULL, remove.duplicates = TRUE,
ignore.stderr = NULL, with_prj=TRUE, with_c=FALSE, mapset=NULL,
pointDropZ=FALSE, driver="ESRI Shapefile")
writeVECT6(SDF, vname,  v.in.ogr_flags=NULL, ignore.stderr = NULL,
driver="ESRI Shapefile")
vInfo(vname, layer, ignore.stderr = NULL)
vColumns(vname, layer, ignore.stderr = NULL)
vDataCount(vname, layer, ignore.stderr = NULL)
vect2neigh(vname, ID=NULL, ignore.stderr = NULL, remove=TRUE, vname2=NULL,
units="k")








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

参数:vname
A GRASS 6+ vector file name
一草6 +矢量文件名


参数:layer
a layer name (integer in GRASS 6, string in GRASS 7); if missing set to default of 1
如果缺少一个图层名称(整数的GRASS 6,串在GRASS 7);设置为默认的1


参数:type
override type detection when multiple types are non-zero, passed to v.out.ogr
重写类型检测多种类型的非零时,传递给v.out.ogr


参数:plugin
default NULL for auto-detection, may be set to FALSE to avoid or TRUE if the plugin is known to be available; if the plugin is used, no further arguments other than mapset are respected
默认为NULL的自动检测,可能会被设置为false以避免或TRUE如果插件被称为是可用的,如果插件时,没有进一步的论据以外图集得到尊重


参数:remove.duplicates
In line and area vector objects, multiple geometrical features may be associated with a single cat number, leading to duplication of data rows; this argument attempts to combine the geometrical features so that they match a single data row
多个几何特征线和面的矢量对象,可能会与一个单一的猫的数量,从而导致重复的数据行,这种说法几何特征结合起来,使他们匹配一个单一的数据行


参数:ignore.stderr
default NULL, taking the value set by set.ignore.stderrOption, can be set to TRUE to silence system() output to standard error; does not apply on Windows platforms
默认NULL,采取set.ignore.stderrOption中设置的值,可以设置为TRUE保持沉默system()输出到标准错误,并不适用于Windows平台


参数:with_prj
default TRUE, write ESRI-style PRJ file for transfered data
默认为true,写ESRI风格的PRJ文件传输的数据


参数:with_c
if TRUE, export features with category (labeled) only; by default all features are exported
如果为TRUE,出口类别(标记)功能,默认情况下所有的功能都出口


参数:mapset
if plugin is TRUE, the mapset of the file to be imported may be changed from the current mapset by passing a character string
插件是TRUE,如果要导入的文件图集可能会改变目前的图集,通过一个字符串


参数:pointDropZ
default FALSE, if TRUE, discard third coordinates for point geometries; third coordinates are alway discarded for line and polygon geometries
默认是false,如果为TRUE,则丢弃第三点的几何坐标,第三个坐标线和多边形的几何形状,是常丢弃


参数:driver
default "ESRI Shapefile"; a valid OGR writable driver name to define the file format for intermediate files, one of c("GML", "SQLite"), c("ESRI_Shapefile", "MapInfo_File")
默认的"ESRI Shapefile";一个有效的的OGR可写驱动程序的名称来定义的文件格式的中间文件,c("GML", "SQLite"), c("ESRI_Shapefile", "MapInfo_File")


参数:SDF
A Spatial*DataFrame to be moved to GRASS6 as a vector object, for SpatialPointsDataFrame, SpatialLinesDataFrame, and SpatialPolygonsDataFrame objects
移动一个空间*数据框,GRASS6矢量对象,SpatialPointsDataFrame,SpatialLinesDataFrame,和SpatialPolygonsDataFrame对象


参数:v.in.ogr_flags
Character vector containing additional optional flags and/or options for v.in.ogr, particularly "o" and "overwrite"
字符向量包含其他可选的标志和/或购股权为v.in.ogr,特别是“O”和“覆盖”


参数:ID
A valid DB column name for unique identifiers (optional)
一个有效的DB列名的唯一标识符(可选)


参数:remove
default TRUE, remove copied vectors created in vect2neigh
默认为true,删除复制的向量中创建vect2neigh


参数:vname2
If on a previous run, remove was FALSE, the name of the temporary vector may be given to circumvent its generation
如果在以前的运行,删除是假的,可给予临时vector的名称来逃避其代


参数:units
default “k”; see GRASS v.to.db manual page for alternatives
默认的“K”,见的GRASSv.to.db手册页的替代品


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

readVECT6 imports a GRASS6+ vector object into a Spatial*DataFrame object with the type determined by the type of the GRASS6 vector object; getSites6 returns a data frame. vect2neigh returns a data frame object with left and right neighbours and boundary lengths, also given class GRASSneigh and spatial.neighbour (as used in spdep). The incantation to retrieve the neighbours list is sn2listw(vect2neigh())$neighbours, and to retrieve the boundary lengths: sn2listw(vect2neigh())$weights. The GRASSneigh object has two other useful attributes: external is a vector giving the length of shared boundary between each polygon and the external area, and total giving each polygon's total boundary length.
readVECT6进口的GRASS6 +矢量对象转换成数据框对象的GRASS6矢量对象的类型的类型的空间*getSites6返回一个数据框。 vect2neigh返回一个数据框的对象,也有左,右的邻居和边界长度类GRASSneigh和spatial.neighbour(在spdep)。咒语检索的邻居列表是sn2listw(vect2neigh())$neighbours,和检索的边界长度:sn2listw(vect2neigh())$weights。 GRASSneigh对象有两个其他有用的属性:外部是一个向量,每个多边形的外部区域之间的共同边界的长度,并总给人每个多边形的边界长度。

Note that GRASS6 vectors should be rebuilt by running “v.build.all” in each mapset.
需要注意的是应该重建GRASS6向量运行“v.build.all在每个图集”。


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

Please note that the OGR drivers used may not handle missing data gracefully. From rgdal release 0.5-27, missing values are taken as unset OGR field values. If the OGR driver encodes them in this way, NAs will be moved across the interface correctly from R to GRASS, and from GRASS to R using the OGR GRASS vector plugin. Work is continuing to correct v.out.ogr so that it emits unset fields, which affects users with no OGR GRASS plugin for the present. Thanks to Dylan Beaudette for helping with missing data handling.
请注意,,OGR驱动器可能无法处理缺失数据的优雅。从rgdal发布0.5-27,遗漏值的作为未设置OGR字段值。 OGR驱动程序如果以这种方式对它们进行编码,NAS将通过该接口的移动正确,从R到基层,从基层到R使用OGR的GRASS向量插件。工作是继续纠正v.out.ogr,因此,它发出未设置领域,这对用户的影响,目前没有的OGR草插件。感谢到迪伦Beaudette的为帮助丢失的数据处理。

Please also note that, on Windows and Cygwin systems, the temporary shapefiles are not removed by the interface functions, nor can GRASS remove them on termination - they must for the time being be removed manually. Windows believes that the GDAL/OGR library is still using them.
另请注意,在Windows和Cygwin系统,临时shape文件不会被删除的接口功能,也可以GRASS将他们终止 - 的时间,他们必须被手动删除。 Windows认为GDAL / OGR库仍然使用。


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


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



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


if (nchar(Sys.getenv("GISRC")) > 0) {
  require(rgdal)
  ois <- get.ignore.stderrOption()
  set.ignore.stderrOption(TRUE)
  if (execGRASS("g.version", intern=TRUE) > "GRASS 7") {
    execGRASS("v.info", map="bugsites", layer="1")
  } else {
    execGRASS("v.info", map="bugsites", layer=1L)
  }
  print(vInfo("bugsites"))
  bugs <- readVECT6("bugsites", plugin=NULL)
  print(summary(bugs))
  bugs1 <- readVECT6("bugsites", plugin=FALSE)
  print(summary(bugs1))
  writeVECT6(bugs, "newbugs", v.in.ogr_flags=c("o", "overwrite"))
  if (execGRASS("g.version", intern=TRUE) > "GRASS 7") {
    execGRASS("v.info", map="newbugs", layer="1")
  } else {
    execGRASS("v.info", map="newbugs", layer=1L)
  }
  nbugs <- readVECT6("newbugs")
  print(summary(nbugs))
  print(vInfo("roads"))
  roads <- readVECT6("roads")
  print(summary(roads))
  set.ignore.stderrOption(ois)
}

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-18 18:35 , Processed in 0.023466 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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