Skip to content
Prev 4767 / 29559 Next

Converting kml to shape (readOGR)

Hi,
 
Thanks for the all the information on kml's and rebuilding gdal which sets me on a new paths using stuff like VC++, source codes, etc. I started this 'excercise' because we receive more and more kml-files (from Google Earth) of observers with the outlines of plots and/or observations. But reading kml's is apparently a lot more difficult than I anticipated. That may also explain why there are hardly any scripts or programs that can deal with it. Tom Hengl suggested to use the XML-package and I will also look into that. I will let you know about the results.
 
Henk
 
Henk Sierdsema
 
SOVON Vogelonderzoek Nederland / SOVON Dutch Centre for Field Ornithology
Rijksstraatweg 178
NL-6573 DG  Beek-Ubbergen
The Netherlands
tel: +31 (0)24 6848145
fax: +31 (0)24 6848122

 
________________________________

Van: Roger Bivand [mailto:Roger.Bivand at nhh.no]
Verzonden: di 6-1-2009 15:39
Aan: Henk Sierdsema
CC: Edzer Pebesma; r-sig-geo at stat.math.ethz.ch
Onderwerp: Re: [R-sig-Geo] Converting kml to shape (readOGR)
On Tue, 6 Jan 2009, Henk Sierdsema wrote:

            
Since you are on Windows, please read:

file.show(system.file("README.windows", package="rgdal"))

One suggestion is to use ogr2ogr in the latest Windows binary FWTools
collection for example through system() for doing this within R - see the
GDAL site for links. Building the package yourself using FWTools may be
useful if you need to know, if you don't, use an alternative. On
Unix/Linux/OSX with the underlying libraries present, this would have
worked (with the curiosity that only the KML driver is default write only,
but returns the read/write capability even if it cannot read - the choices
it gets are read or read/write, but no write-only.

Roger
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no