CN108536732A - Support the on-line automatic slice method of servicing of tile map and system of MapGIS67 map engineerings - Google Patents

Support the on-line automatic slice method of servicing of tile map and system of MapGIS67 map engineerings Download PDF

Info

Publication number
CN108536732A
CN108536732A CN201810166751.9A CN201810166751A CN108536732A CN 108536732 A CN108536732 A CN 108536732A CN 201810166751 A CN201810166751 A CN 201810166751A CN 108536732 A CN108536732 A CN 108536732A
Authority
CN
China
Prior art keywords
map
tile
directory
file
mapgis67
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810166751.9A
Other languages
Chinese (zh)
Other versions
CN108536732B (en
Inventor
郭明强
魏东琦
黄颖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China University of Geosciences
Original Assignee
China University of Geosciences
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China University of Geosciences filed Critical China University of Geosciences
Priority to CN201810166751.9A priority Critical patent/CN108536732B/en
Publication of CN108536732A publication Critical patent/CN108536732A/en
Application granted granted Critical
Publication of CN108536732B publication Critical patent/CN108536732B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Instructional Devices (AREA)

Abstract

The on-line automatic slice method of servicing of the tile map of MapGIS67 map engineerings and system are supported the invention discloses a kind of, first in client selection MapGIS67 map engineerings catalogue, directory map file, fontlib and system library directory, tile slicing parameter is set, then server end is passed it to, the tile that server end calls MapGIS10 to provide is sliced interface, it realizes the auto slice of map vector, and it is finally supplied to client call in the form of HTTP service.The most apparent difference of the present invention is to realize is automatically uploaded to server in client by MapGIS67 map vector datas and fontlib associated with it and system library, realize tile auto slice, tile images file is stored in server end in the form of a file, it solves the problems, such as that current MapGIS67 map vectors need manually to be sliced and generates tile data, the present invention can save a large amount of human cost.

Description

支持MapGIS67地图工程的瓦片地图在线自动切片服务方法与 系统The online automatic slicing service method and method of tile map supporting MapGIS67 map project system

技术领域technical field

本发明涉及网络地理信息系统技术,尤其是一种支持MapGIS67地图工程的瓦片地图在线自动切片服务方法及系统。The invention relates to network geographic information system technology, in particular to an online automatic slicing service method and system for tiled maps supporting MapGIS67 map engineering.

背景技术Background technique

将矢量地图处理成瓦片地图并提供瓦片地图服务是网络地理信息系统中需要实现的重要功能之一,也是地质、地矿、国土等行业的云GIS建设中需要解决的重要问题。地质、地矿、国土等行业做了大量的数据采集工作,其中大量的矢量地图数据是采用的MapGIS67进行采集和存储的,地图工程是.MPJ文件,MapGIS67没有提供瓦片地图切片工具,基于MapGIS67制作瓦片非常困难,MapGIS10提供了瓦片切片工具,但是需要人工手动操作,而且生成的瓦片数据是存在数据库中的,无法直接发布成网络地图服务供客户端调用。Processing vector maps into tile maps and providing tile map services is one of the important functions that need to be realized in network geographic information systems, and it is also an important problem that needs to be solved in the construction of cloud GIS in geology, mines, land and other industries. Geology, mines, land and other industries have done a lot of data collection work, among which a large amount of vector map data is collected and stored using MapGIS67. The map project is a .MPJ file. MapGIS67 does not provide a tile map slicing tool, based on MapGIS67 It is very difficult to make tiles. MapGIS10 provides a tile slicing tool, but manual operations are required, and the generated tile data is stored in the database, so it cannot be directly published as a network map service for client calls.

发明内容Contents of the invention

本发明要解决的技术问题在于针对现有技术中的缺陷,提供一种支持MapGIS67地图工程的瓦片地图在线自动切片服务方法与系统,支持MapGIS67地图数据、字体库和系统库的在线上传,基于MapGIS10提供的瓦片切片接口,实现MapGIS67地图工程的自动切片与服务发布。The technical problem to be solved by the present invention is to provide a tile map online automatic slicing service method and system that supports MapGIS67 map engineering for the defects in the prior art, and supports online upload of MapGIS67 map data, font library and system library, based on The tile slicing interface provided by MapGIS10 realizes automatic slicing and service publishing of MapGIS67 map projects.

根据本发明的其中一方面,本发明为解决其技术问题,所采用的技术方案是构造一种了支持MapGIS67地图工程的瓦片地图在线自动切片服务方法,客户端将MapGIS67矢量地图数据以及与MapGIS67矢量地图数据关联的字体库和系统库自动上传到服务器,服务器根据客户端传送过来的MapGIS67矢量地图数据以及与MapGIS67矢量地图数据关联的字体库和系统库,调用MapGIS10提供的瓦片切片接口实现瓦片自动切片,并将切片完成后瓦片图像文件以文件的形式存储在服务器端,以HTTP服务形式提供给客户端调用,客户端可以使用地图框架调用服务器端切片完成后的瓦片图像文件。According to one aspect of the present invention, in order to solve its technical problems, the technical solution adopted by the present invention is to construct a tile map online automatic slicing service method that supports MapGIS67 map engineering, and the client combines MapGIS67 vector map data and MapGIS67 The font library and system library associated with the vector map data are automatically uploaded to the server, and the server calls the tile slice interface provided by MapGIS10 to realize tile The slice is automatically sliced, and the tile image file is stored on the server as a file after the slice is completed, and is provided to the client as an HTTP service. The client can use the map framework to call the tile image file after the slice is completed on the server.

优选地,在本发明的支持MapGIS67地图工程的瓦片地图在线自动切片服务方法中,包括以下步骤:Preferably, in the online automatic slicing service method of the tile map supporting MapGIS67 map engineering of the present invention, comprise the following steps:

S1、客户端获取MapGIS67地图工程文件的路径、所述MapGIS67地图工程文件关联的地图图层文件所在的目录、所述MapGIS67地图工程文件所使用的字体库所在的目录以及所述MapGIS67地图工程文件所使用的系统库所在的目录;S1. The client obtains the path of the MapGIS67 map project file, the directory where the map layer file associated with the MapGIS67 map project file is located, the directory where the font library used by the MapGIS67 map project file is located, and the directory where the MapGIS67 map project file is located. The directory where the system library used is located;

S2、客户端获取瓦片切片策略、动态投影信息、瓦片切片后保存的名称tilename、瓦片切片的开始级别beginlevel和结束级别endlevel以及瓦片文件目录组织策略dirFormat;S2. The client obtains the tile slicing policy, dynamic projection information, the name tilename saved after the tile slicing, the beginlevel and endlevel of the tile slicing, and the tile file directory organization policy dirFormat;

S3、客户端将步骤S2获取的数据作为HTTP请求参数,构造成json格式字符串,发送到服务器端;S3. The client uses the data obtained in step S2 as an HTTP request parameter, constructs it into a json format string, and sends it to the server;

S4、服务器端在接收到步骤S3中客户端发送的数据后,在数据保存目录下新建一个与瓦片切片保存名称相同的文件夹,然后将接收到的数据保存到新建的文件夹中;S4. After receiving the data sent by the client in step S3, the server side creates a folder under the data storage directory with the same name as the tile slice, and then saves the received data into the newly created folder;

S5、服务器端在步骤S4的新建的文件夹中新建第一子文件夹,客户端将步骤S1中获得数据发送至服务器端,服务器端将接收到的客户端在步骤S1中获取的MapGIS67地图工程文件的路径、所述MapGIS67地图工程文件关联的地图图层文件所在的目录、所述MapGIS67地图工程文件所使用的字体库所在的目录以及所述MapGIS67地图工程文件所使用的系统库所在的目录分别存储到第一子文件夹的各个目录中;S5, the server end creates a new first subfolder in the newly created folder of step S4, the client sends the data obtained in step S1 to the server end, and the server end receives the MapGIS67 map project obtained by the client in step S1 The path of the file, the directory where the map layer file associated with the MapGIS67 map project file, the directory where the font library used by the MapGIS67 map project file and the directory where the system library used by the MapGIS67 map project file are located are respectively Stored in each directory of the first subfolder;

S6、服务器端调用MapGIS10的提供目录环境设置接口,将MapGIS10访问MapGIS67版本地图数据时使用的字体库目录和系统库目录分别设置为第一子文件夹中对应的目录;S6, the server side invokes the directory environment setting interface provided by MapGIS10, and the font library directory and system library directory used when MapGIS10 accesses MapGIS67 version map data are respectively set as corresponding directories in the first subfolder;

S7、服务器端根据步骤S4保存的动态投影信息,判断是否需要进行动态投影,若是,则服务器端调用MapGIS10提供的地图文档操作接口,从第一子文件夹中对应的目录中打开MapGIS67版本的地图工程文件,调用MapGIS10提供的地图文档操作接口,启用动态投影,并根据动态投影信息中的动态投影目的空间参照系spatial设置地图工程动态投影的目的空间参照系,调用MapGIS10提供的地图文档操作接口,保存地图工程文件,然后跳转至步骤S8;若否,则跳转至步骤S8;S7, the server end judges whether dynamic projection needs to be carried out according to the dynamic projection information preserved in step S4, if so, the server end calls the map document operation interface provided by MapGIS10, and opens the map of MapGIS67 version from the corresponding directory in the first subfolder For the project file, call the map document operation interface provided by MapGIS10, enable dynamic projection, and set the target spatial reference system of the dynamic projection of the map project according to the dynamic projection target spatial reference system spatial in the dynamic projection information, and call the map document operation interface provided by MapGIS10, Save the map project file, then jump to step S8; if not, then jump to step S8;

S8、服务器端在步骤S4的新建的文件夹中创建第二子文件夹,然后调用MapGIS10提供的瓦片数据库操作类,在第二子文件夹目录下创建一个瓦片数据库文件,再打开需要切片的地图工程文件,获得地图对象,打开创建好的瓦片数据库文件,调用瓦片切片接口,将地图工程文件中的地图切片保存到瓦片数据库文件中;S8. The server side creates a second subfolder in the newly created folder in step S4, then calls the tile database operation class provided by MapGIS10, creates a tile database file in the second subfolder directory, and then opens the slice that needs to be sliced The map project file, obtain the map object, open the created tile database file, call the tile slice interface, and save the map slice in the map project file to the tile database file;

S9、服务器端在步骤S4新建的文件夹中创建第三子文件夹,打开步骤S8保存的瓦片数据库文件,循环读取每个瓦片地图级别中的每一行的每一列,将瓦片图像数据按照步骤S2设置的瓦片文件目录组织策略dirFormat存储到第三子文件夹目录下;S9. The server side creates a third subfolder in the folder newly created in step S4, opens the tile database file saved in step S8, reads each column of each row in each tile map level in a loop, and converts the tile image The data is stored in the third subfolder directory according to the tile file directory organization policy dirFormat set in step S2;

S10、在客户端调用地图开发库提供的瓦片图层类,创建一个瓦片图层对象,在构造瓦片地图请求地址时,将对应的地址构造为URL地址格式,构造的地址与所述第三文件夹的地址对应;创建地图容器类,将瓦片图层对象添加到地图容器中,实现瓦片地图服务的远程调用。S10. Call the tile layer class provided by the map development library on the client side to create a tile layer object. When constructing the tile map request address, construct the corresponding address into a URL address format, and the constructed address is the same as the above-mentioned The address of the third folder corresponds; create a map container class, add the tile layer object to the map container, and realize the remote call of the tile map service.

优选地,在本发明的支持MapGIS67地图工程的瓦片地图在线自动切片服务方法中,所述步骤S1具体包括如下步骤:Preferably, in the tile map online automatic slicing service method supporting the MapGIS67 map project of the present invention, the step S1 specifically includes the following steps:

S11、在客户端浏览器中通过文件浏览对话框选择文件后缀名为.MPJ的MapGIS67地图工程文件,得到地图工程文件的路径;S11, select the MapGIS67 map project file whose file suffix is .MPJ through the file browsing dialog box in the client browser, and obtain the path of the map project file;

S12、在客户端浏览器中通过文件夹浏览对话框选择S11中地图工程文件所关联的地图图层文件所在的文件夹,得到地图工程文件关联的地图图层文件所在的目录;S12, in the client browser, select the folder where the map layer file associated with the map project file in S11 is located through the folder browsing dialog box, and obtain the directory where the map layer file associated with the map project file is located;

S13、在客户端浏览器中通过文件夹浏览对话框选择S11中地图工程文件所使用的字体库文件夹,其文件夹名称为clib,得到字体库所在的目录;S13, select the font library folder used by the map project file in S11 through the folder browsing dialog box in the client browser, and its folder name is clib, and obtain the directory where the font library is located;

S14、在客户端浏览器中通过文件夹浏览对话框选择S11中地图工程文件所使用的系统库文件夹,其文件夹名称为slib,得到系统库所在的目录。S14. Select the system library folder used by the map project file in S11 through the folder browsing dialog box in the client browser, and the folder name is slib, and obtain the directory where the system library is located.

优选地,在本发明的支持MapGIS67地图工程的瓦片地图在线自动切片服务方法中,步骤S2中客户端提供的的瓦片切片策略包括经纬度切片策略及Web墨卡托切片策略,且所述瓦片切片策略包含下述参数:每个瓦片级别的比例尺scale、瓦片地图切片时使用的地图坐标原点(originx,originy)、瓦片图像格式imgformat、瓦片图像的像素大小imgsize、分辨率resolution、大图像素大小groupsize、透明色backclr、JPEG图片压缩比jpgCompactRate、GIF是否透明gifTransparentFlag、是否高质量生成图片qulitymode。Preferably, in the tile map online automatic slicing service method supporting MapGIS67 map engineering of the present invention, the tile slicing strategy provided by the client in step S2 includes a latitude and longitude slicing strategy and a Web Mercator slicing strategy, and the tile The tile slicing strategy includes the following parameters: scale of each tile level, map coordinate origin (originx, originy) used for tile map slicing, tile image format imgformat, tile image pixel size imgsize, resolution resolution , large image pixel size groupsize, transparent color backclr, JPEG image compression ratio jpgCompactRate, whether GIF is transparent gifTransparentFlag, whether to generate high-quality image qulitymode.

优选地,在本发明的支持MapGIS67地图工程的瓦片地图在线自动切片服务方法中,所述动态投影信息包括是否需要动态投影dynProject以及选择动态投影时的目的空间参照系spatial。Preferably, in the tile map online automatic slicing service method supporting MapGIS67 map engineering of the present invention, the dynamic projection information includes whether dynamic projection dynProject is required and the destination spatial reference system spatial when dynamic projection is selected.

优选地,在本发明的支持MapGIS67地图工程的瓦片地图在线自动切片服务方法中,所述瓦片文件目录组织策略dirFormat包括:按“级别\行号\列号.图像格式”目录形式存储以及按“级别\列号\行号.图像格式”目录形式存储。Preferably, in the tile map online automatic slicing service method supporting MapGIS67 map engineering of the present invention, the tile file directory organization strategy dirFormat includes: storing in the directory form of "level\line number\column number.image format" and It is stored in the form of "level\column number\line number.image format".

优选地,在本发明的支持MapGIS67地图工程的瓦片地图在线自动切片服务方法中,所述步骤S4、S5具体为:Preferably, in the tile map online automatic slicing service method supporting the MapGIS67 map project of the present invention, the steps S4 and S5 are specifically:

服务器端数据保存目录设置为服务器端网站根目录%CachePath%下的data文件夹,服务器端接收到步骤S3提交的参数数据后,首先在数据保存目录下新建一个与瓦片切片保存名称相同的文件夹,该文件夹的完整路径为%CachePath%\%TileName%,然后将接收到的参数保存到%CachePath%\%TileName%目录下,保存的文件名为config.json;The server-side data storage directory is set to the data folder under the root directory %CachePath% of the server-side website. After receiving the parameter data submitted in step S3, the server first creates a new file in the data storage directory with the same name as the tile slice. Folder, the full path of the folder is %CachePath%\%TileName%, and then save the received parameters to the %CachePath%\%TileName% directory, and the saved file name is config.json;

服务器端在%CachePath%\%TileName%目录下创建一个名称为mapdata的文件夹,用于存放客户端上传的地图数据;客户端使用HTTP传输方式将步骤S1中获得数据传输至服务器端,服务器接收到数据后,在服务器端:地图工程文件存储目录为%CachePath%\%TileName%\mapdata\map,地图图层存储目录为%CachePath%\%TileName%\mapdata\data,字体库存储目录为%CachePath%\%TileName%\mapdata\clib,系统库存储目录为%CachePath%\%TileName%\mapdata\slib。The server side creates a folder named mapdata under the %CachePath%\%TileName% directory to store the map data uploaded by the client; the client uses HTTP to transmit the data obtained in step S1 to the server, and the server receives After receiving the data, on the server side: the map project file storage directory is %CachePath%\%TileName%\mapdata\map, the map layer storage directory is %CachePath%\%TileName%\mapdata\data, and the font library storage directory is % CachePath%\%TileName%\mapdata\clib, the system library storage directory is %CachePath%\%TileName%\mapdata\slib.

优选地,在本发明的支持MapGIS67地图工程的瓦片地图在线自动切片服务方法中,所述步骤S6具体为:Preferably, in the tile map online automatic slicing service method supporting the MapGIS67 map project of the present invention, the step S6 is specifically:

服务器端调用MapGIS10提供的目录环境设置接口,设置访问MapGIS67版本地图数据时使用的字体库目录和系统库目录分别为%CachePath%\%TileName%\mapdata\clib和%CachePath%\%TileName%\mapdata\slib。The server calls the directory environment setting interface provided by MapGIS10, and sets the font library directory and system library directory used when accessing MapGIS67 version map data to %CachePath%\%TileName%\mapdata\clib and %CachePath%\%TileName%\mapdata respectively \slib.

优选地,在本发明的支持MapGIS67地图工程的瓦片地图在线自动切片服务方法中,步骤S10中的开发库为Openlayers开发库、ArcGIS客户端开发库、SuperMap客户端开发库、天地图开发库、MapGIS客户端开发库或Leaflet开发库。Preferably, in the tiled map online automatic slicing service method supporting MapGIS67 map engineering of the present invention, the development library in step S10 is Openlayers development library, ArcGIS client development library, SuperMap client development library, Tiandi map development library, MapGIS client development library or Leaflet development library.

根据本发明的另一方面,本发明为解决其技术问题,还提供了一种支持MapGIS67地图工程的瓦片地图在线自动切片服务系统,其包括以下模块:According to another aspect of the present invention, the present invention also provides a kind of tile map online automatic slicing service system that supports MapGIS67 map project for solving its technical problem, and it comprises following module:

客户端路径获取模块,用于在客户端获取MapGIS67地图工程文件的路径、所述MapGIS67地图工程文件关联的地图图层文件所在的目录、所述MapGIS67地图工程文件所使用的字体库所在的目录以及所述MapGIS67地图工程文件所使用的系统库所在的目录;Client path acquisition module, for obtaining the path of MapGIS67 map engineering file at the client, the directory where the map layer file associated with the MapGIS67 map engineering file, the directory where the font library used by the MapGIS67 map engineering file is located and The directory where the system library used by the MapGIS67 map project file is located;

客户端配置获取模块,用于在客户端获取瓦片切片策略、动态投影信息、瓦片切片后保存的名称tilename、瓦片切片的开始级别beginlevel和结束级别endlevel以及瓦片文件目录组织策略dirFormat;The client configuration acquisition module is used to obtain the tile slicing strategy, dynamic projection information, the name tilename saved after the tile slicing, the beginlevel and endlevel of the tile slicing, and the tile file directory organization strategy dirFormat on the client side;

客户端数据发送模块,用于在客户端将客户端配置获取模块获取的数据作为HTTP请求参数,构造成json格式字符串,发送到服务器端;The client data sending module is used to use the data obtained by the client configuration acquisition module as an HTTP request parameter on the client, construct it into a json format string, and send it to the server;

服务器配置保存模块,用于在服务器端在接收到客户端数据发送模块中客户端发送的数据后,在数据保存目录下新建一个与瓦片切片保存名称相同的文件夹,然后将接收到的数据保存到新建的文件夹中;The server configuration saving module is used to create a folder with the same name as the tile slice in the data saving directory after receiving the data sent by the client in the client data sending module on the server side, and then save the received data Save to the newly created folder;

服务器路径保存模块,用于在服务器端在服务器配置保存模块的新建的文件夹中新建第一子文件夹,客户端将步骤客户端路径获取模块中获得数据发送至服务器端,服务器端将接收到的客户端在客户端路径获取模块中获取的MapGIS67地图工程文件的路径、所述MapGIS67地图工程文件关联的地图图层文件所在的目录、所述MapGIS67地图工程文件所使用的字体库所在的目录以及所述MapGIS67地图工程文件所使用的系统库所在的目录分别存储到第一子文件夹的各个目录中;The server path saving module is used to create a new first subfolder in the newly created folder of the server configuration saving module on the server side, and the client sends the data obtained in the step client path acquisition module to the server side, and the server side will receive The path of the MapGIS67 map project file obtained by the client in the client path acquisition module, the directory where the map layer file associated with the MapGIS67 map project file, the directory where the font library used by the MapGIS67 map project file is located, and The directory where the system library used by the MapGIS67 map project file is stored in each directory of the first subfolder respectively;

服务器接口设置模块,用于在服务器端调用MapGIS10提供的目录环境设置接口,将MapGIS10访问MapGIS67版本地图数据时使用的字体库目录和系统库目录分别设置为第一子文件夹中对应的目录;The server interface setting module is used to call the directory environment setting interface provided by MapGIS10 on the server side, and the font library directory and system library directory used when MapGIS10 accesses MapGIS67 version map data are respectively set as corresponding directories in the first subfolder;

服务器动态投影模块,用于在服务器端根据服务器配置保存模块保存的动态投影信息,判断是否需要进行动态投影,若是,则服务器端调用MapGIS10提供的地图文档操作接口,从第一子文件夹中对应的目录中打开MapGIS67版本的地图工程文件,调用MapGIS10提供的地图文档操作接口,启用动态投影,并根据动态投影信息中的动态投影的目的空间参照系spatial设置地图工程动态投影的目的空间参照系,调用MapGIS10提供的地图文档操作接口,保存地图工程文件,然后调用瓦片数据处理模块;若否,则调用瓦片数据处理模块;The server dynamic projection module is used to save the dynamic projection information saved by the module on the server side according to the server configuration, and judge whether dynamic projection is required. If so, the server side calls the map document operation interface provided by MapGIS10, and correspondingly from the first subfolder Open the map project file of MapGIS67 version in the directory of MapGIS10, call the map document operation interface provided by MapGIS10, enable dynamic projection, and set the target spatial reference system of the dynamic projection of the map project according to the spatial reference system spatial of the dynamic projection in the dynamic projection information, Call the map document operation interface provided by MapGIS10, save the map project file, and then call the tile data processing module; if not, call the tile data processing module;

瓦片数据处理模块,用于在服务器端在服务器配置保存模块的新建的文件夹中创建第二子文件夹,然后调用MapGIS10提供的瓦片数据库操作类,在第二子文件夹目录下创建一个瓦片数据库文件,再打开需要切片的地图工程文件,获得地图对象,打开创建好的瓦片数据库文件,调用瓦片切片接口,将地图工程文件中的地图切片保存到瓦片数据库文件中;The tile data processing module is used to create a second subfolder in the newly created folder of the server configuration saving module on the server side, and then call the tile database operation class provided by MapGIS10 to create a subfolder in the second subfolder directory Tile database file, then open the map project file that needs to be sliced, obtain the map object, open the created tile database file, call the tile slice interface, and save the map slice in the map project file to the tile database file;

组织策略处理模块,用于在服务器端在服务器配置保存模块的新建的文件夹中创建第三子文件夹,打开瓦片数据处理模块保存的瓦片数据库文件,循环读取每个瓦片地图级别中的每一行的每一列,将瓦片图像数据按照客户端配置获取模块设置的瓦片文件目录组织策略dirFormat存储到第三子文件夹目录下;The organization strategy processing module is used to create a third subfolder in the newly created folder of the server configuration saving module on the server side, open the tile database file saved by the tile data processing module, and read each tile map level in a loop In each column of each row, the tile image data is stored in the third subfolder directory according to the tile file directory organization strategy dirFormat set by the client configuration acquisition module;

客户端数据调用模块,用于在客户端调用地图开发库提供的瓦片图层类,创建一个瓦片图层对象,在构造瓦片地图请求地址时,将对应的地址构造为URL地址格式,构造的地址与所述第三文件夹的地址对应;创建地图容器类,将瓦片图层对象添加到地图容器中,实现瓦片地图服务的远程调用。The client data calling module is used to call the tile layer class provided by the map development library on the client side to create a tile layer object. When constructing a tile map request address, construct the corresponding address into a URL address format. The constructed address corresponds to the address of the third folder; a map container class is created, and tile layer objects are added to the map container to implement remote calling of the tile map service.

本发明能够实现MapGIS67矢量地图数据以及与其关联的字体库和系统库自动上传到服务器,然后调用MapGIS10提供的瓦片切片接口实现瓦片自动切片,将瓦片图像文件以文件的形式存储在服务器端,以HTTP服务形式提供给客户端调用,客户端可以使用Openlayers,Leaflet等地图框架调用服务器端的瓦片图像进行显示,解决了目前MapGIS67矢量地图需要人工手动切片生成瓦片数据的问题,在需要对大批量的MapGIS67矢量地图进行瓦片切片时,本发明的优势更为明显。The present invention can realize the automatic uploading of MapGIS67 vector map data and its associated font library and system library to the server, and then call the tile slice interface provided by MapGIS10 to realize automatic tile slicing, and store the tile image files in the form of files on the server side , provided to the client in the form of HTTP service, the client can use Openlayers, Leaflet and other map frameworks to call the tile image on the server side for display, which solves the problem that the current MapGIS67 vector map needs to be manually sliced to generate tile data. The advantages of the present invention are more obvious when large batches of MapGIS67 vector maps are tiled.

附图说明Description of drawings

下面将结合附图及实施例对本发明作进一步说明,附图中:The present invention will be further described below in conjunction with accompanying drawing and embodiment, in the accompanying drawing:

图1是本发明的支持MapGIS67地图工程的瓦片地图在线自动切片服务方法的一实施例的流程图。Fig. 1 is a flow chart of an embodiment of the tile map online automatic slicing service method supporting the MapGIS67 map project of the present invention.

具体实施方式Detailed ways

为了对本发明的技术特征、目的和效果有更加清楚的理解,现对照附图详细说明本发明的具体实施方式。In order to have a clearer understanding of the technical features, purposes and effects of the present invention, the specific implementation manners of the present invention will now be described in detail with reference to the accompanying drawings.

如图1所示,图1是本发明提供的一种支持MapGIS 67地图工程的瓦片地图在线自动切片与服务方法流程图,所述方法包括以下步骤:As shown in Fig. 1, Fig. 1 is a kind of tile map online automatic slicing and service method flowchart that supports MapGIS 67 map engineering provided by the present invention, and described method comprises the following steps:

步骤1)在客户端浏览器中通过文件浏览对话框选择文件后缀名为.MPJ的MapGIS67地图工程文件,得到地图工程文件的路径。Step 1) In the client browser, select the MapGIS67 map project file with the file extension .MPJ through the file browsing dialog box, and obtain the path of the map project file.

