[R-sig-Geo] add a field to sf object and point shape in kml
m@rt@@m@ru||no @end|ng |rom gm@||@com
Tue May 7 19:37:52 CEST 2019
Cool! Thank you for the very quick and efficient reply.
Just remembered an alternative for the kml challenge... using plotKML after
converting it to spatial.
plotKML(as(my.sf.file, "Spatial"), colour_scale=SAGA_pal[]) # this
function has a very detailed help with many easy options. This is just an
It is a pity that it still does not work directly with sf objects (hehehe -
Edzer? Tom?) - but this way it is fine.
I am trying to retrieve the issues I found previously with adding fields
this way... if I find it I will report those.
Vijay Lulla <vijaylulla using gmail.com> escreveu no dia terça, 7/05/2019 à(s)
> Good one Barry! As far as I'm aware sf uses rgdal to write various file
> formats and writeOGR has options called dataset_options and layer_options
> which are considered experimental. Do you know if either of these options
> can be used instead of creating a new field/attribute for the sf
> dataframe? More importantly, I would like to know your opinion of using
> these options vs creating an attribute.
> Thanks in advance,
> On Tue, May 7, 2019 at 11:07 AM Barry Rowlingson <b.rowlingson using gmail.com>
>> 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]]
>> R-sig-Geo mailing list
>> R-sig-Geo using r-project.org
Marta M. Rufino (auxiliary researcher)
*____________________________________________________*MARE - Marine and
Environmental Sciences Centre
Faculty of Sciences, University of Lisbon
Campo Grande, 1749-016 Lisboa,
Tel: + 351 21 750 00 00, extension: 22576
[[alternative HTML version deleted]]
More information about the R-sig-Geo