【问题标题】:Geojson coordinates to R sp coordinatesGeojson 坐标到 R sp 坐标
【发布时间】:2018-04-20 17:27:55
【问题描述】:

我正在应用的方法用于: Percentage of overlap between polygons

它工作得很好,除了它使用坐标写为 x,x,x,x y,y,y,y 等的 R sp。就我而言,我有数百个坐标写为 [x,y] 的 geojson 多边形, [x,y], [[x,y] 等。

将geojson坐标写成[x,y],[x,y],[[x,y]转换成坐标写成x,x,x,x y,y,y的R sp的方法是什么,是吗?

【问题讨论】:

  • geojsonsf::geojson_sf("your.json") 会将 GeoJSON 转换为 sf 对象(其中 sf 已取代 sp

标签: r geojson sp


【解决方案1】:

试试

install.packages("geojsonio")
geojsonio::geojson_read("file.geojson", what = "sp")

【讨论】:

    猜你喜欢
    • 2013-08-05
    • 1970-01-01
    • 2016-10-06
    • 1970-01-01
    • 1970-01-01
    • 2022-07-28
    • 1970-01-01
    • 2021-12-26
    • 2015-04-29
    相关资源
    最近更新 更多