步骤2)在客户端浏览器中通过文件夹浏览对话框选择步骤1中地图工程文件所关联的地图图层文件所在的文件夹,得到地图工程文件关联的地图图层文件所在的目录,该目录中主要存储的是MapGIS 67的矢量点、线、面文件,文件后缀名分别为.WT、.WL、.WP。Step 2) In the client browser, select the folder where the map layer file associated with the map project file in step 1 is located through the folder browsing dialog box, and obtain the directory where the map layer file associated with the map project file is located. It mainly stores the vector point, line, and area files of MapGIS 67, and the file extensions are .WT, .WL, and .WP.

步骤3)在客户端浏览器中通过文件夹浏览对话框选择步骤1中地图工程文件所使用的字体库文件夹,其文件夹名称为clib,得到字体库所在的目录。Step 3) In the client browser, select the font library folder used by the map project file in step 1 through the folder browsing dialog box, and the folder name is clib, and obtain the directory where the font library is located.

步骤4)在客户端浏览器中通过文件夹浏览对话框选择步骤1中地图工程文件所使用的系统库文件夹,其文件夹名称为slib,得到系统库所在的目录。Step 4) In the client browser, select the system library folder used by the map project file in step 1 through the folder browsing dialog box, and the folder name is slib, and obtain the directory where the system library is located.

