[R-sig-Geo] rgdal writeOGR, KML examples

Roger Bivand Roger.Bivand at nhh.no
Mon Feb 15 08:24:12 CET 2010


On Sat, 13 Feb 2010, Markus Loecher wrote:

> Dear all,
> I was wondering if anyone has a few more examples on creating KML files with
> the fantastic writeOGR() function in the rgdal package. The meuse example is
> great but I am particularly interested in modifying some of the simple style
> attributes (marker size, type, etc..) in the resulting kml files. Is that
> possible at all via writeOGR(..., , driver="KML") ?

What is possible in writeOGR() is what is possible in the OGR driver, so 
please refer to:

http://www.gdal.org/ogr/drv_kml.html

You will see that there is "little support" for formatting, but as the 
driver documentation says, try a few simple test files to see what can be 
done. Alternatives not using this driver are kmlLine() and kmlPolygon() in 
maptools, which may permit more customising, or the GE_SpatialGrid() and 
kmlOverlay() tandem in maptools for making an image overlay. This permits 
arbitrary R symbology, but no querying in GE.

Hope this helps,

Roger

>
> Thanks !
>
> Markus Loecher
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> 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