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

Custom tile grid resolutions beginner's question #317

Open
phillashworth opened this issue Apr 11, 2024 · 1 comment
Open

Custom tile grid resolutions beginner's question #317

phillashworth opened this issue Apr 11, 2024 · 1 comment

Comments

@phillashworth
Copy link

I'm using T-Rex to serve OSM openmaptiles in a local projection based on your openmaptiles.toml and usergrid.toml examples and consuming the tiles in OpenLayers.

I'm reprojecting to British National Grid EPSG:27700 which works brilliantly thanks :)

My question regards the user grid resolutions array, I've seen many articles on how to calculate this for web mercator but not for other projections. By trial and error I've managed to find values that perform well and display an appropriate level of details at the various map zoom levels but I'd like to understand how to calculate the resolutions for the custom projection in a more scientific manner. Any pointers would be greatly appreciated.

[grid.user]
    width = 256
    height = 256
    extent = { minx = -238375.0, miny = 0.0, maxx = 900000.0, maxy = 1376256.0}
    srid = 27700
    units = "m"
    resolutions = [???]
    origin = "TopLeft"
@pka
Copy link
Member

pka commented May 13, 2024

The OGC spec has a detailed explanation: https://docs.ogc.org/is/17-083r4/17-083r4.html

This BBOX guide shows the usage of morecantile to calculate a grid. You can extract the resolutions from the JSON output.

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

2 participants