• Welcome to LiuJason's Blog!

R语言中使用readOGR读取shp文件坐标转换|经纬度值很大

R语言 Jason 5 years ago (2019-02-26) 2182 Views 0 Comments QR code of this page

我在绘制比利时海岸线的研究地点地图时,下载了geo.be的shp文件,使用如下代码导入的时候出现了问题:经纬度值非常大

be_map <- readOGR("SiteMap/resources/AD_3_District.shp")

这是由于使用的坐标系不同导致的,因此需要做转换:

be_map <- spTransform(be_map, CRS("+proj=longlat +datum=WGS84"))
be_map <- fortify(be_map)

搞定:


This article is under CC BY-NC-SA 4.0 license.
Please quote the original link:https://www.liujason.com/article/219.html
Like (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址