Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- def LonLatToPixelXY(lonlat):
- (lon, lat) = lonlat
- x = (lon + 180.0) * 256.0 / 360.0
- y = 128.0 - math.log(math.tan((lat + 90.0) * math.pi / 360.0)) * 128.0 / math.pi
- return [x, y]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement