亲爱的朋友!
我应该使用MGRS-library,但在这个问题上我被困住了:
import mgrs
m = mgrs.MGRS()
d = m.toLatLon('15TWG0000049776')
print(d)
控制台显示: mgrs.core.RTreeError:“ Convert_MGRS_To_Geodetic”中的错误:MGRS错误:字符串错误
答案 0 :(得分:0)
MGRS库期望使用字节文字而不是字符串。所以:
d = m.toLatLon('15TWG0000049776'.encode())