wrld_simpl_lessIslands(rworldmap)
wrld_simpl_lessIslands()所属R语言包:rworldmap
World map simple with small islands removed to make smaller
世界图简单的删除,以使较小的小岛屿
译者:生物统计家园网 机器人LoveR
描述----------Description----------
A 'SpatialPolygonsDataFrame' [package "sp"] object containing a simplified world map. Polygons are attributed with country codes.
ASpatialPolygonsDataFrame“包”SP“的对象,它包含一个简单的世界图。多边形是由于国家代码。
用法----------Usage----------
data(wrld_simpl_lessIslands)
格式----------Format----------
The format is:
其格式为:
源----------Source----------
shapefile obtained from : http://thematicmapping.org/downloads/world_borders.php Text from the site : "The original shapefile (world_borders.zip, 3.2 MB) was downloaded from the Mapping Hacks website: http://www.mappinghacks.com/data/
shapefile中获得:http://thematicmapping.org/downloads/world_borders.php文本从该网站:“原来的的shapefile(world_borders.zip,3.2 MB)下载的映射的击破网站:http://www.mappinghacks, .COM /数据/
The dataset is available under a Creative Commons Attribution-Share Alike License. If you use this dataset, please provide a link to this website."
该数据集是下一个知识共享署名 - 相同方式共享许可。如果你使用这个数据集,请提供一个链接到这个网站。“
imported to R and cleaned by Roger Bivand small islands removed by Andy South to reduce size of map and increase speed of printing using the following code : #based on a posting to r-sig-geo by Hans-Jorg Bibiko on 29.01.2009 #see http://www.mail-archive.com/r-sig-geo@stat.math.ethz.ch/msg04341.html data(wrld_simpl) minIslandSizeForInclusionInMap <- 1 #prob in degrees
导入到R和由罗杰·Bivand的小岛屿由Andy南移除,以减少大小的图,并提高打印速度,使用下面的代码:#基础上贴出的R-SIG-GEO汉斯 - 约尔格Bibiko的清洗于2009年1月29日#看到http://www.mail-archive.com/r-sig-geo @ stat.math.ethz.ch/msg04341.html数据(wrld_simpl)的minIslandSizeForInclusionInMap < - 1#的概率在度
#for each country in the map for (i in (1:length(wrld_simpl@polygons))) #count the number of polygons in the country polyCnt <- length(wrld_simpl@polygons[[i]]@Polygons) if (polyCnt > 2) #just select those polygons with area > 0.1 pO <- sapply(wrld_simpl@polygons[[i]]@Polygons, function(x) slot(x,'area') > minIslandSizeForInclusionInMap )
#(我在(1:长度(wrld_simpl多边形)))#计算中的多边形数国家polyCnt < - 长度(“wrld_simpl @多边形[我] @多边形)如果在图上的每一个国家( polyCnt> 2)只选择那些多边形面积> 0.1 PO < - sapply(wrld_simpl @多边形[[]] @多边形,功能(X)插槽(x,区域)> minIslandSizeForInclusionInMap)
#get new plot order new_pO <- pO[ wrld_simpl@polygons[[i]]@plotOrder ]
#获得新的图的顺序new_pO < - PO [wrld_simpl @多边形[[]] @ plotOrder]
#i think for each country this then just doesn't plot all of the polygons #(despite the fact that the coords are perhaps still in there ?) wrld_simpl@polygons[[i]]@plotOrder <- wrld_simpl@polygons[[i]]@plotOrder[ new_pO ] plot(wrld_simpl) wrld_simpl_lessIslands <- wrld_simpl
#我认为每个国家只是不绘制的多边形(尽管可能仍然在那里的坐标?)wrld_simpl多边形[[]] @ plotOrder < - wrld_simpl @多边形[ I]] @ plotOrder [new_pO]的图(wrld_simpl)wrld_simpl_lessIslands < - wrld_simpl
实例----------Examples----------
data(wrld_simpl_lessIslands)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|