草庐IT

marcator

全部标签

python 经纬度墨卡托互转

defmarcator(x,y):   lonlat={}   xx=x/20037508.3427892*180   yy=y/20037508.3427892*180   lonlat['x']=xx   lonlat['y']=180/math.pi*(2*math.atan(math.exp(yy*math.pi/180))-math.pi/2)   returnlonlat#经纬度转墨卡托defmarcatorxy(x,y):   marcator={}   xx=x/180*20037508.3427892   yy=math.log(math.tan((90+y)*math.pi

python 经纬度墨卡托互转

defmarcator(x,y):   lonlat={}   xx=x/20037508.3427892*180   yy=y/20037508.3427892*180   lonlat['x']=xx   lonlat['y']=180/math.pi*(2*math.atan(math.exp(yy*math.pi/180))-math.pi/2)   returnlonlat#经纬度转墨卡托defmarcatorxy(x,y):   marcator={}   xx=x/180*20037508.3427892   yy=math.log(math.tan((90+y)*math.pi