I am trying to read a KML file in R using Reading KML file into R. The file is available here as a KMZ; following suggestions from other help files, I converted it to a KML by opening it in Google Earth, right-clicking the data layer, clicking 'save as', and saving as a .kml.
Here is what I've done so far:
import <- ogrListLayers("Burrows/Burrows_et_al_Nature_traj_ocean_NH1.kml")
# [1] "SST" "SST_start" "SST_1"
attr(import, "driver")
# [1] "LIBKML"
attr(import, "nlayers")
# [1] 3
foo = readOGR("Burrows/Burrows_et_al_Nature_traj_ocean_NH1.kml", "SST")
# no features foundError in readOGR("Burrows/Burrows_et_al_Nature_traj_ocean_NH1.kml", "SST") :
# no features found
Because the output of ogrListLayers()
makes it clear that the path name is correct and R can access the .kml file well enough to list the layer names, I'm confused why readOGR()
isn't working.
What am I missing?