[R-sig-Geo] add a field to sf object and point shape in kml

Barry Rowlingson b@row||ng@on @end|ng |rom gm@||@com
Tue May 7 17:06:58 CEST 2019

On Tue, May 7, 2019 at 12:54 PM Marta Rufino <marta.m.rufino using gmail.com>

> Hi,
> Two very simple question:
> 2)
> Can we change the polygon col/fill and point shape/col when exporting sf
> obejcts to kml, using the function:
> st_write(sf.object, " sf.object  .kml", driver='kml')
Setting styles for writing KML using GDAL/OGR is described here:


For example I have an sf data frame of Osprey tracking data (as points),
and if I create a new field:


and then:

st_write(osp, "/tmp/osp.kml",driver="libkml")

then the features in the KML get written with:


I realise now that "PEN" is probably wrong for point features, but it
should all be explained in the google OGR style docs:


and in the links in that GIS stack exchange question...


	[[alternative HTML version deleted]]

More information about the R-sig-Geo mailing list