Summary of the invention
It is directed to the above problem, the present invention provides a kind of tile map update method and system, reduces energy consumption, mentions
Map rejuvenation efficiency is risen.
To achieve the goals above, the present invention provides the following technical scheme that
A kind of tile map update method, comprising:
It is sliced file according to preset benchmark, by target remote sensing image file generated tile file;
Calculate the spatial dimension tile map corresponding with benchmark slice file of the tile map of the tile file
Spatial dimension intersection, obtain spatial dimension to be updated;
Based on the spatial dimension, the tile to be updated corresponding tile information in benchmark slice file is obtained;
According to the tile information, tile map is updated, obtains updated tile map.
Optionally, this method further include:
It creates benchmark and is sliced file.
Optionally, the creation benchmark is sliced file, comprising:
Create the tile map service based on slice file of target area;
It determines the essential information of the tile map service, and is based on the essential information and the tile map service,
Determine the benchmark slice file;
Wherein, the essential information includes spatial dimension, storage location, georeferencing set type, tile file type.
Optionally, described to be sliced file according to preset benchmark, by target remote sensing image file generated tile file, packet
It includes:
The preset benchmark slice file is parsed, the tile format of the benchmark slice file is obtained;
Target remote sensing image file initial tile file corresponding with the tile format is generated, the tile format is
PNG format;
The initial tile file is pre-processed, obtains tile file, the pretreatment characterization is to described initial watt
Alpha channel information mark is arranged in piece file, wherein when some pixel in tile has value of the content then by the channel alpha
It is set as 1, otherwise is set as 0.
Optionally, described that tile map is updated according to the tile information, updated tile map is obtained,
Include:
According to the tile information, the tile sequence number information successively extracted in the spatial dimension is determined;
It is arrived according to the tile sequence number information in the corresponding benchmark tile map service-seeking of benchmark slice file
Corresponding target tile is updated, and obtains updated tile map.
Optionally, described to be sliced the corresponding benchmark tile map of file in the benchmark according to the tile sequence number information
Service-seeking is updated to corresponding target tile, comprising:
By the new tile benchmark tile map corresponding with benchmark slice file with the tile sequence number information
Service-seeking is overlapped operation to corresponding target tile, realizes the update to target tile, wherein the superposition
Operation, which is characterized, carries out assignment processing to the pixel of the target tile according to the value in the channel alpha of the new tile.
A kind of tile map more new system, comprising:
Generation unit, for being sliced file according to preset benchmark, by target remote sensing image file generated tile file;
Computing unit, spatial dimension and the benchmark for calculating the tile map of the tile file are sliced file pair
The intersection of the spatial dimension for the tile map answered obtains spatial dimension to be updated;
It is right in benchmark slice file to obtain tile to be updated for being based on the spatial dimension for acquiring unit
The tile information answered;
Updating unit, for being updated to tile map, with obtaining updated tile according to the tile information
Figure.
Optionally, the system further include:
Creating unit, for creating benchmark slice file;
The creating unit includes:
Subelement is created, for creating the tile map service based on slice file of target area;
Information determines subelement, for determining the essential information of the tile map service, and is based on the essential information
With the tile map service, the benchmark slice file is determined;
Wherein, the essential information includes spatial dimension, storage location, georeferencing set type, tile file type.
Optionally, the generation unit includes:
Parsing subunit obtains the benchmark slice file for parsing to the preset benchmark slice file
Tile format;
It is initially generated subelement, for generating target remote sensing image file initial tile text corresponding with the tile format
Part, the tile format are PNG format;
Subelement is pre-processed, for pre-processing to the initial tile file, obtains tile file, the pretreatment
Alpha channel information mark is arranged to the initial tile file in characterization, wherein when some pixel in tile has content then
1 is set by the value in the channel alpha, otherwise is set as 0.
Optionally, the updating unit includes:
Serial number determines subelement, for determining watt successively extracted in the spatial dimension according to the tile information
Piece sequence number information;
Subelement is updated, for being sliced the corresponding benchmark tile of file in the benchmark according to the tile sequence number information
Map Services inquire corresponding target tile and are updated, and obtain updated tile map;
The update subelement is specifically used for:
By the new tile benchmark tile map corresponding with benchmark slice file with the tile sequence number information
Service-seeking is overlapped operation to corresponding target tile, realizes the update to target tile, wherein the superposition
Operation, which is characterized, carries out assignment processing to the pixel of the target tile according to the value in the channel alpha of the new tile.
Compared to the prior art, the present invention provides a kind of tile map update method and systems, according to preset benchmark
It is sliced file, by target remote sensing image file generated tile file;Calculate the spatial dimension and base of the tile map of tile file
The intersection of the spatial dimension of the corresponding tile map of quasi- file, obtains spatial dimension to be updated;Based on spatial dimension, obtain to
The tile of update corresponding tile information in benchmark slice file;According to tile information, tile map is updated, is obtained
Updated tile map.The remote sensing image file that will newly issue is realized in the present invention to be compared with benchmark slice file,
It is then based on the update that contrast district carries out tile map, can solve the consumption for generating a large amount of tile file in the prior art
The problem of excess resource, so that improving tile map updates efficiency.
Term " first " and " second " in description and claims of this specification and above-mentioned attached drawing etc. are for area
Not different objects, rather than for describing specific sequence.Furthermore term " includes " and " having " and their any deformations,
Be intended to cover not exclusively include.Such as it contains the process, method of a series of steps or units, system, product or sets
It is standby not to be set in listed step or unit, but may include the step of not listing or unit.
A kind of tile map update method is provided in embodiments of the present invention, referring to Fig. 1, this method comprises:
S101, it is sliced file according to preset benchmark, by target remote sensing image file generated tile file.
Need to present the distribution feelings of the newest remote sensing image data in some region for tile map and tile map service
Condition.Obtain target remote sensing image file first in embodiments of the present invention, which characterizes newest distant
Feel image file, i.e., the newest remote sensing image data in the region in current time.Then, it is by target remote sensing image file distribution
(benchmark slice is referred to as to service) spatial frame of reference with benchmark slice file, the consistent tile map of tile file type takes
Business, i.e. generation tile file.
A kind of method by target remote sensing image file generated tile file, the party are additionally provided in embodiments of the present invention
Method may comprise steps of:
The preset benchmark slice file is parsed, the tile format of the benchmark slice file is obtained;
Target remote sensing image file initial tile file corresponding with the tile format is generated, the tile format is
PNG format;
The initial tile file is pre-processed, tile file is obtained.
It should be noted that requiring tile format in embodiments of the present invention need to be PNG (Portable Network
Graphics, portable network figure), PNG here is specific format type of the tile file after pretreatment, i.e., often
The channel the alpha storage mark information of a tile file will just correspond to the channel alpha when some pixel of tile has content
Value be set as 1, otherwise be set as 0.
It is corresponding, a kind of method of creation benchmark slice file is additionally provided in embodiments of the present invention, this method comprises:
Create the tile map service based on slice file of target area;
It determines the essential information of the tile map service, and is based on the essential information and the tile map service,
Determine the benchmark slice file;
Wherein, the essential information includes spatial dimension, storage location, georeferencing set type, tile file type.
Specifically, the essence of creation benchmark slice file is the tile map clothes based on slice file for creating certain region
Business, wherein slice file is a group of file according to WMTS agreement Ordering.Then specify slice service spatial dimension,
Storage location, georeferencing set type, tile file type PNG etc..
The spatial dimension tile corresponding with benchmark slice file of S102, the tile map for calculating the tile file
The intersection of the spatial dimension of map obtains spatial dimension to be updated.
S103, it is based on the spatial dimension, obtains the tile to be updated corresponding tile in benchmark slice file
Information;
S104, according to the tile information, tile map is updated, updated tile map is obtained.
A kind of update method is additionally provided in embodiments of the present invention, comprising:
According to the tile information, the tile sequence number information successively extracted in the spatial dimension is determined;
It is arrived according to the tile sequence number information in the corresponding benchmark tile map service-seeking of benchmark slice file
Corresponding target tile is updated, and obtains updated tile map.
Wherein, described to be taken according to the tile sequence number information in the corresponding benchmark tile map of benchmark slice file
Business inquires corresponding target tile and is updated, comprising:
By the new tile benchmark tile map corresponding with benchmark slice file with the tile sequence number information
Service-seeking is overlapped operation to corresponding target tile, realizes the update to target tile, wherein the superposition
Operation, which is characterized, carries out assignment processing to the pixel of the target tile according to the value in the channel alpha of the new tile.
Specifically, calculating tile sequence number information (mainly according to spatial dimension and space coordinate set type, level
Refer to initial row row number), the corresponding tile updated is obtained one by one, and corresponding tile in the service of benchmark tile map is updated.
Referring to fig. 2, the method updated for another tile map provided in an embodiment of the present invention, this method comprises:
S201, the initial i value of setting;
Wherein, i is the initial position for carrying out tile update;
S202, the information for obtaining i-th of tile file;
The information that i-th of tile is successively extracted in the spatial dimension of new tile map service, for example, the ranks of tile
Number;
S203, corresponding tile is found in benchmark service according to the ranks number of i-th of tile;
S204, tile superposition is carried out according to the value in the channel new tile alpha;
Tile update is carried out by the superposition between tile, i.e., new tile does superposition to benchmark tile.Superposition
The process of operation are as follows: obtain the value in the channel new tile each pixel alpha first, if value is 1, corresponding pixel points are owned
Channel value is assigned to benchmark tile corresponding pixel points, otherwise keeps making all channel values of benchmark tile corresponding pixel points constant.
Whether S205, the tile for judging in the service of new tile map obtain and finish, end operation after acquisition, indicate watt
Piece map area updates operation and completes;Otherwise S202 is jumped to continue successively to obtain tile progress " superposition " update.
The superposition of tile is provided in the embodiment of the present invention, so that benchmark tile is covered or replaced by new tile, significantly
Save memory space resource;The accumulation for reducing image file in tile map the same area, when reducing map tile generation
The CPU and I/O resource of required consumption.
A kind of tile map more new system is additionally provided in another embodiment of the invention, referring to Fig. 3, the system packet
It includes:
Generation unit 10, for being sliced file according to preset benchmark, by target remote sensing image file generated tile file;
Computing unit 20, spatial dimension and the benchmark for calculating the tile map of the tile file are sliced file
The intersection of the spatial dimension of corresponding tile map obtains spatial dimension to be updated;
Acquiring unit 30 obtains tile to be updated in benchmark slice file for being based on the spatial dimension
Corresponding tile information;
Updating unit 40, for being updated to tile map, with obtaining updated tile according to the tile information
Figure.
On the basis of the above embodiments, the system further include:
Creating unit, for creating benchmark slice file;
The creating unit includes:
Subelement is created, for creating the tile map service based on slice file of target area;
Information determines subelement, for determining the essential information of the tile map service, and is based on the essential information
With the tile map service, the benchmark slice file is determined;
Wherein, the essential information includes spatial dimension, storage location, georeferencing set type, tile file type.
On the basis of the above embodiments, the generation unit includes:
Parsing subunit obtains the benchmark slice file for parsing to the preset benchmark slice file
Tile format;
It is initially generated subelement, for generating target remote sensing image file initial tile text corresponding with the tile format
Part, the tile format are PNG format;
Subelement is pre-processed, for pre-processing to the initial tile file, obtains tile file, the pretreatment
Alpha channel information mark is arranged to the initial tile file in characterization, wherein when some pixel in tile has content then
1 is set by the value in the channel alpha, otherwise is set as 0.
On the basis of the above embodiments, the updating unit includes:
Serial number determines subelement, for determining watt successively extracted in the spatial dimension according to the tile information
Piece sequence number information;
Subelement is updated, for being sliced the corresponding benchmark tile of file in the benchmark according to the tile sequence number information
Map Services inquire corresponding target tile and are updated, and obtain updated tile map;
The update subelement is specifically used for:
By the new tile benchmark tile map corresponding with benchmark slice file with the tile sequence number information
Service-seeking is overlapped operation to corresponding target tile, realizes the update to target tile, wherein the superposition
Operation, which is characterized, carries out assignment processing to the pixel of the target tile according to the value in the channel alpha of the new tile.
The present invention provides a kind of tile map more new systems, and generation unit is sliced file according to preset benchmark, by mesh
Mark remote sensing image file generated tile file;Computing unit calculates the spatial dimension and reference file of the tile map of tile file
The intersection of the spatial dimension of corresponding tile map obtains spatial dimension to be updated;Acquiring unit is based on spatial dimension, obtains
The tile to be updated corresponding tile information in benchmark slice file;Updating unit according to tile information, to tile map into
Row updates, and obtains updated tile map.The remote sensing image file that will newly issue and benchmark slice text are realized in the present invention
Part is compared, and is then based on the update that contrast district carries out tile map, can solve and generate a large amount of watt in the prior art
The problem of consumption excess resource of piece file, so that improving tile map updates efficiency.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other
The difference of embodiment, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment
For, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is said referring to method part
It is bright.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention.
Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention
It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one
The widest scope of cause.