步骤5)设置瓦片切片策略(常用的有两种,一是经纬度切片策略,二是Web墨卡托切片策略),切片策略主要包含以下参数:每个瓦片级别的比例尺scale、瓦片地图切片时使用的地图坐标原点(originx,originy)、瓦片图像格式imgformat、瓦片图像的像素大小imgsize、分辨率(DPI)resolution、大图像素大小groupsize、透明色backclr、JPEG图片压缩比jpgCompactRate、GIF是否透明gifTransparentFlag、是否高质量生成图片(绘制时抗锯齿)qulitymode。Step 5) Set the tile slicing strategy (there are two commonly used ones, one is the longitude and latitude slicing strategy, and the other is the Web Mercator slicing strategy). The slicing strategy mainly includes the following parameters: scale of each tile level, tile map Map coordinate origin (originx, originy) used when slicing, tile image format imgformat, tile image pixel size imgsize, resolution (DPI) resolution, large image pixel size groupsize, transparent color backclr, JPEG image compression ratio jpgCompactRate, Whether the GIF is transparent gifTransparentFlag, whether to generate high-quality images (anti-aliasing when drawing) qulitymode.

步骤6)选择是否需要动态投影dynProject,如果是,转步骤7;如果否,转步骤8。Step 6) Choose whether to dynamically project dynProject, if yes, go to step 7; if not, go to step 8.

步骤7)选择动态投影的目的空间参照系spatial。Step 7) Select the target spatial reference system spatial for dynamic projection.

步骤8)设置瓦片切片后保存的名称tilename。Step 8) Set the name tilename saved after tile slicing.

步骤9)设置瓦片切片的开始级别beginlevel和结束级别endlevel。Step 9) Set the start level beginlevel and the end level endlevel of the tile slice.

步骤10)设置瓦片文件目录组织策略dirFormat,常用的有两种,一是按“级别\行号\列号.图像格式”目录形式存储;二是按“级别\列号\行号.图像格式”目录形式存储。Step 10) Set the tile file directory organization strategy dirFormat. There are two commonly used ones. One is to store in the directory form of "level\line number\column number.image format"; the other is to store it in the form of "level\column number\row number.image Format" directory form storage.

步骤11)将步骤5设置的瓦片切片策略参数、步骤6设置的是否动态投影、步骤7选择的动态投影目的空间参照系、步骤8设置的瓦片切片保存名称、步骤9设置的瓦片切片起始和结束级别、步骤10设置的瓦片目录组织策略作为HTTP请求参数,构造成json格式字符串(示例如{scale:“1$591658710.9#2$295829355.45”,originx:“-20037508.342787”,originy:“20037508.342787”,imgformat:”png”,imgsize:”256”,resolution:”96”,groups ize:”4096”,backclr=”9”,jpgCompactRate:”90”,gifTransparentFlag:”1”,qulitymode:”1”,dynProject:”false”,spatial:”EPSG:3857”,tilename:”tilemap”,beginlevel:”1”,endlevel:”2”,dirFormat:”LRC”}),发送到服务器端。Step 11) Set the tile slice policy parameters set in step 5, whether to dynamically project in step 6, the dynamic projection destination spatial reference system selected in step 7, the tile slice save name set in step 8, and the tile slice set in step 9 The start and end levels, and the tile directory organization strategy set in step 10 are used as HTTP request parameters, and constructed into a json format string (for example, {scale: "1$591658710.9#2$295829355.45", originx: "-20037508.342787", origin: " 20037508.342787",imgformat:"png",imgsize:"256",resolution:"96",groups size:"4096",backclr="9",jpgCompactRate:"90",gifTransparentFlag:"1",qulitymode:"1 ",dynProject:"false",spatial:"EPSG:3857",tilename:"tilemap",beginlevel:"1",endlevel:"2",dirFormat:"LRC"}), send to the server.

步骤12)服务器端数据保存目录设置为服务器端网站根目录下的data文件夹,设该目录为%CachePath%。服务器端接收到步骤11提交的参数数据后,首先在数据保存目录下新建一个与瓦片切片保存名称相同的文件夹,设该文件夹的完整路径为%CachePath%\%TileName%,然后将接收到的参数保存到%CachePath%\%TileName%目录下,保存的文件名为config.json。Step 12) The server-side data storage directory is set as the data folder under the root directory of the server-side website, and the directory is set as %CachePath%. After receiving the parameter data submitted in step 11, the server first creates a new folder with the same name as the tile slice in the data storage directory, and sets the full path of the folder as %CachePath%\%TileName%, and then receives The obtained parameters are saved to the %CachePath%\%TileName% directory, and the saved file name is config.json.

步骤13)服务器端在%CachePath%\%TileName%目录下创建一个名称为mapdata的文件夹,用于存放客户端上传的地图数据。使用HTTP传输方式,将步骤1选择的地图工程文件、步骤2选择的地图图层目录中的文件、步骤3选择的字体库目录中的文件、步骤4选择的系统库目录中的文件依次上传到服务器端。地图工程文件存储目录为%CachePath%\%TileName%\mapdata\map,地图图层存储目录为%CachePath%\%TileName%\mapdata\data,字体库存储目录为%CachePath%\%TileName%\mapdata\clib,系统库存储目录为%CachePath%\%TileName%\mapdata\slib。Step 13) The server creates a folder named mapdata under the %CachePath%\%TileName% directory for storing the map data uploaded by the client. Using the HTTP transmission method, upload the map project file selected in step 1, the file in the map layer directory selected in step 2, the file in the font library directory selected in step 3, and the file in the system library directory selected in step 4 to the Service-Terminal. The map project file storage directory is %CachePath%\%TileName%\mapdata\map, the map layer storage directory is %CachePath%\%TileName%\mapdata\data, and the font library storage directory is %CachePath%\%TileName%\mapdata \clib, the system library storage directory is %CachePath%\%TileName%\mapdata\slib.

步骤14)服务器端调用MapGIS 10提供目录环境设置接口,设置访问MapGIS 67版本地图数据时使用的字体库目录和系统库目录分别为%CachePath%\%TileName%\mapdata\clib和%CachePath%\%TileName%\mapdata\slib。Step 14) The server side calls MapGIS 10 to provide a directory environment setting interface, and the font library directory and system library directory used when setting access to MapGIS 67 version map data are respectively %CachePath%\%TileName%\mapdata\clib and %CachePath%\% TileName%\mapdata\slib.

步骤15)根据dynProject参数判断地图文档是否需要动态投影,如果是,转步骤16,如果否,转步骤17。Step 15) Judging whether the map document needs dynamic projection according to the dynProject parameter, if yes, go to step 16, if not, go to step 17.

