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

Compute webmercator resolution with full accuracy #243

Merged
merged 1 commit into from
Apr 25, 2016
Merged

Conversation

jgoizueta
Copy link
Contributor

Fixes #241

@jgoizueta
Copy link
Contributor Author

Please review @rafatower

@rafatower
Copy link
Contributor

okay, but two questions:

  • how this affects actual calculations? I mean, the pixel resolution is not the same in both axis, so an error is granted depending on the zoom level, right? (from my ignorance).
  • have you tested what happens with the IMMUTABLE modifier when you update the extension? Will it actually take the newest, more accurate version of the function's results?

@jgoizueta
Copy link
Contributor Author

jgoizueta commented Apr 25, 2016

Basically we're adding a small (irrelevant for current applications) but unnecessary error to the inevitable error due to floating point's limited precision. Not a big deal, but this makes the exact values computed inconsistent with those used in the tiler: https://github.com/CartoDB/tilelive-mapnik/blob/d04792444eb356d1e240ecd792f5d0ab933b213e/lib/render.js#L7

Regarding the immutability, I've checked that when the function is replaced the new values are used (even for z values previously computed)

@rafatower
Copy link
Contributor

👍

@jgoizueta jgoizueta merged commit efe381a into master Apr 25, 2016
@jgoizueta jgoizueta deleted the 241-webmercator branch April 25, 2016 15:30
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.

2 participants