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

GPS Correction 0.01 Precision Tool / Algorithm Case

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

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;

        }   

 

    }

}

亚洲午夜电影网_最近最新高清中文字幕_免费播放国产一级_国产成人久久
国产精品成人在线观看| 欧美三区在线视频| 久久琪琪电影院| 欧美片在线播放| 国精产品99永久一区一区| 欧美在线观看www| 欧美日韩国产综合视频在线观看 | 又紧又大又爽精品一区二区| 欧美专区18| 欧美性感一类影片在线播放 | **性色生活片久久毛片| 久久综合九色综合欧美就去吻 | 亚洲欧美日韩国产综合| 欧美日韩国产欧| 亚洲性av在线| 欧美连裤袜在线视频| 亚洲视频欧洲视频| 欧美精品久久久久久| 在线观看欧美成人| 欧美—级高清免费播放| 亚洲一区二区在线观看视频| 欧美日韩国产区| 欧美在线综合| 一区二区三区自拍| 麻豆国产精品一区二区三区 | 亚洲欧美日韩精品综合在线观看| 欧美国产大片| 在线观看日韩国产| 欧美激情免费观看| 在线观看一区视频| 欧美日本国产一区| 亚洲男人第一av网站| 欧美三级免费| 欧美一区精品| 国产免费观看久久| 久热精品视频在线| 激情久久久久| 欧美激情免费观看| 午夜精品久久一牛影视| 国产裸体写真av一区二区 | 国产视频精品va久久久久久| 久久亚洲精品欧美| 在线观看成人小视频| 欧美三级电影网| 久久狠狠久久综合桃花| 国产一区二区三区久久| 欧美成人一区二区三区在线观看 | 久久精品综合网| 国产一区二区三区久久久久久久久| 久久偷窥视频| 影音先锋成人资源站| 欧美精品免费观看二区| 午夜精品理论片| 国产日本亚洲高清| 欧美高清不卡在线| 午夜欧美大尺度福利影院在线看 | 国产精品激情电影| 久久综合久色欧美综合狠狠| 黄色av成人| 欧美日本三级| 久久精品综合网| 在线观看中文字幕不卡| 国产精品高精视频免费| 久久久久网站| 国产精品视频一二三| 欧美 日韩 国产一区二区在线视频| 亚洲一区三区视频在线观看| 欧美吻胸吃奶大尺度电影| 久久综合激情| 午夜精品久久久久久久久| 国产一区香蕉久久| 欧美午夜美女看片| 蜜月aⅴ免费一区二区三区 | 免费成人小视频| 亚洲欧美一区二区视频| 黄色成人精品网站| 国产精品欧美一区二区三区奶水 | 欧美77777| 欧美在线观看视频一区二区三区 | 欧美精品国产精品日韩精品| 久久久噜噜噜久久中文字幕色伊伊 | 久久手机免费观看| 午夜影视日本亚洲欧洲精品| 国外成人免费视频| 国产欧美一区在线| 国产精品mm| 欧美另类极品videosbest最新版本| 久久久蜜桃精品| 羞羞色国产精品| 亚洲一区二区三区视频| 精品动漫3d一区二区三区| 国产日韩欧美精品综合| 国产精品久久九九| 激情欧美日韩| 欧美91视频| 久久综合久色欧美综合狠狠| 久久九九电影| 久久av二区| 午夜久久99| 亚洲欧美在线网| 亚洲免费人成在线视频观看| 国产精品99久久99久久久二8| 国产一区二区三区四区五区美女 | 国产精品一区二区久激情瑜伽| 欧美日韩国产精品一区二区亚洲| 免费在线观看成人av| 久久动漫亚洲| 欧美一二三区精品| 亚洲欧美综合v| 亚洲欧美日韩国产中文| 亚洲午夜未删减在线观看| 在线成人激情黄色| 黄色av成人| 黄色成人免费观看| 伊人成人在线| 红桃视频国产精品| 在线观看日韩av电影| 在线不卡视频| 亚洲午夜精品17c| 亚洲午夜电影网| 亚洲影院在线观看| 午夜精品视频一区| 欧美一区二区三区在线观看视频| 欧美亚洲一区二区在线观看| 欧美一区午夜精品| 欧美大片免费久久精品三p | 久久免费少妇高潮久久精品99| 欧美在线亚洲| 久久夜色精品国产欧美乱| 久久亚洲综合色一区二区三区| 久久亚洲色图| 欧美成人69av| 欧美日韩一级片在线观看| 欧美四级剧情无删版影片| 国产精品捆绑调教| 国产欧美日韩| 好吊成人免视频| 亚洲午夜精品福利| 亚洲欧美99| 欧美中文字幕第一页| 久久亚洲综合色| 欧美精品一区二区在线播放| 欧美日韩视频不卡| 国产精品一区二区三区四区| 精品51国产黑色丝袜高跟鞋| 亚洲一级黄色av| 久久精品二区三区| 欧美成人a视频| 国产精品v亚洲精品v日韩精品 | 久久久久综合一区二区三区| 免播放器亚洲| 欧美日韩一区免费| 国产日本亚洲高清| 亚洲午夜激情网站| 久久久国产精品一区| 欧美黄色一区二区| 国产精品多人| 国产一区二区三区在线观看网站 | 中国亚洲黄色| 欧美在线91| 欧美激情亚洲视频| 国产精品久久久久毛片大屁完整版| 国产专区精品视频| 午夜在线视频观看日韩17c| 久久综合亚州| 欧美偷拍另类| 亚洲影院色无极综合| 国产综合视频| 亚洲一区二区视频| 美日韩精品视频| 国产精品户外野外| 狠久久av成人天堂| 久久成人综合视频| 欧美日韩国产91| 国产一区二区三区不卡在线观看 | 尤物在线观看一区| 久久国产免费| 欧美日韩 国产精品| 国产自产在线视频一区| 香蕉久久国产| 欧美日本高清| 一区二区三区我不卡| 久久久久久久成人| 欧美午夜www高清视频| 1024欧美极品| 美女视频黄 久久| 国产精品一二三视频| 亚洲欧美综合精品久久成人| 欧美精品在线视频观看| 含羞草久久爱69一区| 久久精品视频在线观看| 国产精品福利在线| 亚洲一区免费在线观看| 欧美国产精品人人做人人爱| 国产午夜精品美女视频明星a级| 亚洲欧美视频在线观看视频| 欧美激情无毛| 在线视频国产日韩| 欧美精品大片| 这里只有精品视频|