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

Henk Sierdsema Henk.Sierdsema at sovon.nl
Wed Jan 7 10:21:12 CET 2009


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:

> I have installed Expat XML Parser, but how do I rebuilt GDAL/OGR?

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

>
> Henk
>
>
> Henk Sierdsema
>
> SOVON Vogelonderzoek Nederland / SOVON Dutch Centre for Field Ornithology
>
> Rijksstraatweg 178
> 6573 DG  Beek-Ubbergen
> The Netherlands
> tel: +31 (0)24 6848145
> fax: +31 (0)24 6848122
>
>
>
> -----Oorspronkelijk bericht-----
> Van: Edzer Pebesma [mailto:edzer.pebesma at uni-muenster.de]
> Verzonden: dinsdag 6 januari 2009 12:16
> Aan: Henk Sierdsema
> CC: r-sig-geo at stat.math.ethz.ch
> Onderwerp: Re: [R-sig-Geo] Converting kml to shape (readOGR)
>
>
>
>
> Henk Sierdsema wrote:
>> Hi,
>>
>> I've been trying to convert a vector kml-file to an ESRI shape with readOGR(), but I don't manage to read the kml-file. Can anyone help me with this?
>>
> http://www.gdal.org/ogr/ogr_formats.html mentions at KML that "read
> support needs libexpat". Further it says "KML reading is only available
> if GDAL/OGR is built with the Expat XML Parser, otherwise only KML
> writing will be supported."
>
> Maybe this was missing while your gdal/rgdal was built?
> --
> Edzer
>> Thnx,
>>
>> Henk Sierdsema
>>
>>
>> SOVON Vogelonderzoek Nederland / SOVON Dutch Centre for Field Ornithology
>>
>> Rijksstraatweg 178
>> 6573 DG  Beek-Ubbergen
>> The Netherlands
>> tel: +31 (0)24 6848145
>> fax: +31 (0)24 6848122
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
>

--
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




More information about the R-sig-Geo mailing list