-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Functionality for adjacent tiles / quadkeys #118
Comments
@daniel-j-h I agree, adjacent tiles would be a nice addition to the API, even without being very advanced. Let's say you have an irregular blob of tiles: a combination of Can you say more about generalizing to the Z dimension? Would the parent's neighbors be included? Would the neighbors of every child be included? |
Exactly! Adjacent tiles and set is what I'm using to buffer tiles and then do de-duplication! 🌐 I think I was not clear about the generalization. I don't want to generalize adjacent tiles for different zoom levels. What I was suggestion instead was generalizing on how many levels of adjacency we want to return. See this beautifully manually drawn diagram depicting a tile x and its closest friends 👨👧👦
My questions are
Happy Weekend folks ✌️ |
@daniel-j-h I was working on a command like this a while back: mapbox/supermercado#19 |
Coolio! 🙌 Should we consider this then as advanced functionality and it should go in the supermercado project? And only have the adjacent tile function here, returning directly neighboring tiles? |
There is a
parent
and achildren
function to go up or down the tile hierarchy, respectively.But there is no function right now to go "sideways" to get a tile's siblings on the same zoom level.
Use cases are e.g. buffering a tile with its eight adjacent tiles. I'm finding myself writing small utility functions for this every now and then again and can imagine other people do, too. It would be great to have it in mercantile 🤗
What do you think the api should look like? Something as simple as
or more advanced e.g. with a generator returning neighboring tiles and the level they are on (as in breadth-first-search)?
The latter would allow users to re-use this function when they not only want to get one level of adjacent tiles. 🌐
Thoughts? 🤔
The text was updated successfully, but these errors were encountered: