将实际坐标转为火星坐标
#!/usr/bin/env python #Source: https://on4wp7.codeplex.com/SourceControl/changeset/view/21455#EvilTransform.cs # NO WARRANTY OR GUARANTEE import math a = 6378245.0 ee = 0.00669342162296594323 def transformLat (x , y): ret = - 100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y + 0.2 * math.sqrt(math.fabs(x)); ret += ( 20.0 * math.sin( 6.0 * x * math.pi) + 20.0 * math.sin( 2.0 * x * math.pi)) * 2.0 / 3.0 ; ret += ( 20.0 * math.sin(y * math.pi) + 40.0 * math.sin(y / 3.0 * math.pi)) * 2.0 / 3.0 ; ret += ( 160.0 * math.sin(y / 12.0 * math.pi) + 320 * math.sin(y * math.pi / 30.0 )) * 2.0 / 3.0 ; return ret; def transformLon (x , y): ret = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * math.sqrt(math.fabs(x)); ret += ( 20.0 * math.sin( 6.0 * x * math.pi) + 20.0 * math.sin( 2.0 * x * math.pi)) * 2.0 / 3.0 ; ret += ( 20.0 * math.sin(x * math.pi) + 40.0 * math.sin(x / 3.0 * math.pi)) * 2.0 / 3.0 ; ret += ( 150.0 * math.sin(x / 12.0 * math.p...