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

Exhaustive set of indices? #47

Open
bomeara opened this issue Nov 10, 2022 · 0 comments
Open

Exhaustive set of indices? #47

bomeara opened this issue Nov 10, 2022 · 0 comments

Comments

@bomeara
Copy link

bomeara commented Nov 10, 2022

It would be convenient to be able to get the full list of possible indices for a given resolution. I'm using this for a world sim, and I want to pre-populate the world. As is, I'm doing

get_ring <- function(x) {
		return(h3::k_ring(h3::geo_to_h3(c(0,0), resolution),x))
	}
	cells <- unique(unlist(sapply(c(sequence(9), seq(from=10, to=200, by=5)), get_ring)))
	cell_centers <- h3::h3_to_geo(cells)

But this is inefficient.

Thanks for this software!

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

1 participant