步骤16)服务器端调用MapGIS 10提供的地图文档操作接口,打开MapGIS 67版本的地图工程,调用MapGIS10提供的地图文档操作接口,启用动态投影,并根据spatial参数设置地图工程动态投影的目的空间参照系,调用MapGIS 10提供的地图文档操作接口,保存地图工程文件,转至步骤S17。Step 16) The server calls the map document operation interface provided by MapGIS 10, opens the map project of MapGIS 67 version, calls the map document operation interface provided by MapGIS10, enables dynamic projection, and sets the target spatial reference system of the map project dynamic projection according to the spatial parameter , call the map document operation interface provided by MapGIS 10, save the map project file, and go to step S17.

步骤17)服务器端在%CachePath%\%TileName%目录下创建一个名称为tiledb的文件夹,然后调用MapGIS 10提供的瓦片数据库操作类,在%CachePath%\%TileName%\tiledb目录下创建一个名称为tilename的瓦片数据库文件,其文件扩展名为.TDF;再打开需要切片的地图工程文件,获得地图对象,打开创建好的瓦片数据库文件,调用MapGIS 10中提供的瓦片切片接口CacheTile(),使用步骤12中保存的config.json文件中的瓦片切片参数,将地图工程文件中的地图切片保存到瓦片数据库文件中。Step 17) The server side creates a folder named tiledb under the %CachePath%\%TileName% directory, then calls the tile database operation class provided by MapGIS 10, and creates a folder under the %CachePath%\%TileName%\tiledb directory The tile database file named tilename has a file extension of .TDF; then open the map project file that needs to be sliced, obtain the map object, open the created tile database file, and call the tile slice interface CacheTile provided in MapGIS 10 (), using the tile slice parameters in the config.json file saved in step 12, save the map slice in the map project file to the tile database file.

步骤18)服务器端在%CachePath%\%TileName%目录下创建一个名称为img的文件夹,调用MapGIS 10中瓦片操作类的Open接口,打开步骤17生成的瓦片数据库文件,调用MapGIS10中瓦片操作类的GetImg接口,循环读取每个瓦片地图级别中的每一行的每一列,将瓦片图像数据按照步骤10设置的目录形式进行存储到%CachePath%\%TileName%\img目录下。以第1级第2行第0列瓦片图像为例,如果步骤10设置的目录组织策略为“级别\行号\列号.图像格式”,图像格式为png,则该瓦片图像的存储路径为%CachePath%\%TileName%\img\1\2\0.png。Step 18) The server side creates a folder named img under the %CachePath%\%TileName% directory, calls the Open interface of the tile operation class in MapGIS 10, opens the tile database file generated in step 17, and calls the tile in MapGIS10 The GetImg interface of the tile operation class reads each column of each row in each tile map level in a loop, and stores the tile image data in the directory format set in step 10 in the %CachePath%\%TileName%\img directory . Take the tile image at level 1, row 2, column 0 as an example, if the directory organization policy set in step 10 is "level\line number\column number.image format" and the image format is png, the storage of the tile image The path is %CachePath%\%TileName%\img\1\2\0.png.

步骤19)在客户端调用Openlayers开发库提供的瓦片图层类,创建一个瓦片图层对象,在构造瓦片地图请求地址时,将其构造为类似http://127.0.0.1/mapservice/data/tilemap/img/1/2/0.png的URL地址格式。创建Openlayers中的地图容器类,将瓦片图层对象添加到地图容器中,实现瓦片地图服务的远程调用。结束。Step 19) Call the tile layer class provided by the Openlayers development library on the client side to create a tile layer object. When constructing the tile map request address, construct it like http://127.0.0.1/mapservice/ URL address format of data/tilemap/img/1/2/0.png. Create a map container class in Openlayers, add the tile layer object to the map container, and realize the remote call of the tile map service. Finish.

本发明最明显的不同在于能够实现在客户端将MapGIS 67矢量地图数据以及与其关联的字体库和系统库自动上传到服务器,然后调用MapGIS 10提供的瓦片切片接口实现瓦片自动切片,将瓦片图像文件以文件的形式存储在服务器端,以HTTP服务形式提供给客户端调用,客户端可以使用Openlayers,Leaflet等地图框架调用服务器端的瓦片图像进行显示,解决了目前MapGIS67矢量地图需要人工手动切片生成瓦片数据的问题,在需要对大批量的MapGIS 67矢量地图进行瓦片切片时,本发明的优势更为明显,可以节约大量的人力成本。The most obvious difference of the present invention is that it can automatically upload the MapGIS 67 vector map data and its associated font library and system library to the server on the client side, and then call the tile slice interface provided by MapGIS 10 to realize automatic tile slicing. The tile image files are stored on the server side in the form of files and provided to the client in the form of HTTP service. The client can use Openlayers, Leaflet and other map frameworks to call the tile images on the server side for display, which solves the problem that the current MapGIS67 vector map requires manual work. For the problem of generating tile data by slicing, when it is necessary to perform tile slicing on a large number of MapGIS 67 vector maps, the advantages of the present invention are more obvious, and a large amount of labor costs can be saved.

上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,这些均属于本发明的保护之内。Embodiments of the present invention have been described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementations, and the above-mentioned specific implementations are only illustrative, rather than restrictive. Those of ordinary skill in the art will Under the enlightenment of the present invention, many forms can also be made without departing from the gist of the present invention and the protection scope of the claims, and these all belong to the protection of the present invention.

Claims (10)

1.一种支持MapGIS67地图工程的瓦片地图在线自动切片服务方法,其特征在于,客户端将MapGIS67矢量地图数据以及与MapGIS67矢量地图数据关联的字体库和系统库自动上传到服务器,服务器根据客户端传送过来的MapGIS67矢量地图数据以及与MapGIS67矢量地图数据关联的字体库和系统库,调用MapGIS10提供的瓦片切片接口实现瓦片自动切片,并将切片完成后瓦片图像文件以文件的形式存储在服务器端,以HTTP服务形式提供给客户端调用,客户端可以使用地图框架调用服务器端切片完成后的瓦片图像文件。1. A tile map online automatic slicing service method that supports MapGIS67 map engineering is characterized in that the client automatically uploads the MapGIS67 vector map data and the font library and system library associated with the MapGIS67 vector map data to the server, and the server automatically MapGIS67 vector map data transmitted from the terminal and the font library and system library associated with the MapGIS67 vector map data, call the tile slice interface provided by MapGIS10 to realize automatic tile slicing, and store the tile image file in the form of a file after slicing On the server side, it is provided to the client in the form of HTTP service, and the client can use the map framework to call the tile image file after the server-side slicing is completed. 2.根据权利要求1所述的支持MapGIS67地图工程的瓦片地图在线自动切片服务方法,其特征在于,包括以下步骤:2. the online automatic slicing service method of the tile map supporting MapGIS67 map engineering according to claim 1, is characterized in that, comprises the following steps: S1、客户端获取MapGIS67地图工程文件的路径、所述MapGIS67地图工程文件关联的地图图层文件所在的目录、所述MapGIS67地图工程文件所使用的字体库所在的目录以及所述MapGIS67地图工程文件所使用的系统库所在的目录;S1. The client obtains the path of the MapGIS67 map project file, the directory where the map layer file associated with the MapGIS67 map project file is located, the directory where the font library used by the MapGIS67 map project file is located, and the directory where the MapGIS67 map project file is located. The directory where the system library used is located; S2、客户端获取瓦片切片策略、动态投影信息、瓦片切片后保存的名称tilename、瓦片切片的开始级别beginlevel和结束级别endlevel以及瓦片文件目录组织策略dirFormat;S2. The client obtains the tile slicing policy, dynamic projection information, the name tilename saved after the tile slicing, the beginlevel and endlevel of the tile slicing, and the tile file directory organization policy dirFormat; S3、客户端将步骤S2获取的数据作为HTTP请求参数,构造成json格式字符串,发送到服务器端;S3. The client uses the data obtained in step S2 as an HTTP request parameter, constructs it into a json format string, and sends it to the server; S4、服务器端在接收到步骤S3中客户端发送的数据后,在数据保存目录下新建一个与瓦片切片保存名称相同的文件夹,然后将接收到的数据保存到新建的文件夹中;S4. After receiving the data sent by the client in step S3, the server side creates a folder under the data storage directory with the same name as the tile slice, and then saves the received data into the newly created folder; S5、服务器端在步骤S4的新建的文件夹中新建第一子文件夹,客户端将步骤S1中获得数据发送至服务器端,服务器端将接收到的客户端在步骤S1中获取的MapGIS67地图工程文件的路径、所述MapGIS67地图工程文件关联的地图图层文件所在的目录、所述MapGIS67地图工程文件所使用的字体库所在的目录以及所述MapGIS67地图工程文件所使用的系统库所在的目录分别存储到第一子文件夹的各个目录中;S5, the server end creates a new first subfolder in the newly created folder of step S4, the client sends the data obtained in step S1 to the server end, and the server end receives the MapGIS67 map project obtained by the client in step S1 The path of the file, the directory where the map layer file associated with the MapGIS67 map project file, the directory where the font library used by the MapGIS67 map project file and the directory where the system library used by the MapGIS67 map project file are located are respectively Stored in each directory of the first subfolder; S6、服务器端调用MapGIS10提供的目录环境设置接口,将MapGIS10访问MapGIS67版本地图数据时使用的字体库目录和系统库目录分别设置为第一子文件夹中对应的目录;S6, the server side invokes the directory environment setting interface provided by MapGIS10, and sets the font library directory and system library directory used when MapGIS10 accesses MapGIS67 version map data as corresponding directories in the first subfolder; S7、服务器端根据步骤S4保存的动态投影信息,判断是否需要进行动态投影,若是,则服务器端调用MapGIS10提供的地图文档操作接口,从第一子文件夹中对应的目录中打开MapGIS67版本的地图工程文件,调用MapGIS10提供的地图文档操作接口,启用动态投影,并根据动态投影信息中的动态投影目的空间参照系spatial设置地图工程动态投影的目的空间参照系,调用MapGIS10提供的地图文档操作接口,保存地图工程文件,然后跳转至步骤S8;若否,则跳转至步骤S8;S7, the server end judges whether dynamic projection needs to be carried out according to the dynamic projection information preserved in step S4, if so, the server end calls the map document operation interface provided by MapGIS10, and opens the map of MapGIS67 version from the corresponding directory in the first subfolder For the project file, call the map document operation interface provided by MapGIS10, enable dynamic projection, and set the target spatial reference system of the dynamic projection of the map project according to the dynamic projection target spatial reference system spatial in the dynamic projection information, and call the map document operation interface provided by MapGIS10, Save the map project file, then jump to step S8; if not, then jump to step S8; S8、服务器端在步骤S4的新建的文件夹中创建第二子文件夹,然后调用MapGIS10提供的瓦片数据库操作类,在第二子文件夹目录下创建一个瓦片数据库文件,再打开需要切片的地图工程文件,获得地图对象,打开创建好的瓦片数据库文件,调用瓦片切片接口,将地图工程文件中的地图切片保存到瓦片数据库文件中;S8. The server side creates a second subfolder in the newly created folder in step S4, then calls the tile database operation class provided by MapGIS10, creates a tile database file in the second subfolder directory, and then opens the slice that needs to be sliced The map project file, obtain the map object, open the created tile database file, call the tile slice interface, and save the map slice in the map project file to the tile database file; S9、服务器端在步骤S4新建的文件夹中创建第三子文件夹,打开步骤S8保存的瓦片数据库文件,循环读取每个瓦片地图级别中的每一行的每一列,将瓦片图像数据按照步骤S2设置的瓦片文件目录组织策略dirFormat存储到第三子文件夹目录下;S9. The server side creates a third subfolder in the folder newly created in step S4, opens the tile database file saved in step S8, reads each column of each row in each tile map level in a loop, and converts the tile image The data is stored in the third subfolder directory according to the tile file directory organization policy dirFormat set in step S2; S10、在客户端调用地图开发库提供的瓦片图层类,创建一个瓦片图层对象,在构造瓦片地图请求地址时,将对应的地址构造为URL地址格式,构造的地址与所述第三文件夹的地址对应;创建地图容器类,将瓦片图层对象添加到地图容器中,实现瓦片地图服务的远程调用。S10. Call the tile layer class provided by the map development library on the client side to create a tile layer object. When constructing the tile map request address, construct the corresponding address into a URL address format, and the constructed address is the same as the above-mentioned The address of the third folder corresponds; create a map container class, add the tile layer object to the map container, and realize the remote call of the tile map service. 3.根据权利要求2所述的支持MapGIS67地图工程的瓦片地图在线自动切片服务方法,其特征在于,所述步骤S1具体包括如下步骤:3. the online automatic slicing service method of the tiled map supporting MapGIS67 map engineering according to claim 2, is characterized in that, described step S1 specifically comprises the following steps: S11、在客户端浏览器中通过文件浏览对话框选择文件后缀名为.MPJ的MapGIS67地图工程文件,得到地图工程文件的路径;S11, select the MapGIS67 map project file whose file suffix is .MPJ through the file browsing dialog box in the client browser, and obtain the path of the map project file; S12、在客户端浏览器中通过文件夹浏览对话框选择S11中地图工程文件所关联的地图图层文件所在的文件夹,得到地图工程文件关联的地图图层文件所在的目录;S12, in the client browser, select the folder where the map layer file associated with the map project file in S11 is located through the folder browsing dialog box, and obtain the directory where the map layer file associated with the map project file is located; S13、在客户端浏览器中通过文件夹浏览对话框选择S11中地图工程文件所使用的字体库文件夹,其文件夹名称为clib,得到字体库所在的目录;S13, select the font library folder used by the map project file in S11 through the folder browsing dialog box in the client browser, and its folder name is clib, and obtain the directory where the font library is located; S14、在客户端浏览器中通过文件夹浏览对话框选择S11中地图工程文件所使用的系统库文件夹,其文件夹名称为slib,得到系统库所在的目录。S14. Select the system library folder used by the map project file in S11 through the folder browsing dialog box in the client browser, and the folder name is slib, and obtain the directory where the system library is located. 4.根据权利要求2所述的支持MapGIS67地图工程的瓦片地图在线自动切片服务方法,其特征在于,步骤S2中客户端提供的的瓦片切片策略包括经纬度切片策略及Web墨卡托切片策略,且所述瓦片切片策略包含下述参数:每个瓦片级别的比例尺scale、瓦片地图切片时使用的地图坐标原点(originx,originy)、瓦片图像格式imgformat、瓦片图像的像素大小imgsize、分辨率resolution、大图像素大小groupsize、透明色backclr、JPEG图片压缩比jpgCompactRate、GIF是否透明gifTransparentFlag、是否高质量生成图片qulitymode。4. the online automatic slicing service method of the tiled map supporting the MapGIS67 map project according to claim 2, characterized in that, the tiled slicing strategy provided by the client in step S2 comprises latitude and longitude slicing strategy and Web Mercator slicing strategy , and the tile slicing strategy includes the following parameters: the scale scale of each tile level, the map coordinate origin (originx, originy) used for tile map slicing, the tile image format imgformat, and the pixel size of the tile image imgsize, resolution, large image pixel size groupsize, transparent color backclr, JPEG image compression ratio jpgCompactRate, whether GIF is transparent gifTransparentFlag, whether to generate high-quality image qualitymode. 5.根据权利要求2所述的支持MapGIS67地图工程的瓦片地图在线自动切片服务方法,其特征在于,所述动态投影信息包括是否需要动态投影dynProject以及选择动态投影时的目的空间参照系spatial。5. The tile map online automatic slicing service method supporting MapGIS67 map project according to claim 2, characterized in that the dynamic projection information includes whether dynamic projection dynProject is required and the destination spatial reference system spatial when dynamic projection is selected. 6.根据权利要求2所述的支持MapGIS67地图工程的瓦片地图在线自动切片服务方法,其特征在于,所述瓦片文件目录组织策略dirFormat包括:按“级别\行号\列号.图像格式”目录形式存储以及按“级别\列号\行号.图像格式”目录形式存储。6. The tile map online automatic slicing service method supporting the MapGIS67 map project according to claim 2, characterized in that, the tile file directory organization policy dirFormat comprises: by "level\line number\column number.image format " directory form and stored in the form of "level\column number\line number.image format". 7.根据权利要求2所述的支持MapGIS67地图工程的瓦片地图在线自动切片服务方法,其特征在于,所述步骤S4、S5具体为:7. the tile map online automatic slicing service method that supports MapGIS67 map project according to claim 2, it is characterized in that, described steps S4, S5 are specifically: 服务器端数据保存目录设置为服务器端网站根目录%CachePath%下的data文件夹,服务器端接收到步骤S3提交的参数数据后,首先在数据保存目录下新建一个与瓦片切片保存名称相同的文件夹,该文件夹的完整路径为%CachePath%\%TileName%,然后将接收到的参数保存到%CachePath%\%TileName%目录下,保存的文件名为config.json;The server-side data storage directory is set to the data folder under the root directory %CachePath% of the server-side website. After receiving the parameter data submitted in step S3, the server first creates a new file in the data storage directory with the same name as the tile slice. Folder, the full path of the folder is %CachePath%\%TileName%, and then save the received parameters to the %CachePath%\%TileName% directory, and the saved file name is config.json; 服务器端在%CachePath%\%TileName%目录下创建一个名称为mapdata的文件夹,用于存放客户端上传的地图数据;客户端使用HTTP传输方式将步骤S1中获得数据传输至服务器端,服务器接收到数据后,在服务器端:地图工程文件存储目录为%CachePath%\%TileName%\mapdata\map,地图图层存储目录为%CachePath%\%TileName%\mapdata\data,字体库存储目录为%CachePath%\%TileName%\mapdata\clib,系统库存储目录为%CachePath%\%TileName%\mapdata\slib。The server side creates a folder named mapdata under the %CachePath%\%TileName% directory to store the map data uploaded by the client; the client uses HTTP to transmit the data obtained in step S1 to the server, and the server receives After receiving the data, on the server side: the map project file storage directory is %CachePath%\%TileName%\mapdata\map, the map layer storage directory is %CachePath%\%TileName%\mapdata\data, and the font library storage directory is % CachePath%\%TileName%\mapdata\clib, the system library storage directory is %CachePath%\%TileName%\mapdata\slib. 8.根据权利要求7所述的支持MapGIS67地图工程的瓦片地图在线自动切片服务方法,其特征在于,所述步骤S6具体为:8. the online automatic slicing service method of the tile map supporting MapGIS67 map engineering according to claim 7, is characterized in that, described step S6 is specifically: 服务器端调用MapGIS10提供的目录环境设置接口,设置访问MapGIS67版本地图数据时使用的字体库目录和系统库目录分别为%CachePath%\%TileName%\mapdata\clib和%CachePath%\%TileName%\mapdata\slib。The server calls the directory environment setting interface provided by MapGIS10, and sets the font library directory and system library directory used when accessing MapGIS67 version map data to %CachePath%\%TileName%\mapdata\clib and %CachePath%\%TileName%\mapdata respectively \slib. 9.根据权利要求2所述的支持MapGIS67地图工程的瓦片地图在线自动切片服务方法,其特征在于,步骤S10中的开发库为Openlayers开发库、ArcGIS客户端开发库、SuperMap客户端开发库、天地图开发库、MapGIS客户端开发库或Leaflet开发库。9. the tiled map online automatic slicing service method supporting MapGIS67 map project according to claim 2, it is characterized in that, the development library in the step S10 is Openlayers development library, ArcGIS client development library, SuperMap client development library, Tiandi map development library, MapGIS client development library or Leaflet development library. 10.一种支持MapGIS67地图工程的瓦片地图在线自动切片服务系统,其特征在于,包括以下模块:10. A tiled map online automatic slicing service system that supports MapGIS67 map engineering is characterized in that it includes the following modules: 客户端路径获取模块,用于在客户端获取MapGIS67地图工程文件的路径、所述MapGIS67地图工程文件关联的地图图层文件所在的目录、所述MapGIS67地图工程文件所使用的字体库所在的目录以及所述MapGIS67地图工程文件所使用的系统库所在的目录;Client path acquisition module, for obtaining the path of MapGIS67 map engineering file at the client, the directory where the map layer file associated with the MapGIS67 map engineering file, the directory where the font library used by the MapGIS67 map engineering file is located and The directory where the system library used by the MapGIS67 map project file is located; 客户端配置获取模块,用于在客户端获取瓦片切片策略、动态投影信息、瓦片切片后保存的名称tilename、瓦片切片的开始级别beginlevel和结束级别endlevel以及瓦片文件目录组织策略dirFormat;The client configuration acquisition module is used to obtain the tile slicing strategy, dynamic projection information, the name tilename saved after the tile slicing, the beginlevel and endlevel of the tile slicing, and the tile file directory organization strategy dirFormat on the client side; 客户端数据发送模块,用于在客户端将客户端配置获取模块获取的数据作为HTTP请求参数,构造成json格式字符串,发送到服务器端;The client data sending module is used to use the data obtained by the client configuration acquisition module as an HTTP request parameter on the client, construct it into a json format string, and send it to the server; 服务器配置保存模块,用于在服务器端在接收到客户端数据发送模块中客户端发送的数据后,在数据保存目录下新建一个与瓦片切片保存名称相同的文件夹,然后将接收到的数据保存到新建的文件夹中;The server configuration saving module is used to create a folder with the same name as the tile slice in the data saving directory after receiving the data sent by the client in the client data sending module on the server side, and then save the received data Save to the newly created folder; 服务器路径保存模块,用于在服务器端在服务器配置保存模块的新建的文件夹中新建第一子文件夹,客户端将步骤客户端路径获取模块中获得数据发送至服务器端,服务器端将接收到的客户端在客户端路径获取模块中获取的MapGIS67地图工程文件的路径、所述MapGIS67地图工程文件关联的地图图层文件所在的目录、所述MapGIS67地图工程文件所使用的字体库所在的目录以及所述MapGIS67地图工程文件所使用的系统库所在的目录分别存储到第一子文件夹的各个目录中;The server path saving module is used to create a new first subfolder in the newly created folder of the server configuration saving module on the server side, and the client sends the data obtained in the step client path acquisition module to the server side, and the server side will receive The path of the MapGIS67 map project file obtained by the client in the client path acquisition module, the directory where the map layer file associated with the MapGIS67 map project file, the directory where the font library used by the MapGIS67 map project file is located, and The directory where the system library used by the MapGIS67 map project file is stored in each directory of the first subfolder respectively; 服务器接口设置模块,用于在服务器端调用MapGIS10提供的目录环境设置接口,将MapGIS10访问MapGIS67版本地图数据时使用的字体库目录和系统库目录分别设置为第一子文件夹中对应的目录;The server interface setting module is used to call the directory environment setting interface provided by MapGIS10 on the server side, and the font library directory and system library directory used when MapGIS10 accesses MapGIS67 version map data are respectively set as corresponding directories in the first subfolder; 服务器动态投影模块,用于在服务器端根据服务器配置保存模块保存的动态投影信息,判断是否需要进行动态投影,若是,则服务器端调用MapGIS10提供的地图文档操作接口,从第一子文件夹中对应的目录中打开MapGIS67版本的地图工程文件,调用MapGIS 10提供的地图文档操作接口,启用动态投影,并根据动态投影信息中的动态投影的目的空间参照系spatial设置地图工程动态投影的目的空间参照系,调用MapGIS10提供的地图文档操作接口,保存地图工程文件,然后调用瓦片数据处理模块;若否,则调用瓦片数据处理模块;The server dynamic projection module is used to save the dynamic projection information saved by the module on the server side according to the server configuration, and judge whether dynamic projection is required. If so, the server side calls the map document operation interface provided by MapGIS10, and correspondingly from the first subfolder Open the map project file of MapGIS67 version in the directory of MapGIS 10, call the map document operation interface provided by MapGIS 10, enable dynamic projection, and set the target spatial reference system of the dynamic projection of the map project according to the spatial reference system spatial of the dynamic projection in the dynamic projection information , call the map document operation interface provided by MapGIS10, save the map project file, and then call the tile data processing module; if not, call the tile data processing module; 瓦片数据处理模块,用于在服务器端在服务器配置保存模块的新建的文件夹中创建第二子文件夹,然后调用MapGIS10提供的瓦片数据库操作类,在第二子文件夹目录下创建一个瓦片数据库文件,再打开需要切片的地图工程文件,获得地图对象,打开创建好的瓦片数据库文件,调用瓦片切片接口,将地图工程文件中的地图切片保存到瓦片数据库文件中;The tile data processing module is used to create a second subfolder in the newly created folder of the server configuration saving module on the server side, and then call the tile database operation class provided by MapGIS10 to create a subfolder in the second subfolder directory Tile database file, then open the map project file that needs to be sliced, obtain the map object, open the created tile database file, call the tile slice interface, and save the map slice in the map project file to the tile database file; 组织策略处理模块,用于在服务器端在服务器配置保存模块的新建的文件夹中创建第三子文件夹,打开瓦片数据处理模块保存的瓦片数据库文件,循环读取每个瓦片地图级别中的每一行的每一列,将瓦片图像数据按照客户端配置获取模块设置的瓦片文件目录组织策略dirFormat存储到第三子文件夹目录下;The organization strategy processing module is used to create a third subfolder in the newly created folder of the server configuration saving module on the server side, open the tile database file saved by the tile data processing module, and read each tile map level in a loop In each column of each row, the tile image data is stored in the third subfolder directory according to the tile file directory organization strategy dirFormat set by the client configuration acquisition module; 客户端数据调用模块,用于在客户端调用地图开发库提供的瓦片图层类,创建一个瓦片图层对象,在构造瓦片地图请求地址时,将对应的地址构造为URL地址格式,构造的地址与所述第三文件夹的地址对应;创建地图容器类,将瓦片图层对象添加到地图容器中,实现瓦片地图服务的远程调用。The client data calling module is used to call the tile layer class provided by the map development library on the client side to create a tile layer object. When constructing a tile map request address, construct the corresponding address into a URL address format. The constructed address corresponds to the address of the third folder; a map container class is created, and tile layer objects are added to the map container to implement remote calling of the tile map service.
CN201810166751.9A 2018-02-28 2018-02-28 Tile map online automatic slicing service method and system supporting MapGIS67 map engineering Expired - Fee Related CN108536732B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810166751.9A CN108536732B (en) 2018-02-28 2018-02-28 Tile map online automatic slicing service method and system supporting MapGIS67 map engineering

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810166751.9A CN108536732B (en) 2018-02-28 2018-02-28 Tile map online automatic slicing service method and system supporting MapGIS67 map engineering

