Skip to content

Commit

Permalink
Merge pull request Jimut123#23 from sourav-raj/master
Browse files Browse the repository at this point in the history
Update jimutmap.py
  • Loading branch information
Jimut123 authored Jan 17, 2023
2 parents 732fa94 + 40e0b05 commit 7f959e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jimutmap/jimutmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ def ret_lat_lon(self, xTile:int, yTile:int) -> Tuple[float, float]:
"""
n = 2**self.zoom
lon_deg = int(xTile)/n * 360.0 - 180.0
lat_rad = math.atan(math.asinh(math.pi * (1 - 2 * int(yTile)/n)))
# lat_rad = math.atan(math.asinh(math.pi * (1 - 2 * int(yTile)/n)))
lat_rad=2*((math.pi/4)-math.atan(math.exp(-1*math.pi*(1-2* int(yTile)/n))))
lat_deg = lat_rad * 180.0 / math.pi
return lat_deg, lon_deg

Expand Down

0 comments on commit 7f959e2

Please sign in to comment.