[R-sig-Geo] Converting kml to shape (readOGR)

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Tue Jan 6 14:01:42 CET 2009


2009/1/6 Henk Sierdsema <Henk.Sierdsema at sovon.nl>:

> Codes that produces the error:
>> kml <-readOGR(dsn=".",layer="Gebied2.kml")
> Error in ogrInfo(dsn = dsn, layer = layer) : Cannot open layer

 I get this error, but I think it is because OGR is a bit confused...

 I created meuse.kml from the example in writeOGR, but I can't read it
back - slightly different error though:

> m=readOGR(".","meuse.kml")
Error in ogrInfo(dsn = dsn, layer = layer) : Cannot open file

 - hmm lets hit the command line to see if my ogr supports KML:

$ ogrinfo --formats| grep -i KML
  -> "KML" (read/write)

 which seems good, yet:

$ ogrinfo meuse.kml
ERROR 1: Reading KML files is not currently supported

Fun.

Barry




More information about the R-sig-Geo mailing list