Publications (2)

Publication Number Publication Date
CN108536732A true CN108536732A (en) 2018-09-14
CN108536732B CN108536732B (en) 2021-08-27

Family

ID=63486049

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810166751.9A Expired - Fee Related CN108536732B (en) 2018-02-28 2018-02-28 Tile map online automatic slicing service method and system supporting MapGIS67 map engineering

Country Status (1)

Country Link
CN (1) CN108536732B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109636868A (en) * 2018-11-28 2019-04-16 中国地质大学(武汉) The online construction method of High-precision image map and equipment based on WebGIS and deep learning
CN110275931A (en) * 2019-06-17 2019-09-24 北京讯腾智慧科技股份有限公司 A kind of pipe network geographic information service method for automatically releasing and system
CN110853042A (en) * 2019-11-14 2020-02-28 空间信息产业发展股份有限公司 Automatic secret-involved vector graph segmentation system and method based on image recognition
CN111723170A (en) * 2020-05-07 2020-09-29 武汉臻图网络科技有限公司 CesiumJS-based mobile terminal offline three-dimensional GIS application implementation method and system
CN111914041A (en) * 2019-05-10 2020-11-10 中国电力科学研究院有限公司 Power grid map vector data providing method
CN111913951A (en) * 2019-05-10 2020-11-10 中国电力科学研究院有限公司 A map vector data slicing method for superimposing power grid data
CN111967052A (en) * 2020-09-21 2020-11-20 北京市测绘设计研究院 Method and system for realizing topographic map distribution
CN112148703A (en) * 2020-09-29 2020-12-29 华能新能源股份有限公司 High-resolution wind resource map data layered slicing system and method
CN112231426A (en) * 2020-10-13 2021-01-15 重庆紫光华山智安科技有限公司 Vector tile point data based updating method, system, medium and terminal
CN112767254A (en) * 2021-02-07 2021-05-07 杭州今奥信息科技股份有限公司 Image compression method with high compression ratio
CN113470142A (en) * 2021-06-23 2021-10-01 广西电网有限责任公司 Intelligent generation and display method for low-voltage point location and line path vector diagram in distribution network
CN113626547A (en) * 2021-07-29 2021-11-09 北京中交兴路信息科技有限公司 Freight industry map vector slicing method and device, storage medium and terminal
CN114972671A (en) * 2022-07-06 2022-08-30 中煤(西安)地下空间科技发展有限公司 Vector tile rendering method realized based on hypergraph desktop fusion open source software
WO2022184185A3 (en) * 2022-03-07 2023-01-05 中咨数据有限公司 Rapid image calibration and real-time rendering method and system, medium, and mobile end
CN118606274A (en) * 2024-05-24 2024-09-06 中科星图数字地球合肥有限公司 A method and device for storing raster image tile data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740878A (en) * 2015-12-11 2016-07-06 中国地质调查局发展研究中心 Symbol recognition method and device of geographic information system
US9454847B2 (en) * 2009-02-24 2016-09-27 Google Inc. System and method of indicating transition between street level images
CN106951325A (en) * 2017-03-10 2017-07-14 中国地质大学(武汉) Space computational fields calculate intensity cube construction method
US20180046648A1 (en) * 2013-10-17 2018-02-15 Nant Holdings Ip, Llc Wide area augmented reality location-based services

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9454847B2 (en) * 2009-02-24 2016-09-27 Google Inc. System and method of indicating transition between street level images
US20180046648A1 (en) * 2013-10-17 2018-02-15 Nant Holdings Ip, Llc Wide area augmented reality location-based services
CN105740878A (en) * 2015-12-11 2016-07-06 中国地质调查局发展研究中心 Symbol recognition method and device of geographic information system
CN106951325A (en) * 2017-03-10 2017-07-14 中国地质大学(武汉) Space computational fields calculate intensity cube construction method

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109636868B (en) * 2018-11-28 2022-12-30 中国地质大学(武汉) High-precision image map online construction method and device based on WebGIS and deep learning
CN109636868A (en) * 2018-11-28 2019-04-16 中国地质大学(武汉) The online construction method of High-precision image map and equipment based on WebGIS and deep learning
CN111914041B (en) * 2019-05-10 2024-03-19 中国电力科学研究院有限公司 Power grid map vector data providing method
CN111914041A (en) * 2019-05-10 2020-11-10 中国电力科学研究院有限公司 Power grid map vector data providing method
CN111913951A (en) * 2019-05-10 2020-11-10 中国电力科学研究院有限公司 A map vector data slicing method for superimposing power grid data
CN111913951B (en) * 2019-05-10 2024-03-15 中国电力科学研究院有限公司 Map vector data slicing method for superimposed power grid data
CN110275931A (en) * 2019-06-17 2019-09-24 北京讯腾智慧科技股份有限公司 A kind of pipe network geographic information service method for automatically releasing and system
CN110853042A (en) * 2019-11-14 2020-02-28 空间信息产业发展股份有限公司 Automatic secret-involved vector graph segmentation system and method based on image recognition
CN110853042B (en) * 2019-11-14 2023-01-10 空间信息产业发展股份有限公司 Automatic secret-involved vector graph segmentation system and method based on image recognition
CN111723170A (en) * 2020-05-07 2020-09-29 武汉臻图网络科技有限公司 CesiumJS-based mobile terminal offline three-dimensional GIS application implementation method and system
CN111723170B (en) * 2020-05-07 2023-09-19 武汉臻图网络科技有限公司 Mobile terminal offline three-dimensional GIS application realization method and system based on CesiumJS
CN111967052A (en) * 2020-09-21 2020-11-20 北京市测绘设计研究院 Method and system for realizing topographic map distribution
CN112148703A (en) * 2020-09-29 2020-12-29 华能新能源股份有限公司 High-resolution wind resource map data layered slicing system and method
CN112231426A (en) * 2020-10-13 2021-01-15 重庆紫光华山智安科技有限公司 Vector tile point data based updating method, system, medium and terminal
CN112767254A (en) * 2021-02-07 2021-05-07 杭州今奥信息科技股份有限公司 Image compression method with high compression ratio
CN113470142A (en) * 2021-06-23 2021-10-01 广西电网有限责任公司 Intelligent generation and display method for low-voltage point location and line path vector diagram in distribution network
CN113470142B (en) * 2021-06-23 2022-06-10 广西电网有限责任公司 Intelligent generation and display method for low-voltage point location and line path vector diagram in distribution network
CN113626547A (en) * 2021-07-29 2021-11-09 北京中交兴路信息科技有限公司 Freight industry map vector slicing method and device, storage medium and terminal
WO2022184185A3 (en) * 2022-03-07 2023-01-05 中咨数据有限公司 Rapid image calibration and real-time rendering method and system, medium, and mobile end
CN114972671A (en) * 2022-07-06 2022-08-30 中煤(西安)地下空间科技发展有限公司 Vector tile rendering method realized based on hypergraph desktop fusion open source software
CN114972671B (en) * 2022-07-06 2024-04-30 中煤(西安)地下空间科技发展有限公司 Vector tile rendering method based on hypergraph desktop fusion open source software
CN118606274A (en) * 2024-05-24 2024-09-06 中科星图数字地球合肥有限公司 A method and device for storing raster image tile data

