亚洲午夜电影网_最近最新高清中文字幕_免费播放国产一级_国产成人久久

GPS Correction 0.01 Precision Tool / Algorithm Case

2019-09-17 11:40:39 root 390

Precision tool download: http://map.yanue.net/gps.html

 

This correction applies to Google map China, Microsoft map china, MapABC, etc., because these maps are the same as the offset.dat file, which is 0.01 precision correction data. If you need it, please contact the website, non-free version.

 

Algorithm demonstration:

 

 

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

<?php

/*

   Code function: Correct the Chinese map latitude and longitude offset with the 0.01 precision correction library file.

*/

header("Content-Type:text/html; charset=utf-8");

define('__dat_db__' 'offset.dat' );// DAT the file of data

define('datmax' , 9813675 );// Number of data - end record

 

// # offset.php?lat=39.914914&lon=116.460633

$lon=$_GET['lon'];

$lat=$_GET['lat'];

$tmplon=intval($lon * 100);

$tmplat=intval($lat * 100);

//Longitude to pixel X value

function lngToPixel($lng,$zoom) {

return ($lng+180)*(256<<$zoom)/360;

}

//Pixel X to longitude

function pixelToLng($pixelX,$zoom){

return $pixelX*360/(256<<$zoom)-180;

}

//Latitude to pixel Y

function latToPixel($lat$zoom) {

$siny = sin($lat * pi() / 180);

$y=log((1+$siny)/(1-$siny));

return (128<<$zoom)*(1-$y/(2*pi()));

}

//Pixel Y to latitudefunction pixelToLat($pixelY$zoom) {

$y = 2*pi()*(1-$pixelY /(128 << $zoom));

$z = pow(M_E, $y);

$siny = ($z -1)/($z +1);

return asin($siny) * 180/pi();

}

 

function xy_fk( $number ){

        $fp fopen(__dat_db__,"rb"); //■1■.將 r 改為 rb

        $myxy=$number;//#"112262582";

        $left = 0;//Start recording        $right = datmax;//end the record

 

        //Use dichotomy to find data

        while($left <= $right){

            $recordCount =(floor(($left+$right)/2))*8; //Take half

            //echo "Operation:left=".$left." right=".$right." midde=".$recordCount."
";

            @fseek $fp$recordCount , SEEK_SET ); //Set cursor

            $c fread($fp,8); //Read 8 bytes

            $lon = unpack('s',substr($c,0,2));

            $lat = unpack('s',substr($c,2,2));

            $x = unpack('s',substr($c,4,2));

            $y = unpack('s',substr($c,6,2));

            $jwd=$lon[1].$lat[1];

            //echo "Latitude and longitude found:".$jwd;

            if ($jwd==$myxy){

               fclose($fp);

               return $x[1]."|".$y[1];

               break;

            }else if($jwd<$myxy){

               //echo " > ".$myxy."
";

               $left=($recordCount/8) +1;

            }else if($jwd>$myxy){

               //echo " < ".$myxy."
";

               $right=($recordCount/8) -1;

            }

 

        }

        fclose($fp);

}

 

$offset =xy_fk($tmplon.$tmplat);

$off=explode('|',$offset);

$lngPixel=lngToPixel($lon,18)+$off[0];

$latPixel=latToPixel($lat,18)+$off[1];

 

echo pixelToLat($latPixel,18).",".pixelToLng($lngPixel,18);

 

?>

c#algorithm

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;   

 

namespace MapDigit.GIS

{

    public class GeoLatLng

    {   

 

        public GeoLatLng(double latitude, double longitude)

        {

            this.latitude = latitude;

            this.longitude = longitude;

        }

        public double latitude;

        public double longitude;

    }   

 

    public class GeoPoint

    {

        public GeoPoint(int x, int y)

        {

            this.x = x;

            this.y = y;

        }

        public int x;

        public int y;

    }   

 

    public class OffsetInChina

    {

        //Used to convert from GPS coordinates to post-offset coordinates        public static GeoLatLng fromEarthToMars(GeoLatLng earth)

