found that the high-German SDK does not provide the left turn GPS coordinates (gcj_02 to wgs_84), below is a copy of the Java version of the
/**************************** file name: Gcj2wgs.java creation time: Package: COM Author: Description: The Delta method of this class can convert the GPS latitude and longitude obtained by the German Map SDK to the true latitude and longitude degree. /package Com;import Java.util.hashmap;public class Gcj2wgs {public static void main (String [] args) {GCJ2WGS WG = new Gcj2wgs (); Hashmap<string, double> HM = Wg.delta (38.123456,114.654321); SYSTEM.OUT.PRINTLN (HM);} gcj_02_to_wgs_84double pi = 3.14159265358979324;/** * @author Author: * Method Description: Method can convert the GPS latitude and longitude obtained by the German Map SDK to the true latitude and longitude degree, Can be used to solve the problem of Android system using the high-de SDK to obtain latitude and longitude conversion. * @param the latitude and longitude required for conversion * @return latitude and longitude converted to true GPS coordinates * @throws < exception type > {@inheritDoc} exception description */public hashmap<string, DOUBLE&G T Delta (Double lat,double lon) {Double A = 6378245.0;double ee = 0.00669342162296594323;double Dlat = This.transformlat (lon -105.0, lat-35.0);d ouble Dlon = This.transformlon (lon-105.0, lat-35.0);d ouble Radlat = lat/180.0 * this. Pi;double Magic = Math.sin (Radlat); Magic = 1-ee * Magic * MAGIC; Double sqrtmagic = math.sqrt (Magic); Dlat = (Dlat * 180.0)/((A * (1-ee))/(Magic * sqrtmagic) * this. PI); Dlon = (Dlon * 180.0)/(A/sqrtmagic * MATH.COS (Radlat) * this. PI); Hashmap<string, double> HM = new hashmap<string, double> (); Hm.put ("lat", Lat-dlat); Hm.put ("Lon", Lon-dlon); return HM; }//convert longitude public double Transformlon (double x, double y) {double ret = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * MATH.SQRT (Math.Abs (x)); RET + = (20.0 * Math.sin (6.0 * x *) this. PI) + 20.0 * Math.sin (2.0 * x * this. PI)) * 2.0/3.0; RET + = (20.0 * Math.sin (x * this). PI) + 40.0 * Math.sin (x/3.0 * this. PI)) * 2.0/3.0; RET + = (150.0 * Math.sin (x/12.0 *). PI) + 300.0 * Math.sin (x/30.0 * this. PI)) * 2.0/3.0; return ret; }//convert latitude public double Transformlat (double x, double y) {double ret = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y + 0.2 * MATH.SQRT (Math.Abs (x)); RET + = (20.0 * Math.sin (6.0 * x *) this. PI) + 20.0 * MaTh.sin (2.0 * x * this. PI)) * 2.0/3.0; RET + = (20.0 * Math.sin (Y * this). PI) + 40.0 * Math.sin (y/3.0 * this. PI)) * 2.0/3.0; RET + = (160.0 * Math.sin (y/12.0 *). PI) + Math.sin * (Y * this. pi/30.0)) * 2.0/3.0; return ret; }}
The coordinates obtained by the German SDK are converted to the GPS real coordinate method, the Java version