Reading KML files into R
I'm building a workflow for reading multiple-geometry KML files into R. This is my working map , with point and path geometries. The (reproducible) R script is: library(rgdal) setwd( {SPECIFY A FOLDER} ) download.file("http://www.scribblemaps.com/maps/kml/shackleton.kml", "file.kml") (lyr = ogrListLayers("file.kml")) map = readOGR ("file.kml", layer=lyr, verbose = TRUE, drop_unsupported_fields=T, dropNULLGeometries=T) which fails with: Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv) : Cannot open layer Any ideas how to work around this? I've managed to