        {

            GeoPoint ptOffset = getOffset(earth.latitude, earth.longitude);

            if (ptOffset.x != 0 || ptOffset.y != 0)

            {

                int pixelX, pixelY;

                TileSystem.LatLongToPixelXY(earth.latitude, earth.longitude, 18, out pixelX, out pixelY);

                GeoPoint pt = new GeoPoint(pixelX, pixelY);

                pt.x += ptOffset.x;

                pt.y += ptOffset.y;

                double latitude, longitude;

                TileSystem.PixelXYToLatLong(pt.x, pt.y, 18, out latitude, out longitude);

                return new GeoLatLng(latitude, longitude);   

 

            }

            else

            {

                return new GeoLatLng(earth.latitude, earth.longitude);

            }   

 

        }   

 

        //Used to convert the post-offset coordinates to true coordinates

        public static GeoLatLng fromMarToEarth(GeoLatLng mars)

        {

            GeoPoint ptOffset = getOffset(mars.latitude, mars.longitude);

            if (ptOffset.x != 0 || ptOffset.y != 0)

            {

                int pixelX, pixelY;

                TileSystem.LatLongToPixelXY(mars.latitude, mars.longitude, 18, out pixelX, out pixelY);

                GeoPoint pt = new GeoPoint(pixelX, pixelY);

                pt.x -= ptOffset.x;

                pt.y -= ptOffset.y;

                double latitude, longitude;

                TileSystem.PixelXYToLatLong(pt.x, pt.y, 18, out latitude, out longitude);

                return new GeoLatLng(latitude, longitude);   

 

            }

            else

            {

                return new GeoLatLng(mars.latitude, mars.longitude);

            }

        }   

 

        //This function is used to convert the latitude and longitude that needs to be queried into the nearest 0.01 division value, without interpolation.

        //You can also implement interpolation by yourself.

        private static GeoPoint getQueryLocation(double latitude, double longitude)

        {

            int lat = (int)(latitude * 100);

            int lng = (int)(longitude * 100);

            double lat1 = ((int)(latitude * 1000 + 0.499999)) / 10.0;

            double lng1 = ((int)(longitude * 1000 + 0.499999)) / 10.0;

            for (double x = longitude; x < longitude + 1; x += 0.5)

            {

                for (double y = latitude; x < latitude + 1; y += 0.5)

                {

                    if (x <= lng1 && lng1 < (x + 0.5) && lat1 >= y && lat1 < (y + 0.5))

                    {

                        return new GeoPoint((int)(x + 0.5), (int)(y + 0.5));

                    }

                }

            }

            return new GeoPoint(lng, lat);

        }   

 

        private static GeoPoint getOffset(double longitude, double latitude)

        {

            //This function is used to return the result of the query, which is to return the level 18, x, y offset from the corrected data.

            //Can be implemented by itself

            return null;

        }   

 

    }

}

