CN114490912A - Tile data downloading method and device - Google Patents

Tile data downloading method and device Download PDF

Info

Publication number
CN114490912A
CN114490912A CN202210131612.9A CN202210131612A CN114490912A CN 114490912 A CN114490912 A CN 114490912A CN 202210131612 A CN202210131612 A CN 202210131612A CN 114490912 A CN114490912 A CN 114490912A
Authority
CN
China
Prior art keywords
map
row
tile
tile data
zoom level
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.)
Pending
Application number
CN202210131612.9A
Other languages
Chinese (zh)
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.)
South Digital Technology Co ltd
Original Assignee
South Digital Technology Co ltd
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 South Digital Technology Co ltd filed Critical South Digital Technology Co ltd
Priority to CN202210131612.9A priority Critical patent/CN114490912A/en
Publication of CN114490912A publication Critical patent/CN114490912A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Remote Sensing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a method and a device for downloading tile data, which relate to the technical field of geographic information and comprise the following steps: firstly, obtaining map setting information of a map website on a current page; wherein the map setting information includes: a current zoom level; then, calculating a first row number range of the designated area under the current zoom level based on the map setting information and a preset slice positioning formula; and finally, based on the first row number range, parallel downloading the tile data in the specified area by utilizing a web crawler technology. The web crawler technology in the invention is multithread downloading, and only the tile data of the designated area is downloaded according to the requirement, but not all areas, so the invention can save the downloading time and avoid the waste of network resources.

Description

Tile data downloading method and device
Technical Field
The invention relates to the technical field of geographic information, in particular to a tile data downloading method and device.
Background
With the rapid development of information technologies such as the internet, big data, artificial intelligence and the like, intelligent services are widely applied. The internet, big data and artificial intelligence are general purpose technologies, not only can re-enable products, but also can enable enterprises in all directions, so that management decisions are more predictive, execution efficiency is higher, and execution cost is lower. Under various application technologies, data acquisition becomes one of the major problems in various technical researches. The map tile data is easy to superpose and combine in the space data, matching application of the map tile data and remote sensing data is facilitated, various space analyses and geographic phenomenon simulation are easy, and the map tile data is widely applied to actual production based on the advantages. When map tile data is downloaded by using the prior art, the downloading process of the tile data is relatively long and occupies certain network resources because the map level is relatively large and the data volume of the map tiles is relatively large.
Disclosure of Invention
The invention aims to provide a method and a device for downloading tile data, which are used for solving the technical problems that the tile data in the prior art is long in downloading time and occupies certain network resources.
In a first aspect, the present invention provides a method for downloading tile data, including: obtaining map setting information of a map website on a current page; wherein the map setting information includes: a current zoom level; calculating a first row number range of the designated area under the current zoom level based on the map setting information and a preset slice positioning formula; and based on the first row number range, carrying out parallel downloading on the tile data in the specified area by utilizing a web crawler technology.
Further, the parallel downloading of the tile data in the designated area by using a web crawler technology based on the first range of the row numbers includes: calculating a second row and column number range of all tiles in the specified area in an area grading mode based on the first row and column number range; wherein different tiles correspond to different levels and ranges; and based on all the second row and column number ranges, downloading the tile data of all the tiles in parallel by utilizing the web crawler technology.
Further, the map setting information further includes: the map resolution and the coordinate range of the designated area at the current zoom level; the slice positioning formula comprises a tile initial row and column number formula and a tile termination row and column number formula; the calculating a first row number range of the designated area at the current zoom level based on the map setting information and a preset slice positioning equation includes: calculating the initial row and column number of the tile at the current zoom level by using the initial row and column number formula of the tile based on the map resolution at the current zoom level and the coordinate range of the specified area; calculating the ending row and column number of the tile at the current zoom level by using the tile ending row and column number formula based on the map resolution at the current zoom level and the coordinate range of the specified area; determining a first range of row and column numbers for a specified region at the current zoom level based on the initial row and column number and the terminal row and column number.
Further, the method further comprises: processing and cutting an original picture corresponding to the tile data into a target picture through a picture processing technology, and storing the target picture to a file server; or performing binary conversion on the tile data, and storing the tile data to a database in a binary format.
Further, the method further comprises: redefining a WMTS (OpenGIS Web Map Tile Service) Map Service standard; and publishing the tile data to a Web container or a GIS server based on the WMTS map service standard.
Further, the redefining of the WMTS map service standard includes: defining a GetCapabilities interface to allow a user to access service meta information; defining a GetTile interface to allow a user to acquire tile data; defining the GetFeatureInfo interface allows a user to access the element information.
Further, the service meta information includes at least one of: map name, map range, cached picture format, scale set, and URL address template for obtaining picture.
In a second aspect, the present invention provides a tile data downloading apparatus, including: the system comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring map setting information of a map website on a current page; wherein the map setting information includes: a current zoom level; the calculation unit is used for calculating a first row number range of the designated area under the current zoom level based on the map setting information and a preset slice positioning formula; and the parallel downloading unit is used for carrying out parallel downloading on the tile data of the specified area by utilizing a web crawler technology based on the first row number range.
In a third aspect, the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program executable on the processor, and the processor executes the computer program to implement the steps of the tile data downloading method.
In a fourth aspect, the present invention also provides a computer readable medium having non-volatile program code executable by a processor, wherein the program code causes the processor to execute the tile data downloading method.
The invention provides a method and a device for downloading tile data, comprising the following steps: firstly, obtaining map setting information of a map website on a current page; wherein the map setting information includes: a current zoom level; then, calculating a first row number range of the designated area under the current zoom level based on the map setting information and a preset slice positioning formula; and finally, based on the first row number range, parallel downloading the tile data in the specified area by utilizing a web crawler technology. The web crawler technology in the invention is multithread downloading, and only the tile data of the designated area is downloaded according to the requirement, but not all areas, so the invention can save the downloading time and avoid the waste of network resources.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a tile data downloading method according to an embodiment of the present invention;
FIG. 2 is a flow chart of Python multithread download and storage;
FIG. 3 is a block diagram of a GetCapabilities interface for content parsing;
fig. 4 is a schematic structural diagram of a tile data downloading device according to an embodiment of the present invention.
Icon:
11-an acquisition unit; 12-a calculation unit; 13-parallel download Unit.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
With the rapid development of information technologies such as the internet, big data, artificial intelligence and the like, intelligent services are widely applied. The internet, big data and artificial intelligence are general purpose technologies, not only can re-enable products, but also can enable enterprises in all directions, so that management decisions are more predictive, execution efficiency is higher, and execution cost is lower. Under various application technologies, data acquisition becomes one of the major problems in various technical researches. The map tile data is easy to superpose and combine in the space data, matching application of the map tile data and remote sensing data is facilitated, various space analyses and geographic phenomenon simulation are easy, and the map tile data is widely applied to actual production based on the advantages. When map tile data is downloaded by using the prior art, the downloading process of the tile data is relatively long and occupies certain network resources because the map level is relatively large and the data volume of the map tiles is relatively large.
Based on this, the invention aims to provide a method and a device for downloading tile data, which can realize multi-thread fast downloading of the tile data, save downloading time and avoid network resource waste, and can also provide offline data basic support for data operators subsequently, or improve the accuracy of an application algorithm (such as an image recognition algorithm) by serving the tile data and identifying or reprocessing the data, thereby realizing Artificial Intelligence (AI) recognition.
For the convenience of understanding the embodiment, a detailed description will be first given to a method for downloading tile data according to the embodiment of the present invention.
Example 1:
according to an embodiment of the present invention, there is provided an embodiment of a method for downloading tile data, it should be noted that the steps shown in the flowchart of the figure may be executed in a computer system such as a set of computer executable instructions, and that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that here.
Fig. 1 is a flowchart of a tile data downloading method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S101, obtaining map setting information of a map website on a current page; wherein the map setting information includes: the current zoom level. The current zoom level may be referred to as a map level.
Step S102, calculating a first row number range of the designated area under the current zoom level based on the map setting information and a preset slice positioning formula. The first range of row numbers may be referred to as a range of row numbers for map tiles. It is noted that the row and column numbers of all map tiles in the designated area are within the first range of row numbers.
And step S103, based on the first row number range, utilizing a web crawler technology to download tile data in the specified area in parallel. The web crawler technology comprises the following steps: python crawler technology, tile data or map tile data. At present, in the prior art, a large amount of time is wasted in the industry, and the data is collected by manpower to the field, and then is integrated into a map, and the map is graded and respectively sliced through a GIS (Geographic Information System) tool. The embodiment of the invention downloads the local area (namely the designated area) in a small range by the Python crawler technology based on the existing result of the map website.
As can be seen from the analysis of steps S101 to S103, the web crawler technology in the embodiment of the present invention is multi-threaded downloading, and only the tile data in the designated area is downloaded according to the requirement, instead of all areas, so that the embodiment of the present invention can save the downloading time and avoid the waste of network resources.
In an optional embodiment, the map setting information further includes: the map resolution and the coordinate range of the designated area at the current zoom level; wherein the map resolution at the current zoom level is calculated based on the current zoom level and a resolution equation that is:
resolution=resolution_0/Math.pow(2,level)
wherein, resolution is the map resolution at the current zoom level, resolution _0 is the map resolution at the level 0, math.pow is an exponential function, and level is the current zoom level.
The slice positioning formula comprises a tile initial row and column number formula and a tile termination row and column number formula; the step S102 of calculating the first range of the row number of the designated area at the current zoom level based on the map setting information and the preset slice positioning formula includes the following steps S201 to S203:
step S201, based on the map resolution and the coordinate range of the designated area under the current zoom level, calculating the initial row and column number of the tile under the current zoom level by using a tile initial row and column number formula; wherein, the initial row and column numbers of the tiles are calculated as:
startRow=(int)Math.floor(Math.abs(endY-srcY))/(resolution*tileSize)
startCol=(int)Math.floor(Math.abs(startX-srcX))/(resolution*tileSize)
the start row number and the column number of the tile at the current zoom level are formed by startRow and startCol, Math.floor is a function for rounding down, Math.abs is a function for solving an absolute value, endY is the maximum Y coordinate of slice data in a specified area, startX is the minimum X coordinate of the slice data in the specified area, srCx and srCy form the origin coordinate of the tile at the current zoom level, and tileSize is the size of the tile.
Step S202, based on the map resolution ratio at the current zoom level and the coordinate range of the designated area, calculating the ending row and column number of the tile at the current zoom level by using a tile ending row and column number formula; wherein the tile end row and column number is calculated as:
endRow=(int)Math.floor(Math.abs(startY-srcY))/(resolution*tileSize)
endCol=(int)Math.floor(Math.abs(endX-srcX))/(resolution*tileSize)
and the endRow and the endCol form an ending row and column number of the tile at the current zoom level, startY is the minimum Y coordinate of the slice data in the specified area, and endX is the maximum X coordinate of the slice data in the specified area.
In step S203, a first row and column number range of the designated area at the current zoom level is determined based on the initial row and column number and the end row and column number.
The purpose of the above steps S201 to S203 is to realize calculation of raster data, and since tile technology is used for map services on the current line and the sliced map tiles are raster images but do not have positioning information, the embodiment of the present invention can calculate the range of row and column numbers of the designated area at the current zoom level by using a slice positioning formula. After calculating the range of the row and column numbers of the specified area under the current zoom level, the embodiment of the invention downloads the tile data in the specified area in parallel by the python multithreading technology, and the specific analysis is as follows:
in an alternative embodiment, in step S103, based on the first row number range, the tile data in the designated area is downloaded in parallel by using web crawler technology, including the following steps S301 to S302, where: step S301, calculating second row and column number ranges of all tiles in the specified area in an area grading mode based on the first row and column number range; wherein different tiles correspond to different levels and ranges; and S302, based on all the second row and column number ranges, downloading the tile data of all the tiles in parallel by using a web crawler technology.
As can be seen from the descriptions of step S301 to step S302, the embodiment of the present invention utilizes the Python multithreading technology, fully utilizes the multi-core CPU and the service resources, and simulates the machine reading operation. And calculating the row and column number range of each tile according to a region grading mode or a specified coordinate range mode, and then downloading the map tile data of a plurality of map tile service sites concurrently. The above region classification can be understood as: a city, a district and a street all correspond to different map levels. When the selected area is larger, the level is higher, the data is in geometric level increment, for example, the data amount of all level tile data of one county and county area can reach hundreds G, in this case, the embodiment of the present invention does not directly download the selected area, but performs parallel download of tile data for a certain area.
The embodiment of the invention embeds the python multithreading technology into a plurality of machines in a program form, thereby realizing intelligent control and machine operation simulation. Each machine can be considered a crawler robot (robot for short). As shown in FIG. 2, tile data for respective corresponding ranges and levels is downloaded from a plurality of map tile sites by a crawler performed by a robot (e.g., robot A, B, C). Map tile site A, B, C in FIG. 2 refers to a data source capable of providing tiles, so embodiments of the present invention support data downloads for multiple data source tile websites.
In an optional embodiment, the method further comprises step S104: processing and cutting an original picture corresponding to the tile data into a target picture through a picture processing technology, and storing the target picture to a file server; or binary conversion is carried out on the tile data, and the tile data is stored to the database in a binary format.
As can be seen from the description in step S104, in the embodiment of the present invention, after the map tile data is successfully downloaded, the image may be processed and cropped for the second time by using an image processing technique, or the map tile data may be directly converted into a binary format, so that the embodiment of the present invention can support multiple storage modes of the tile data (i.e., database storage and file server storage).
In an optional embodiment, the method further comprises steps S105 to S106, wherein: step S105, redefining WMTS map service standard; and step S106, based on WMTS map service standard, the tile data is issued to a Web container or a GIS server. Optionally, in step S105, the WMTS map service standard is redefined, including: defining a GetCapabilities interface to allow a user to access service meta information; defining a GetTile interface to allow a user to acquire tile data; defining the GetFeatureInfo interface allows a user to access the element information. The service meta information includes at least one of: map name, map range, cached picture format, scale set, and URL address template for obtaining picture. And providing an online tile map service through the Web container or the GIS server. The current version of WMTS is 1.0.0, and the WMTS standard in the embodiment of the present invention defines a GetCapabilities interface, a GetTile interface, and a GetFeatureInfo interface, and allows a user to access three types of resources, which are defined as shown in table 1:
TABLE 1 definition of the respective interfaces
Operation of Whether it is necessary to select Description of the invention
GetCapabilities Is that Obtaining service meta information
GetTile Is that Obtaining tiles
GetFeatureInfo Whether or not Acquiring clicked element information
The GetCapabilities interface can acquire map tile service layer information (i.e., the service meta information), and is used for describing the information of the tile map information and a standard interface, the GetCapabilities interface is used for performing content analysis, the analysis process is as shown in fig. 3, and the capability document includes: the method comprises three parts of service information, metadata operation and theme content, wherein the service information comprises a service type and a service version number, the metadata operation comprises the steps of obtaining service metadata information, obtaining tiles and obtaining element information, the theme content is divided into a map layer and tile matrix set information, the map layer comprises a map unique identifier, a minimum matrix and a used scale set, the tile matrix set information comprises the unique identifier, support coordinate system information and tile matrix information, and the tile matrix information comprises a scale, an upper left corner coordinate and a picture width and a picture height.
According to the embodiment of the invention, after binary dump of tile data, the service capability document is compiled according to the WMTS standard specification, so that a WMTS standard interface is realized. After the WMTS standardization is realized, the tile data can be published to a Gis server or a Web server so as to realize local/online service. The data operator can access the tile data online/offline to perform identification operations on house buildings, municipal facilities and the like.
That is, in the current remote sensing image recognition application, it is required to perform recognition training on house buildings, municipal facilities, and the like based on basic image data and sufficient amount of sample data. The embodiment of the invention can enable a plurality of persons to process data in parallel, namely, each person selects the respective operation area to be downloaded, and downloads the tile data in the operation area in a multithreading way. And after the tile data is downloaded, the localized service can be realized by using a GIS tool. Based on localized service, a data operator can identify house buildings, municipal facilities and the like on the tile data so as to supplement a data sample library for training an image recognition algorithm. With the increase of sample data in the sample library, the accuracy of the image recognition algorithm is increasingly accurate, and finally the algorithm is applied to remote sensing image recognition scenes of various industries.
In summary, the embodiment of the present invention mainly attaches to the existing map website result data, does not need to spend labor cost, i.e. does not need to collect from the head, can download the tile data of the corresponding area and level as required, and can reprocess and release the downloaded data for use.
Example 2:
an embodiment of the present invention provides a device for downloading tile data, where the device for downloading tile data is mainly used to execute the method for downloading tile data provided in embodiment 1, and the device for downloading tile data provided in the embodiment of the present invention is described in detail below.
Fig. 4 is a schematic structural diagram of a tile data downloading device according to an embodiment of the present invention. As shown in fig. 4, the tile data downloading apparatus mainly includes: an acquisition unit 11, a calculation unit 12 and a parallel download unit 13, wherein:
the acquiring unit 11 is used for acquiring map setting information of a map website on a current page; wherein the map setting information includes: a current zoom level;
a calculation unit 12, configured to calculate a first column number range of the designated area at the current zoom level based on the map setting information and a preset slice positioning equation;
and the parallel downloading unit 13 is configured to perform parallel downloading on the tile data in the specified area by using a web crawler technology based on the first row number range.
By analyzing the functions of the units, the web crawler technology in the embodiment of the invention is multithread downloading, and only the tile data in the designated area is downloaded according to the requirement, but not all areas, so that the embodiment of the invention can save the downloading time and avoid the waste of network resources.
Optionally, the parallel downloading unit 13 includes a first computing module and a parallel downloading module, wherein:
the first calculation module is used for calculating second line and column number ranges of all tiles in the specified area in an area grading mode based on the first line and column number range; wherein different tiles correspond to different levels and ranges;
and the parallel downloading module is used for downloading the tile data of all the tiles in parallel by utilizing a web crawler technology based on all the second row and column number ranges.
Optionally, the map setting information further includes: the map resolution and the coordinate range of the designated area at the current zoom level; the slice positioning formula comprises a tile initial row and column number formula and a tile termination row and column number formula; the calculation unit 12 comprises a second calculation module, a third calculation module and a determination module, wherein:
the second calculation module is used for calculating the initial row and column numbers of the tiles at the current zoom level by using the tile initial row and column number calculation formula based on the map resolution at the current zoom level and the coordinate range of the specified area;
a third calculation module, configured to calculate, based on the map resolution at the current zoom level and the coordinate range of the designated area, an end row/column number of the tile at the current zoom level using a tile initial row/column number formula;
and the determining module is used for determining the first row and column number range of the specified area under the current zoom level based on the initial row and column number and the terminal row and column number.
Optionally, the apparatus further comprises:
the storage unit is used for processing and cutting the original picture corresponding to the tile data into a target picture through a picture processing technology and storing the target picture to a file server; or binary conversion is carried out on the tile data, and the tile data is stored to the database in a binary format.
Optionally, the apparatus further comprises a defining unit and a publishing unit, wherein:
the definition unit is used for redefining the WMTS map service standard;
and the release unit is used for releasing the tile data to the Web container or the GIS server based on the WMTS map service standard.
Optionally, the definition unit includes a first definition module, a second definition module, and a third definition module, wherein:
the first definition module is used for defining a GetCapabilities interface to allow a user to access service meta-information;
the second definition module is used for defining a GetTile interface to allow a user to acquire tile data;
and the third definition module is used for defining a GetFeatureInfo interface to allow a user to access the element information.
Optionally, the service meta information includes at least one of: map name, map range, cached picture format, scale set, and URL address template for obtaining picture.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In an optional embodiment, the present embodiment further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program operable on the processor, and the processor executes the computer program to implement the steps of the method of the foregoing method embodiment.
In an alternative embodiment, the present embodiment also provides a computer readable medium having non-volatile program code executable by a processor, wherein the program code causes the processor to perform the method of the above method embodiment.
It should be noted that the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the embodiments provided in the present embodiment, it should be understood that the disclosed method and apparatus may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present embodiment or parts of the technical solution may be essentially implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein.

Claims (10)

1. A method for downloading tile data, comprising:
obtaining map setting information of a map website on a current page; wherein the map setting information includes: a current zoom level;
calculating a first row number range of the designated area under the current zoom level based on the map setting information and a preset slice positioning formula;
and based on the first row number range, carrying out parallel downloading on the tile data in the specified area by utilizing a web crawler technology.
2. The method according to claim 1, wherein the parallel downloading of tile data of the specified area by using web crawler technology based on the first range of row numbers comprises:
calculating a second row and column number range of all tiles in the specified area in an area grading mode based on the first row and column number range; wherein different tiles correspond to different levels and ranges;
and based on all the second row and column number ranges, downloading the tile data of all the tiles in parallel by utilizing the web crawler technology.
3. The method of claim 1, wherein the map setting information further comprises: the map resolution and the coordinate range of the designated area at the current zoom level; the slice positioning formula comprises a tile initial row and column number formula and a tile termination row and column number formula;
the calculating a first row number range of the designated area at the current zoom level based on the map setting information and a preset slice positioning equation includes:
calculating the initial row and column number of the tile at the current zoom level by using the initial row and column number formula of the tile based on the map resolution at the current zoom level and the coordinate range of the specified area;
calculating the ending row and column number of the tile at the current zoom level by using the tile ending row and column number formula based on the map resolution at the current zoom level and the coordinate range of the specified area;
determining a first range of row and column numbers for a specified region at the current zoom level based on the initial row and column number and the terminal row and column number.
4. The method of claim 1, further comprising:
processing and cutting an original picture corresponding to the tile data into a target picture through a picture processing technology, and storing the target picture to a file server; or performing binary conversion on the tile data, and storing the tile data to a database in a binary format.
5. The method of claim 1, further comprising:
redefining a WMTS map service standard;
and publishing the tile data to a Web container or a GIS server based on the WMTS map service standard.
6. The method of claim 5, wherein redefining the WMTS map service criteria comprises:
defining a GetCapabilities interface to allow a user to access service meta information;
defining a GetTile interface to allow a user to acquire tile data;
defining the GetFeatureInfo interface allows a user to access the element information.
7. The method of claim 6, wherein the service meta information comprises at least one of: map name, map range, cached picture format, scale set, and URL address template for obtaining picture.
8. A tile data downloading apparatus, comprising:
the map setting unit is used for setting the map setting information of the map website on the current page; wherein the map setting information includes: a current zoom level;
the calculation unit is used for calculating a first row number range of the designated area under the current zoom level based on the map setting information and a preset slice positioning formula;
and the parallel downloading unit is used for carrying out parallel downloading on the tile data of the specified area by utilizing a web crawler technology based on the first row number range.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable medium having non-volatile program code executable by a processor, the program code causing the processor to perform the method of any of claims 1 to 7.
CN202210131612.9A 2022-02-14 2022-02-14 Tile data downloading method and device Pending CN114490912A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210131612.9A CN114490912A (en) 2022-02-14 2022-02-14 Tile data downloading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210131612.9A CN114490912A (en) 2022-02-14 2022-02-14 Tile data downloading method and device

