Inverse Mercator projection. inverse_mercator(1) is roughly 85.
>>> abs(inverse_mercator(0)) < 1e-6
True
>>> inverse_mercator(1)
85.05112...
>>> inverse_mercator(-1)
-85.05112...
Mercator projection. mercator(85) is roughly 1.
>>> abs(mercator(0)) < 1e-6
True
>>> mercator(85.05113)
1.00000...
>>> mercator(-85.05113)
-1.00000...
Bases: object
Context manager that transforms a cairo context to geo-coordinates.
A GeoSurfaceController applies a geo-coordinate transformation to a cairo context when the context manager is entered. Upon exit, the context’s transformation matrix is reset to what it was before.
Bases: object
State and background controller for a geodrawing cairo surface.
Transform a cairo context to geo-coordinates.
After this, the associated surface’s pixels are addressed by an appropriate interval of Mercator-transformed geo-coordinates.