Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please support kml styling (in fill and border color) #6

Open
drwilkins opened this issue Aug 16, 2022 · 5 comments
Open

please support kml styling (in fill and border color) #6

drwilkins opened this issue Aug 16, 2022 · 5 comments

Comments

@drwilkins
Copy link

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

@rsbivand
Copy link
Member

@edzer How should we handle this? Should we partition maptools into functions using functionality from rgdal or rgeos and others which do not? Moving stuff to sp increases the too large maintenance burden on you; keeping a residual maptools is not viable without a new maintainer. How could we identify possible candidate maintainers?

The twitter case shows that just using pkgapi doesn't pick up usage in peoples' scripts and workflows; the same applies to running reverse dependency checks on packages.

@LuisLauM
Copy link

LuisLauM commented Jun 8, 2023

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

Maybe you should try to ask sf devs to improve their function using the sp one as example. If you (or someone else that you know) can do and submit the change, the better.

@rsbivand
Copy link
Member

I have put a skeleton package on https://github.com/rsbivand/spkml, and would like to ask @LuisLauM or @drwilkins whether you would be prepared to take on maintenance of this lightweight and trouble-free package?

@drwilkins
Copy link
Author

drwilkins commented Jun 29, 2023 via email

@rsbivand
Copy link
Member

@drwilkins @LuisLauM please use the channels available to you to canvas for a new maintainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants