Skip to content

Commit

Permalink
Delete python
Browse files Browse the repository at this point in the history
  • Loading branch information
derekhe committed Sep 15, 2021
1 parent 7f80800 commit 936f2da
Show file tree
Hide file tree
Showing 3,780 changed files with 342 additions and 1,129,004 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
cache/
./__pycache__/
./src/__pycache__
__pycache__/
dist/
build/
.vscode/
Expand Down
177 changes: 89 additions & 88 deletions README.EN.md
Original file line number Diff line number Diff line change
@@ -1,88 +1,89 @@
# English version

## Disclaimer

The methods mentioned in this tutorial are for research and learning purposes only. I am not responsible for any legal liabilities and losses caused by using or expanding this tutorial and method.

## Principle

Replace the local DNS and replace the Microsoft server with the local server. Please install the tools involved
* An HTTP proxy that can access Google (you may not need this if you are outside China)

## Can and can't
### Can:

* Replace bing sattelite image with google's image
* Somewhere bing sattelite image not cover (which display as autogenerated image) can be replaced with google's image
* Google's image has better quality and more recent than bing's
* Remove microsoft's color correction, which bring the nature color back

### Can't

* Autogenerated building, trees, roads stay same as before
* Photogrammetry not included

## Steps for usage

Some virus app reports errors and when in game it promote for https certificate error. If so, please add the folder to whitelist and accept the certificate error.
The software is totally open source and you can check every piece of code here: https://github.com/derekhe/msfs2020-google-map

* Download the package and unzip it
* Run `run.bat` to start the app, change the proxy setting
* Start flight simulation
* Make sure you have "BING DATA WORLD GRAPHICS.." and "PHOTOGRAMMETRY" turn ON in game, otherwise you will get offline map
* Enjoy

To restore the previous state, please delete
The following two lines in the `C:\Windows\System32\drivers\etc\hosts` file:
```
127.0.0.1 kh.ssl.ak.tiles.virtualearth.net
127.0.0.1 khstorelive.azureedge.net
```

## background

Microsoft Flight Simulator 2020 uses Bing's satellite map. However, the satellite map is relatively old, and many areas are not directly equipped with map settings a few years ago. This phenomenon occurs in different regions of the world. The map on the mainland is even 10 years ago. There are a large number of regions where satellite images are not available. Microsoft uses the program-generated map instead, and the quality is very poor. After the replacement, the image quality and details have been significantly improved, as shown in the figure below

## Original map
![Original map](./doc/compare-1.jpg)

## You can get the latest high-definition images after replacing Google Maps

### A small town
![A small town](./doc/compare-2.jpg)
![A small town](./doc/compare-3.png)

### Qinghai Lake (These satellite images do not exist in Bing)

![Qinghai Lake](./doc/lake.jpg)
![Qinghai Lake](./doc/lake-2.jpg)
![Qinghai Lake](./doc/lake-3.jpg)

### Chengdu

![Chengdu](./doc/chengdu.png)

### Hongkong

![Hongkong](./doc/hongkong.jpg)


## History and related information

I have been studying the possibility of replacing it with Google Maps for a long time, and there are also YouTubers on the Internet who have provided [some ideas](https://flightsim.to/file/4074/google-earth-decoder-optimisation-tools?__cf_chl_jschl_tk__= pmd_2902fb008a3441de2f812b093625596ad796f737-1628304162-0-gqNtZGzNAk2jcnBszQjO), use a crawler to crawl the data from Google and import it into MSFS2020. But this method is more complicated and cannot be used on a large scale.

Later I studied the network request and found that MSFS will download pictures from Bing's server. In theory, it should be possible to replace the pictures with other pictures. And it happens that the slicing method of bing and google’s satellite images is similar and can be seamlessly switched, and even Microsoft also provides the converted [source code] (https://docs.microsoft.com/en-us/bingmaps/articles/ bing-maps-tile-system) (see this function QuadKeyToTileXY)

In the process of constant search, I found [examples similar to my thinking](
https://github.com/muumimorko/MSFS2020_CGLTools/issues/2#issuecomment-762232597). But his main purpose is to remove some unnecessary things to improve the quality of the landscape. He also built an additional warehouse to demonstrate a [method of using proxy to replace landscape] (https://github.com/muumimorko/MSFS2020_Proxy). Unfortunately, this warehouse lacks some necessary things and cannot operate normally.

![IMG](https://user-images.githubusercontent.com/9518369/104909810-173dfb00-5991-11eb-8e17-4063deb7ab8f.jpg)

# Sponsor

If you have successfully achieved it, please give a star and let more people see it!
If you are willing to give some sponsorship to the author, please scan the following QR code to support the author.

![WeChat](./doc/mm_reward_qrcode_1628320842310.png)
![Ali](./doc/1628320893.jpg)
# English version

## Disclaimer

The methods mentioned in this tutorial are for research and learning purposes only. I am not responsible for any legal liabilities and losses caused by using or expanding this tutorial and method.

## Principle

Replace the local DNS and replace the Microsoft server with the local server. Please install the tools involved
* An HTTP proxy that can access Google (you may not need this if you are outside China)

## Can and can't
### Can:

* Replace bing sattelite image with google's image
* Somewhere bing sattelite image not cover (which display as autogenerated image) can be replaced with google's image
* Google's image has better quality and more recent than bing's
* Remove microsoft's color correction, which bring the nature color back

### Can't

* Autogenerated building, trees, roads stay same as before
* Photogrammetry not included

## Steps for usage

Some virus app reports errors and when in game it promote for https certificate error. If so, please add the folder to whitelist and accept the certificate error.
The software is totally open source and you can check every piece of code here: https://github.com/derekhe/msfs2020-google-map

* Download the package and unzip it
* First time: install Python3 using default settings: https://www.python.org/ftp/python/3.9.7/python-3.9.7-amd64.exe
* Run `run.bat` to start the app, change the proxy setting
* Start flight simulation
* Make sure you have "BING DATA WORLD GRAPHICS.." and "PHOTOGRAMMETRY" turn ON in game, otherwise you will get offline map
* Enjoy

To restore the previous state, please delete
The following two lines in the `C:\Windows\System32\drivers\etc\hosts` file:
```
127.0.0.1 kh.ssl.ak.tiles.virtualearth.net
127.0.0.1 khstorelive.azureedge.net
```

## background

Microsoft Flight Simulator 2020 uses Bing's satellite map. However, the satellite map is relatively old, and many areas are not directly equipped with map settings a few years ago. This phenomenon occurs in different regions of the world. The map on the mainland is even 10 years ago. There are a large number of regions where satellite images are not available. Microsoft uses the program-generated map instead, and the quality is very poor. After the replacement, the image quality and details have been significantly improved, as shown in the figure below

## Original map
![Original map](./doc/compare-1.jpg)

## You can get the latest high-definition images after replacing Google Maps

### A small town
![A small town](./doc/compare-2.jpg)
![A small town](./doc/compare-3.png)

### Qinghai Lake (These satellite images do not exist in Bing)

![Qinghai Lake](./doc/lake.jpg)
![Qinghai Lake](./doc/lake-2.jpg)
![Qinghai Lake](./doc/lake-3.jpg)

### Chengdu

![Chengdu](./doc/chengdu.png)

### Hongkong

![Hongkong](./doc/hongkong.jpg)


## History and related information

I have been studying the possibility of replacing it with Google Maps for a long time, and there are also YouTubers on the Internet who have provided [some ideas](https://flightsim.to/file/4074/google-earth-decoder-optimisation-tools?__cf_chl_jschl_tk__= pmd_2902fb008a3441de2f812b093625596ad796f737-1628304162-0-gqNtZGzNAk2jcnBszQjO), use a crawler to crawl the data from Google and import it into MSFS2020. But this method is more complicated and cannot be used on a large scale.

Later I studied the network request and found that MSFS will download pictures from Bing's server. In theory, it should be possible to replace the pictures with other pictures. And it happens that the slicing method of bing and google’s satellite images is similar and can be seamlessly switched, and even Microsoft also provides the converted [source code] (https://docs.microsoft.com/en-us/bingmaps/articles/ bing-maps-tile-system) (see this function QuadKeyToTileXY)

In the process of constant search, I found [examples similar to my thinking](
https://github.com/muumimorko/MSFS2020_CGLTools/issues/2#issuecomment-762232597). But his main purpose is to remove some unnecessary things to improve the quality of the landscape. He also built an additional warehouse to demonstrate a [method of using proxy to replace landscape] (https://github.com/muumimorko/MSFS2020_Proxy). Unfortunately, this warehouse lacks some necessary things and cannot operate normally.

![IMG](https://user-images.githubusercontent.com/9518369/104909810-173dfb00-5991-11eb-8e17-4063deb7ab8f.jpg)

# Sponsor

If you have successfully achieved it, please give a star and let more people see it!
If you are willing to give some sponsorship to the author, please scan the following QR code to support the author.

![WeChat](./doc/mm_reward_qrcode_1628320842310.png)
![Ali](./doc/1628320893.jpg)
173 changes: 87 additions & 86 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,86 +1,87 @@
# [English version here](./README.EN.md)

# 中文
## 免责声明

本教程提到的方法仅用于研究和学习用途。我不对使用、拓展该教程及方法所造成的任何法律责任和损失负责。

## 原理

替换本地的DNS,将微软服务器替换成本地服务器并从google地图上获取到卫星图像返回给游戏。涉及到的工具,请自行安装
* 一个可以访问Google的HTTP代理(如果你在墙外可以直接访问,可忽略)

## 有哪些增强

* 对地表的卫星图片进行全局替换成谷歌的
* 有些地方bing地图没有数据会被显示成自动生成的卫星图,非常丑。谷歌地图涵盖地球所有的地方,不会出现这种问题。
* 谷歌地图的卫星图比Bing地图更新更快
* 游戏中微软做了个颜色修正,导致地图偏色很严重(常见偏色是绿色,特别是很多地方卫星图不好的地方),我将这个功能去掉,返回原来本来的颜色。

## 什么做不到
* 自动生成的建筑、树木、道路和之前是一样的。
* 倾斜摄影生成的建筑还是和之前一样,不会用谷歌替换

## 使用步骤

注意:如果杀毒软件报错,请加入白名单,都是误报;如果报告证书错误,请直接同意,否则加载不出来。

* 下载release压缩包并解压
* 运行`run.bat`启动程序,设置好proxy并测试代理,确保代理正常使用。
* 启动模拟飞行,保留命令行的黑窗口
* 保证游戏中在线地图功能打开(BING DATA WORLD GRAPHICS和PHOTOGRAMMETRY),否则只能获得离线地图
* 尽情享用吧

如果hosts文件需要手动恢复,请删除
`C:\Windows\System32\drivers\etc\hosts`文件中的如下两行:
```
127.0.0.1 kh.ssl.ak.tiles.virtualearth.net
127.0.0.1 khstorelive.azureedge.net
```

## 背景

微软模拟飞行2020的地景使用了Bing的卫星地图,然而卫星地图比较老旧,很多地区都是几年前的图设置直接是没有的。这种现象在全球不同地区都有。在大陆的图更是10年前的图,有大量地区的卫星图都是没有的,微软便使用程序生成的图代替,质量非常的差。替换过后画质和细节得以明显的提升,可以见下图

## 原始地图
![原始地图](./doc/compare-1.jpg)

## Google地图替换后可以得到高清最新的影像

### 一个小城镇
![一个小城镇](./doc/compare-2.jpg)
![一个小城镇](./doc/compare-3.png)

### 青海湖(这些卫星图在Bing中不存在)

![青海湖](./doc/lake.jpg)
![青海湖](./doc/lake-2.jpg)
![青海湖](./doc/lake-3.jpg)

### 成都

![成都](./doc/chengdu.png)

### 香港

![香港](./doc/hongkong.jpg)


## 历史及相关资料

我很早就在研究用谷歌地图替换的可能性,在网上也有油管大神提供了[一些思路](https://flightsim.to/file/4074/google-earth-decoder-optimisation-tools?__cf_chl_jschl_tk__=pmd_2902fb008a3441de2f812b093625596ad796f737-1628304162-0-gqNtZGzNAk2jcnBszQjO),使用爬虫从谷歌爬下数据然后导入到MSFS2020中。但这种方式比较复杂,不能大规模的使用。

后来我研究了下网络请求,发现MSFS会从bing的服务器上下载图片,理论上讲将图片替换成另外的图片应该是可以的。而且恰好bing和google的卫星图片的切片方式是类似的可以进行无缝切换,甚至微软还提供了转换的[源代码]https://docs.microsoft.com/en-us/bingmaps/articles/bing-maps-tile-system)(见QuadKeyToTileXY这个函数)

在不断的搜索过程中,发现了[和我思路类似的例子](
https://github.com/muumimorko/MSFS2020_CGLTools/issues/2#issuecomment-762232597)。但他的主要目的是将一些不要的东西去掉以改善地景质量。他还建立了一个另外的仓库用来演示一个[使用代理方式替换地景的方法]https://github.com/muumimorko/MSFS2020_Proxy)。遗憾的是这个仓库缺少一些必要的东西,无法正常的运行。

![IMG](https://user-images.githubusercontent.com/9518369/104909810-173dfb00-5991-11eb-8e17-4063deb7ab8f.jpg)

# 赞助

如果你已经成功的实现了,请给个star,让更多人看到!
如果你愿意给与作者一些赞助,请扫描以下二维码支持一下作者。

![微信](./doc/mm_reward_qrcode_1628320842310.png)
![阿里](./doc/1628320893.jpg)
# [English version here](./README.EN.md)

# 中文
## 免责声明

本教程提到的方法仅用于研究和学习用途。我不对使用、拓展该教程及方法所造成的任何法律责任和损失负责。

## 原理

替换本地的DNS,将微软服务器替换成本地服务器并从google地图上获取到卫星图像返回给游戏。涉及到的工具,请自行安装
* 一个可以访问Google的HTTP代理(如果你在墙外可以直接访问,可忽略)

## 有哪些增强

* 对地表的卫星图片进行全局替换成谷歌的
* 有些地方bing地图没有数据会被显示成自动生成的卫星图,非常丑。谷歌地图涵盖地球所有的地方,不会出现这种问题。
* 谷歌地图的卫星图比Bing地图更新更快
* 游戏中微软做了个颜色修正,导致地图偏色很严重(常见偏色是绿色,特别是很多地方卫星图不好的地方),我将这个功能去掉,返回原来本来的颜色。

## 什么做不到
* 自动生成的建筑、树木、道路和之前是一样的。
* 倾斜摄影生成的建筑还是和之前一样,不会用谷歌替换

## 使用步骤

注意:如果杀毒软件报错,请加入白名单,都是误报;如果报告证书错误,请直接同意,否则加载不出来。

* 下载release压缩包并解压
* 第一次:安装Python(https://www.python.org/ftp/python/3.9.7/python-3.9.7-amd64.exe),全部使用默认配置
* 运行`run.bat`启动程序,设置好proxy并测试代理,确保代理正常使用。
* 启动模拟飞行,保留命令行的黑窗口
* 保证游戏中在线地图功能打开(BING DATA WORLD GRAPHICS和PHOTOGRAMMETRY),否则只能获得离线地图
* 尽情享用吧

如果hosts文件需要手动恢复,请删除
`C:\Windows\System32\drivers\etc\hosts`文件中的如下两行:
```
127.0.0.1 kh.ssl.ak.tiles.virtualearth.net
127.0.0.1 khstorelive.azureedge.net
```

## 背景

微软模拟飞行2020的地景使用了Bing的卫星地图,然而卫星地图比较老旧,很多地区都是几年前的图设置直接是没有的。这种现象在全球不同地区都有。在大陆的图更是10年前的图,有大量地区的卫星图都是没有的,微软便使用程序生成的图代替,质量非常的差。替换过后画质和细节得以明显的提升,可以见下图

## 原始地图
![原始地图](./doc/compare-1.jpg)

## Google地图替换后可以得到高清最新的影像

### 一个小城镇
![一个小城镇](./doc/compare-2.jpg)
![一个小城镇](./doc/compare-3.png)

### 青海湖(这些卫星图在Bing中不存在)

![青海湖](./doc/lake.jpg)
![青海湖](./doc/lake-2.jpg)
![青海湖](./doc/lake-3.jpg)

### 成都

![成都](./doc/chengdu.png)

### 香港

![香港](./doc/hongkong.jpg)


## 历史及相关资料

我很早就在研究用谷歌地图替换的可能性,在网上也有油管大神提供了[一些思路](https://flightsim.to/file/4074/google-earth-decoder-optimisation-tools?__cf_chl_jschl_tk__=pmd_2902fb008a3441de2f812b093625596ad796f737-1628304162-0-gqNtZGzNAk2jcnBszQjO),使用爬虫从谷歌爬下数据然后导入到MSFS2020中。但这种方式比较复杂,不能大规模的使用。

后来我研究了下网络请求,发现MSFS会从bing的服务器上下载图片,理论上讲将图片替换成另外的图片应该是可以的。而且恰好bing和google的卫星图片的切片方式是类似的可以进行无缝切换,甚至微软还提供了转换的[源代码]https://docs.microsoft.com/en-us/bingmaps/articles/bing-maps-tile-system)(见QuadKeyToTileXY这个函数)

在不断的搜索过程中,发现了[和我思路类似的例子](
https://github.com/muumimorko/MSFS2020_CGLTools/issues/2#issuecomment-762232597)。但他的主要目的是将一些不要的东西去掉以改善地景质量。他还建立了一个另外的仓库用来演示一个[使用代理方式替换地景的方法]https://github.com/muumimorko/MSFS2020_Proxy)。遗憾的是这个仓库缺少一些必要的东西,无法正常的运行。

![IMG](https://user-images.githubusercontent.com/9518369/104909810-173dfb00-5991-11eb-8e17-4063deb7ab8f.jpg)

# 赞助

如果你已经成功的实现了,请给个star,让更多人看到!
如果你愿意给与作者一些赞助,请扫描以下二维码支持一下作者。

![微信](./doc/mm_reward_qrcode_1628320842310.png)
![阿里](./doc/1628320893.jpg)
20 changes: 10 additions & 10 deletions config.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[proxy]
url = socks5h://192.168.50.15:1080

[offline]
north_west = 46.357879198300516, 83.39287198273128
south_east = 22.89205887817234, 123.91045032827455
range = 5, 12
max_cache_size_g = 20
threads = 200

[proxy]
url = socks5h://192.168.50.15:1080

[offline]
north_west = 46.357879198300516, 83.39287198273128
south_east = 22.89205887817234, 123.91045032827455
range = 5, 12
max_cache_size_g = 20
threads = 200

Binary file removed python3/DLLs/_asyncio.pyd
Binary file not shown.
Binary file removed python3/DLLs/_bz2.pyd
Binary file not shown.
Binary file removed python3/DLLs/_ctypes.pyd
Binary file not shown.
Binary file removed python3/DLLs/_ctypes_test.pyd
Binary file not shown.
Binary file removed python3/DLLs/_decimal.pyd
Binary file not shown.
Binary file removed python3/DLLs/_elementtree.pyd
Binary file not shown.
Binary file removed python3/DLLs/_hashlib.pyd
Binary file not shown.
Binary file removed python3/DLLs/_lzma.pyd
Binary file not shown.
Binary file removed python3/DLLs/_msi.pyd
Binary file not shown.
Binary file removed python3/DLLs/_multiprocessing.pyd
Binary file not shown.
Binary file removed python3/DLLs/_overlapped.pyd
Binary file not shown.
Binary file removed python3/DLLs/_queue.pyd
Binary file not shown.
Binary file removed python3/DLLs/_socket.pyd
Binary file not shown.
Binary file removed python3/DLLs/_sqlite3.pyd
Binary file not shown.
Binary file removed python3/DLLs/_ssl.pyd
Binary file not shown.
Binary file removed python3/DLLs/_testbuffer.pyd
Binary file not shown.
Binary file removed python3/DLLs/_testcapi.pyd
Binary file not shown.
Binary file removed python3/DLLs/_testconsole.pyd
Binary file not shown.
Binary file removed python3/DLLs/_testimportmultiple.pyd
Binary file not shown.
Binary file removed python3/DLLs/_testinternalcapi.pyd
Binary file not shown.
Binary file removed python3/DLLs/_testmultiphase.pyd
Binary file not shown.
Binary file removed python3/DLLs/_tkinter.pyd
Binary file not shown.
Binary file removed python3/DLLs/_uuid.pyd
Binary file not shown.
Binary file removed python3/DLLs/_zoneinfo.pyd
Binary file not shown.
Binary file removed python3/DLLs/libcrypto-1_1.dll
Binary file not shown.
Binary file removed python3/DLLs/libffi-7.dll
Binary file not shown.
Binary file removed python3/DLLs/libssl-1_1.dll
Binary file not shown.
Binary file removed python3/DLLs/py.ico
Binary file not shown.
Binary file removed python3/DLLs/pyc.ico
Binary file not shown.
Binary file removed python3/DLLs/pyd.ico
Binary file not shown.
Binary file removed python3/DLLs/pyexpat.pyd
Binary file not shown.
Binary file removed python3/DLLs/python_lib.cat
Binary file not shown.
Binary file removed python3/DLLs/python_tools.cat
Binary file not shown.
Binary file removed python3/DLLs/select.pyd
Binary file not shown.
Binary file removed python3/DLLs/sqlite3.dll
Binary file not shown.
Binary file removed python3/DLLs/tcl86t.dll
Binary file not shown.
Binary file removed python3/DLLs/tk86t.dll
Binary file not shown.
Binary file removed python3/DLLs/unicodedata.pyd
Binary file not shown.
Binary file removed python3/DLLs/winsound.pyd
Binary file not shown.
Binary file removed python3/Doc/python397.chm
Binary file not shown.
Loading

0 comments on commit 936f2da

Please sign in to comment.