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

can't fully understand the '-interval' params #31

Open
geocian2 opened this issue Jul 15, 2021 · 1 comment
Open

can't fully understand the '-interval' params #31

geocian2 opened this issue Jul 15, 2021 · 1 comment

Comments

@geocian2
Copy link

can't fully understand the '-interval' params

@andrewharvey
Copy link
Contributor

It affects how the height is encoded into RGB values.

For example Mapbox's Terrain RGB format derives the height with

height = base + ((R * 256 * 256 + G * 256 + B) * interval)

where base is -10000 and interval is 0.1.

So if you want your data compatible then you'd use those values.

Mapbox's formula means you only get 0.1 meter height precision (ie. the interval). If your application needs more precision you might decide to decrease this value but to compromises you'll get less range so won't be able to record the full range of heights on earths surface.

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