Inverting y coordinate
This commit is contained in:
parent
fafd4a364e
commit
3fba8a3091
@ -3,6 +3,7 @@ RETURNS NUMERIC[] AS $$
|
||||
import math
|
||||
def tile2lnglat(z, x, y):
|
||||
n = 2.0 ** z
|
||||
y = (1 << z) - y - 1
|
||||
|
||||
lon = x / n * 360.0 - 180.0
|
||||
lat_rad = math.atan(math.sinh(math.pi * (1 - 2 * y / n)))
|
||||
|
Loading…
Reference in New Issue
Block a user