Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. import math
  2.  
  3. def LonLatToPixelXY(lonlat):
  4. (lon, lat) = lonlat
  5. x = (lon + 180.0) * 256.0 / 360.0
  6. y = 128.0 - math.log(math.tan((lat + 90.0) * math.pi / 360.0)) * 128.0 / math.pi
  7. return [x, y]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement