-
Notifications
You must be signed in to change notification settings - Fork 3
Description
This feature is requested because I often need to generate KML layers for Google Earth Studio videos like this one. For example, I want to output a semitransparent shapefile of a state or country to overlay on a satellite map.
Currently (as far as I can tell) it is very difficult or impossible to control styling in KML exports using sf or other "modern" packages. st_write(driver="kml") for example has inconsistent effect across OSes and doesn't seem to handle border color at all. Yet, this is very simply accomplished with maptools::kmlPolygons() and kmlLines() with col and borderparameters.
What is really excellent is that the col parameter takes alpha hex values. e.g. col= "#4530384C" makes a polygon with a semitransparent fill, and you can supply border="white" to keep a solid border.
Ideally, this nice kml export functionality would be collapsed into a single function rather than having to call kmlPolygons vs kmlLines based on different classes, and this function would be included in sf or another package which will be supported after maptools goes away.
Thanks for listening :)