亚洲午夜电影网_最近最新高清中文字幕_免费播放国产一级_国产成人久久
老司机精品福利视频| 欧美亚洲综合在线| 国外成人在线| 香蕉国产精品偷在线观看不卡 | 久久久久国产一区二区三区四区| 欧美激情一区二区三级高清视频| 国产免费亚洲高清| 亚洲一区二区三区精品在线| 久久免费精品视频| 国产精品美女999| 亚洲综合日韩在线| 欧美精品成人| 激情久久五月| 美女主播精品视频一二三四| 国产日韩欧美麻豆| 久久国产婷婷国产香蕉| 欧美日韩综合一区| 亚洲影院高清在线| 欧美精品色综合| 一色屋精品亚洲香蕉网站| 久久久久久网站| 国产精品夜色7777狼人| 久久成人精品| 国产麻豆午夜三级精品| 久久精品30| 国产精品视频久久一区| 久久超碰97中文字幕| 国产精品女主播在线观看 | 欧美日韩网站| 亚洲免费在线观看视频| 欧美日韩国产小视频| 亚洲一区二区三区免费视频| 欧美巨乳在线观看| 亚洲无线视频| 欧美日韩在线播| 小辣椒精品导航| 国产精品久久久久久久久久三级| 亚洲欧美在线免费| 国产精品久久久久久久久免费樱桃| 亚洲欧美激情在线视频| 欧美午夜精品一区二区三区| 欧美专区在线播放| 国产女精品视频网站免费| 久久精品人人做人人综合| 国产精品一区二区三区观看| 久久亚洲综合网| 影音欧美亚洲| 欧美日本国产精品| 午夜影视日本亚洲欧洲精品| 国产精品你懂得| 另类酷文…触手系列精品集v1小说| 国内视频一区| 欧美日韩成人一区二区| 欧美一区二区三区在线| 国产亚洲一区在线播放| 欧美激情中文字幕乱码免费| 亚洲欧美视频| 国产亚洲欧洲| 欧美日韩免费精品| 久久久久久久尹人综合网亚洲| 狠狠色伊人亚洲综合网站色| 欧美日本中文字幕| 欧美在线视频日韩| 精品96久久久久久中文字幕无| 欧美日韩理论| 久久久xxx| 亚洲免费一在线| 国产亚洲高清视频| 欧美理论电影在线观看| 久久超碰97人人做人人爱| 悠悠资源网久久精品| 国产精品第2页| 免费高清在线一区| 亚洲欧美日韩视频一区| 国产一区日韩欧美| 欧美日韩在线一区二区三区| 久久亚洲一区二区| 亚洲欧美清纯在线制服| 国产亚洲精品久久飘花| 欧美日韩国产一区二区| 久久综合久久美利坚合众国| 亚洲综合色激情五月| 国自产拍偷拍福利精品免费一| 欧美色123| 欧美国产日韩一区| 久久成人综合视频| 在线中文字幕一区| 国产一区白浆| 国产精品美女久久久久久免费 | 在线不卡亚洲| 国产日韩欧美综合在线| 欧美日韩亚洲一区二区三区| 免费短视频成人日韩| 久久九九免费视频| 亚洲永久在线| 在线日韩欧美视频| 国产专区一区| 国产精品久久久久毛片软件 | 亚洲先锋成人| 国产日韩在线不卡| 国产精品久久国产精品99gif| 欧美韩日一区二区三区| 久久综合久色欧美综合狠狠| 久久精品99国产精品日本| 午夜精彩国产免费不卡不顿大片| 一色屋精品视频免费看| 国产一区二区0| 国产精品一区久久久| 欧美午夜剧场| 欧美视频亚洲视频| 欧美区二区三区| 欧美福利视频网站| 欧美1区3d| 免费av成人在线| 狼狼综合久久久久综合网| 久久久精品欧美丰满| 欧美在线一二三区| 久久se精品一区精品二区| 欧美有码在线观看视频| 欧美在线资源| 欧美中文在线字幕| 久久国产一区二区三区| 久久精品国产精品| 久久精品国产精品亚洲| 久久精品免费看| 久久久久九九九| 久久一区国产| 美女脱光内衣内裤视频久久影院| 老牛影视一区二区三区| 美女图片一区二区| 免费在线观看日韩欧美| 欧美99久久| 欧美大秀在线观看| 欧美日韩高清区| 欧美日韩亚洲激情| 国产精品久久9| 国产精品一区亚洲| 国产一区二区三区久久久| 国产一区av在线| 尤妮丝一区二区裸体视频| 在线国产日韩| 午夜精品一区二区三区电影天堂| 亚洲欧美日韩国产综合在线| 午夜久久99| 久久免费黄色| 欧美激情国产精品| 欧美激情网友自拍| 欧美日韩在线播放三区| 国产精品亚洲产品| 国产最新精品精品你懂的| 精久久久久久久久久久| 亚洲视频第一页| 欧美一区二区播放| 久久这里有精品15一区二区三区| 蜜臀久久99精品久久久久久9 | 国产日韩精品在线播放| 国产主播在线一区| 宅男在线国产精品| 羞羞漫画18久久大片| 久久久久se| 欧美片在线观看| 国产精品主播| 一区在线视频观看| 欧美一区二区精品久久911| 久久久免费精品| 欧美国产日本高清在线| 国产精品福利网站| 国模套图日韩精品一区二区| 亚洲午夜视频在线观看| 欧美在线视频一区二区三区| 欧美大成色www永久网站婷| 国产精品a久久久久久| 国精品一区二区三区| 午夜日韩电影| 能在线观看的日韩av| 欧美视频三区在线播放| 国产一区二区三区视频在线观看| 亚洲一区二区三区在线看| 久久久国产精品一区二区三区| 欧美福利在线观看| 国产精品视频免费在线观看| 在线日本欧美| 久久先锋资源| 国产精品久99| 亚洲一区日本| 欧美1区免费| 国产欧美日韩一区二区三区在线观看| 中国女人久久久| 久久中文在线| 国产精品高清网站| 亚洲一区999| 欧美成年人视频网站欧美| 国产精品自拍网站| 亚洲欧美另类在线| 欧美啪啪一区| 国产精品99久久久久久久女警| 久久只精品国产| 国产欧美日韩三级| 欧美在线观看你懂的| 欧美日本亚洲视频|