Skip to content

Instantly share code, notes, and snippets.

@Densyakun
Created January 19, 2020 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Densyakun/f2471da3ffb89450885b4751ebbc9626 to your computer and use it in GitHub Desktop.
Save Densyakun/f2471da3ffb89450885b4751ebbc9626 to your computer and use it in GitHub Desktop.
メルカトル図法における経線方向のスケールを取得します
import math
semi_major_axis = 6378137
semi_minor_axis = 6356752.314245
def getScale(lat):
return semi_minor_axis / semi_major_axis / math.cos(math.radians(lat))
if __name__ == '__main__':
while(True):
try:
print(getScale(float(input())))
except:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment