Skip to content

Conversation

rafaqz
Copy link
Member

@rafaqz rafaqz commented Jan 22, 2023

Adds a function to get the z index for a specific extent and resolution.

Needs tests

Comment on lines +118 to +119
We assume tiles are the standard 256*256 pixels. Note that this is not an
enforced standard, and that retina tiles are 512*512.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it's best to directly add the tile size as an argument?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I considered that too. I guess a keyword with default is best.

Co-authored-by: Martijn Visser <[email protected]>
@visr visr marked this pull request as draft January 30, 2023 10:37
We assume tiles are the standard 256*256 pixels. Note that this is not an
enforced standard, and that retina tiles are 512*512.
"""
function z_index(extent::Extent, res::NamedTuple, crs::WebMercator)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this also accept tuples (x, y) as Makie does? In that case we can also make z_index(..., Tuple) = z_index(..., (; X = ..., Y = ...)) or so.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should probably also be a catchall method to error when crs is not WebMercator (for now...)

asinghvi17 pushed a commit that referenced this pull request Apr 13, 2025
Bumps [julia-actions/setup-julia](https://github.com/julia-actions/setup-julia) from 1 to 2.
- [Release notes](https://github.com/julia-actions/setup-julia/releases)
- [Commits](julia-actions/setup-julia@v1...v2)

---
updated-dependencies:
- dependency-name: julia-actions/setup-julia
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

3 participants