Also Published As

Publication number Publication date
CN108536732B (en) 2021-08-27

Similar Documents

Publication Publication Date Title
CN108536732A (en) Support the on-line automatic slice method of servicing of tile map and system of MapGIS67 map engineerings
US10533871B2 (en) Rendering a map using style identifiers
CN105069118B (en) A kind of application scenarios management method and system based on GIS configurations
CN110084877B (en) Managing map elements using aggregated feature identifiers
EP2560143B1 (en) Generating and serving tiles in a digital mapping system
CN100452050C (en) Method of generating and organizing source data of grid electron map and method of generating target data
US20110025715A1 (en) Appropriately scaled map display with superposed information
US20080074423A1 (en) Method and System for Displaying Graphical Objects on a Digital Map
US20150062114A1 (en) Displaying textual information related to geolocated images
CN102819530A (en) Method and device for displaying electronic map
US8970632B2 (en) Systems and methods for temporary display of map data stored in a display device high speed memory
TW200817958A (en) Panoramic ring interface for interactive mapping
EP2997544A1 (en) Use of map data difference tiles to iteratively provide map data to a client device
DE202016006079U1 (en) Dynamically controlling a map view window for user signals
WO2006078565A2 (en) An internet based geographic information system
CN105320689A (en) Photo information processing method and device as well as terminal
CN106534478A (en) Map information display system based on asynchronous loading
US20060248192A1 (en) Method for pulling images from the internet for viewing on a remote digital display
KR101485108B1 (en) Batch automatic method for coordinate transfer and apparatus for the same
CN106095472A (en) A kind of head portrait setting method and device
CN116361494A (en) Real-time generation method for satellite remote sensing image tiles
CN109781135B (en) Information screen information supplement display method, system and application of road-directing robot
Koukofikis et al. Interoperable visualization of 3d city models using OGC’s standard 3D portrayal service
CN115408406A (en) High-density ship position dynamic rendering system based on map service
US20230140759A1 (en) Generating a representation of a spherical image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210827