Publications (1)

Publication Number Publication Date
CN114490912A true CN114490912A (en) 2022-05-13

Family

ID=81481269

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210131612.9A Pending CN114490912A (en) 2022-02-14 2022-02-14 Tile data downloading method and device

Country Status (1)

Country Link
CN (1) CN114490912A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117271691A (en) * 2023-10-07 2023-12-22 扬州万方科技股份有限公司 Construction method, system and computer readable medium for tile map service based on domestic platform

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117271691A (en) * 2023-10-07 2023-12-22 扬州万方科技股份有限公司 Construction method, system and computer readable medium for tile map service based on domestic platform

Similar Documents

Publication Publication Date Title
CN106339510B (en) Click estimation method and device based on artificial intelligence
CN113095995B (en) Webpage watermark adding method and device, electronic equipment and storage medium
CN111309618B (en) Page element positioning method, page testing method and related devices
CN109086814B (en) Data processing method and device and network equipment
CN110910343A (en) Method and device for detecting pavement cracks and computer equipment
CN110781537B (en) Building modeling method, device, computer equipment and readable storage medium
CN108536467B (en) Code positioning processing method and device, terminal equipment and storage medium
Read et al. geoknife: reproducible web‐processing of large gridded datasets
CN111506942A (en) Model data processing method, device, equipment and computer storage medium
CN114049631A (en) Data labeling method and device, computer equipment and storage medium
CN114490912A (en) Tile data downloading method and device
US20240143899A1 (en) Systems and methods for conversion of documents to reusable content types
CN111741329B (en) Video processing method, device, equipment and storage medium
CN112486337A (en) Handwriting graph analysis method and device and electronic equipment
CN112487876A (en) Intelligent pen character recognition method and device and electronic equipment
CN110162301B (en) Form rendering method, form rendering device and storage medium
CN115984679A (en) Remote sensing application-based algorithm flow technology inspection processing system and method
Zhao et al. A crowdsourcing-based platform for labelling remote sensing images
CN112651942B (en) Layout detection method and device
CN116956838A (en) Project determining method and device for engineering quantity list
CN110309335B (en) Picture matching method, device and equipment and storage medium
CN112819885A (en) Animal identification method, device and equipment based on deep learning and storage medium
CN113535737B (en) Feature generation method and device, electronic equipment and computer storage medium
Corrales et al. Creating a Python Toolbox for Script Customization in ArcGIS Pro
Pathan et al. Design and implementation of land area calculation for maps using mask region based convolutional neural networks deep neural network

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