我已经从栅格图层中提取了值,现在想将其转换为shapefile。 csv文件包含sf软件包中不同范围的值和一列.geo。在R中将csv文件转换为shapefile的任何想法。
library(sf) # Read data file LS2013<-read.csv("https://raw.githubusercontent.com/tuyenhavan/Rice-Paper/master/LS_2013.csv",header = T) head(LS2013) .geo 1 {"type":"Point","coordinates":[106.0283799940066,21.191342664375124]} 2 {"type":"Point","coordinates":[106.02664540369682,21.19108403651402]} 3 {"type":"Point","coordinates":[106.02693524526529,21.191084036514017]} 4 {"type":"Point","coordinates":[106.02722508683375,21.19107957741297]} 5 {"type":"Point","coordinates":[106.02751492840221,21.19107957741297]} 6 {"type":"Point","coordinates":[106.02780031086967,21.19107511831191]}
shapefile可以在地理坐标系中(4326)。
谢谢。
我已经从栅格图层中提取了值,现在想将其转换为shapefile。 csv文件包含sf软件包中不同范围的值和一列.geo。有关转换csv文件的任何想法...
似乎文件是JSON
或geoJSON
文件。您可以直接使用sf::st_read
: