当前位置:网站首页>Various utilization forms of map tile data and browsing display of tile data
Various utilization forms of map tile data and browsing display of tile data
2022-06-10 01:26:00 【nanke_ yh】
in the light of 【 Personally practice the Google Maps slice that you can download url Address 】 Google maps data download attempt and Python Reptile implementation A friend asked in the comment area ‘ Can the downloaded tile data be displayed in ArcGIS Use directly on ’ The problem of , Describe the relevant utilization methods .
First, engineering , After getting the tile data , It is mainly used for the base map background of map software . Then it will be hit tar package , And then access through software in the mobile terminal .
hit tar package
1、windows:
If there is Git Can be directly in Git Bash Here Inside, it is packaged through the command line ;

It can also be done through 7-ZipPortable Tool packing , open exe Then select the file to package / Folder , The right choice 7-zip-> Add to compressed package , choice tar that will do .



WINDOWS Next use 7z Compression generation tar.gz package - Let's have a look (zoukankan.com)
2、Linux:
Package directly on the terminal through commands ;
tar Packing command (linux)_ pressure cooker _1220 The blog of -CSDN Blog _tar pack

command :tar -cvf < Package file name .tar> < Files that need to be packaged >
for example :tar -cvf satellite.tar satellite
It's over tar After package , It can be placed on the corresponding terminal ( Like mobile phone. ) Browse map data through the developed map software .
And then through tomcat Browse through the service distribution form . This is also the focus of this article .
1、 Put the downloaded image on the server tomcat Under the webapps Under the folder , Then start tomcat( ./catalina.sh run)
2、 This can be done directly in the virtual machine / Start in the server tomcat, It can also be started by remote connection .
For the download method of Google tile map, see :【 Personally practice the Google Maps slice that you can download url Address 】 Google maps data download attempt and Python Reptile implementation _nanke_yh The blog of -CSDN Blog _ Google maps data download
For detailed operations of remote connection to the server, please refer to :【 Step by step to pass the pass 】windows This machine passes through xftp/xshell Connection connection Ubuntu Virtual machine server _nanke_yh The blog of -CSDN Blog
3、 And then html Upper use openlayers To load offline images , Through service requests url by :
http://localhost:8080/satellite/{z}/{x}/{y}.png
Then open it directly html File can browse the map .
Tile map data display effect demonstration
Here, we will mainly demonstrate the effect of loading tiles through remote connection ( Remote meeting , Then direct access will be ):
1、 Open on host Xshell, Then set up the server , Mainly IP Address and port number , Server user name and password ;
2、 Connect to server , use cd The command navigates to the... Where the tile data is placed tomcat The folder bin Under the folder ;
3、 Input ./catalina.sh run start-up tomcat;

4、 After starting , We can go through url To get the tile data in the server :
Here we need to pay attention to , Because the server is accessed through remote connection , that url Medium localhost The server needs to be replaced ip Address .

5、 It can also be done by writing html Access all tile datasets :


Inside html Inside, it mainly calls openlayers, Let it load the offline map :
<script src="js/ol.js"></script>The important thing is to be in body Define a map block :
<div id="myposition"></div><!-- Point coordinates display -->
<div id="map"></div>Then use it directly ol The functions in the are used to load tile data .
// Create map
var map = new ol.Map({
view: new ol.View({
center: centerPos,// The center of the map
minZoom:1,
maxZoom:20,
zoom: 5// Map initial level
}),
//extent: fullExtent,
controls: ol.control.defaults().extend([mousePositionControl]),
target: 'map'
});
var offlineSource = new ol.source.XYZ({
url:'http:// The server IP Address :8080/satellite/{z}/{x}/{y}.png',
projection: 'EPSG:3857',
});
// ol.source.XYZ Add layers of Tile Map
var tileLayer = new ol.layer.Tile({
source: offlineSource
});
map.addLayer(tileLayer);// Add to map Inside 边栏推荐
- Mysql——》如何解决数据的读一致性问题
- Source code analysis of Tencent libco collaboration open source library (I) -- download libco compilation and installation and try to run the sample code
- [games101] Assignment 1 -- MVP (model, view, projection) transformation
- MySQL -- how to solve the problem of data read consistency
- 【Proteus仿真】51单片机+LCD1602+外置存储器计算器
- LEAK: ByteBuf. release() was not called before it‘s garbage-collected
- Why do programmers run away after two years?
- 洛谷P1220 关路灯 题解 区间DP
- Unity technology - 2D project experience
- MySQL - isolation level of transactions
猜你喜欢

Node red series (II and III): develop a Gaode map panel dashboard in node red

Why do programmers run away after two years?

梯度下降引发AI大牛们“激辩”,网友:每个人的答案都值得一看

MySQL - separate database and table

Curriculum Learning and Graph Neural Networks (or Graph Structure Learning)

Practice of Flink CDC + Hudi massive data entering the lake in SF

The writing speed is increased by tens of times. The application of tdengine in tostar intelligent factory solution

How can win11 directly return to the desktop?

Unity技术 - 2D项目经验

图片批量下载 +图片马赛克:多张图片组成端午安康!
随机推荐
LEAK: ByteBuf. release() was not called before it‘s garbage-collected
[Multisim Simulation] differential proportional amplifier circuit
Application of fire emergency evacuation indication system in a biopharmaceutical factory project
The IPO meeting of xinghuan science and Technology Innovation Board: the gross profit margin remains at a high level, with Tencent and other major shareholders
亚洲首屈一指的Web3盛事“TOKEN2049新加坡”公布冠名赞助商
Host computer development -- how fast is MODBUS
Think of GPL as a "virus"? Please stop defaming GPL
【Multisim仿真】差分比例放大电路
0 is it feasible to conduct software testing only by self-study? After reading this article, I am not confused
Mysql——》分库分表
PCI bar register explanation (two examples)
Short video live broadcast source code, customize the circular playback of pictures or videos
How the computer system modifies the picture format
Solution to the problem of the greatest common divisor and the least common multiple of Luogu p1029
Don't build the wheel again. It is recommended to use Google guava open source tool class library. It is really powerful!
总结——》【JVM】
【LeetCode】338. 比特位计数
梯度下降引发AI大牛们“激辩”,网友:每个人的答案都值得一看
洛谷P2657 [SCOI2009]windy数 题解 数位DP
Source code analysis of Tencent libco collaboration open source library (I) -- download libco compilation and installation and try to run the sample code