Skip to content

[PoC] Combine POINTs before st_as_grob() #2722

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

Closed
wants to merge 1 commit into from

Conversation

yutannihilation
Copy link
Member

@yutannihilation yutannihilation commented Jun 28, 2018

(Originally reported on #2718 )

geom_sf() converts an sf object by lapply()ing st_as_grob() on its features one by one because st_as_grob() accepts only one sfg. While this approach seems simple and clean, it is considerably slow (e.g. it takes about 10 seconds for 1000 POINTs).

In this PR, I use st_combine() to combine POINTs into one MULTIPOINT so that st_as_grob() is needed only once per panel.

@lock
Copy link

lock bot commented Dec 25, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Dec 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant