WO2018223990A1 - Map tile updating method and device and computer readable storage medium - Google Patents
Map tile updating method and device and computer readable storage medium Download PDFInfo
- Publication number
- WO2018223990A1 WO2018223990A1 PCT/CN2018/090134 CN2018090134W WO2018223990A1 WO 2018223990 A1 WO2018223990 A1 WO 2018223990A1 CN 2018090134 W CN2018090134 W CN 2018090134W WO 2018223990 A1 WO2018223990 A1 WO 2018223990A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- tile
- geographic entity
- map
- target
- metadata
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
Definitions
- the present application relates to the field of maps, and in particular, to a method and device for updating a map tile and a computer readable storage medium.
- the current electronic map is mainly formed by superimposing map tiles of various types of geographical entities such as cinemas, restaurants, supermarkets, etc., and the map tiles are processed by the server through WMTS (Web Map Tile Service) technology.
- WMTS Web Map Tile Service
- the spatial vector data processing of the entity is obtained, so the map tile can visually represent the spatial location of the geographic entity. Since the spatial location of geographic entities may change in real life, such as adding a movie theater to a street, the server needs to periodically update the map tiles to ensure the spatial location of the geographic entities in the map tiles and the real-life geographic entities.
- the spatial location is as consistent as possible.
- the server classifies a plurality of geographic entities in advance to obtain at least one type of geographic entity, such as determining all movie theaters as a type of geographic entity, and determining all KFCs as a type of geographic entity.
- the server analyzes, extracts, and renders the spatial vector data of each geographic entity in the geographic entity according to each of the preset proportion levels.
- a plurality of map tiles of a class geographic entity at each preset scale level are Among them, the map tiles under the same preset scale level have the same resolution.
- a plurality of map tiles under the same preset scale level form a tile matrix to obtain a plurality of tile matrices, and the plurality of tile matrices constitute a tile matrix set of the geographic entity.
- the server After determining the set of tile matrices of the type of the geographic entity, the server re-determines the space vector data of all the geographic entities in the geographic entity for each preset time period, and according to the spatial vector data of the re-determined geographic entity, according to the above method
- the set of tile matrices of the type of geographic entity is re-determined, that is, the map tiles in the tile matrix set of the geographic entity are updated.
- the server Since the server updates the tile matrix set every preset time period, if a current geographic entity changes, the administrator client records that the geographic entity has changed, but the server still arrives in the next preset time period.
- the map tile in the tile matrix set can be updated, that is, after the administrator client records the change of a geographic entity, the currently displayed map tile is still the map tile before the update.
- the server needs to re-determine the space vector data of all the geographic entities in each type of geographic entity every predetermined time period, and determine the tile matrix of each type of geographic entity according to the spatial vector data of all the determined geographical entities.
- the set causes the server to be under pressure during the process of updating the tile matrix set.
- the embodiment of the present application provides a map tile updating method and device, and a computer readable storage medium, which can solve the current map tile displayed by an administrator client after recording a geographic entity to change in the existing WMTS technology. It is still the map tile before the update, and the server has a lot of pressure in the process of updating the tile matrix set.
- the technical solution is as follows:
- a method for updating a map tile comprising:
- Each tile metadata in the tile metadata table corresponds to one map tile, and each tile metadata is used to describe information of a corresponding map tile, where the tile state includes a read state. And the read state is used to indicate that the map tile corresponding to the tile metadata has been processed, and the unread state is used to indicate that the map tile corresponding to the tile metadata is not processed;
- the map tiles in the tile matrix set are non-aggregated type map tiles
- each tile metadata includes an identifier of a corresponding map tile, a scale level to which the corresponding map tile belongs, and a corresponding The spatial vector data of each geographic entity included in the map tile, the identity of each geographic entity, and the tile status.
- the geographic entity change request includes a geographic entity addition request, a geographic entity deletion request, or a geographic entity update request;
- Updating the plurality of target tile metadata corresponding to the plurality of target map tiles in the tile metadata table including:
- the geographic entity change request adds a request to the geographic entity, adding an identifier of the target geographic entity and space vector data of the target geographic entity in each target tile metadata;
- the geographic entity change request is a geographic entity deletion request, deleting the identifier of the target geographic entity and the space vector data of the target geographic entity in each target tile metadata;
- the geographic entity change request is a geographic entity update request
- a target tile of each target map tile corresponding to the first geographic entity Deleting the identifier of the first geographic entity and the space vector data of the first geographic entity in the piece of metadata, and adding the target tile metadata of each target map tile corresponding to the second geographic entity
- the identifier of the second geographic entity and the space vector data of the second geographic entity, the first geographic entity is a pre-change geographic entity, and the second geographic entity is a changed geographic entity.
- the map tiles in the tile matrix set are aggregation type map tiles
- each tile metadata includes an identifier of a corresponding map tile, a scale level to which the corresponding map tile belongs, and a corresponding map.
- the space vector data, the number of aggregates, and the tile state of the aggregated geographic entity in the tile, the aggregated number is used to indicate the number of geographic entities included in the corresponding map tile, and the aggregated geographic entity is the tile Any geographic entity included in the map tile corresponding to the metadata.
- the geographic entity change request includes a geographic entity addition request, a geographic entity deletion request, or a geographic entity update request;
- Updating the plurality of target tile metadata corresponding to the plurality of target map tiles in the tile metadata table including:
- the geographic entity change request is a geographic entity deletion request, reducing the aggregated amount included in each target tile metadata
- the geographic entity change request is a geographic entity update request, reducing a target tile of each target map tile corresponding to the first geographic entity based on the first geographic entity and the second geographic entity included in the target geographic entity And the number of aggregates included in the target tile metadata of each target map tile corresponding to the second geographic entity, where the first geographic entity is a geographic entity before the change,
- the second geographic entity is a changed geographic entity.
- the method before updating the multiple target tile metadata in the tile metadata table according to the multiple target map tiles, the method further includes:
- the processing, by the target map tile corresponding to the current map resolution of the multiple target map tiles includes:
- the selected target map tile is updated according to the acquired target tile metadata.
- the method further includes:
- tile metadata table Obtaining, from the tile metadata table, tile metadata whose tile state is an unread state, to obtain a plurality of tile metadata
- the map tile in the tile matrix set is an aggregate type map tile
- mapping according to the location of the aggregated geographic entity in the blank map tile, an icon and an annotation of the aggregated geographic entity in the blank map tile to obtain a map tile corresponding to the tile metadata,
- the icon is used to indicate a type of the aggregated geographic entity
- the label is used to indicate a number of geographic entities included in a map tile corresponding to the tile metadata.
- the icon and the label of the aggregated geographic entity in the blank map tile are drawn according to the location of the aggregated geographic entity in the blank map tile to obtain the tile metadata.
- Corresponding map tiles including:
- the tile matrix set is a tile matrix set corresponding to a type of geographic entity to which the target geographic entity belongs.
- a map tile update device comprising:
- a receiving module configured to receive a geographic entity change request sent by an administrator client, where the geographic entity change request carries spatial vector data of the target geographic entity and a current map resolution;
- a determining module configured to determine, according to the space vector data of the target geographic entity, a plurality of target map tiles to be processed related to the target geographic entity from the tile matrix set;
- a first update module configured to update, by using a plurality of target tile metadata corresponding to the multiple target map tiles in a tile metadata table, and to perform tile states of the multiple target tile metadata Update to the unread state;
- Each tile metadata in the tile metadata table corresponds to one map tile, and each tile metadata is used to describe information of a corresponding map tile, where the tile state includes a read state. And the read state is used to indicate that the map tile corresponding to the tile metadata has been processed, and the unread state is used to indicate that the map tile corresponding to the tile metadata is not processed;
- a sending module configured to process the target map tile corresponding to the current map resolution of the plurality of target map tiles, and send the processed target map tile to the administrator client in real time.
- the map tiles in the tile matrix set are non-aggregated type map tiles
- each tile metadata includes an identifier of a corresponding map tile, a scale level to which the corresponding map tile belongs, and a corresponding The spatial vector data of each geographic entity included in the map tile, the identity of each geographic entity, and the tile status.
- the geographic entity change request includes a geographic entity addition request, a geographic entity deletion request, or a geographic entity update request;
- the first update module is specifically configured to:
- the geographic entity change request adds a request to the geographic entity, adding an identifier of the target geographic entity and space vector data of the target geographic entity in each target tile metadata;
- the geographic entity change request is a geographic entity deletion request, deleting the identifier of the target geographic entity and the space vector data of the target geographic entity in each target tile metadata;
- the geographic entity change request is a geographic entity update request
- a target tile of each target map tile corresponding to the first geographic entity Deleting the identifier of the first geographic entity and the space vector data of the first geographic entity in the piece of metadata, and adding the target tile metadata of each target map tile corresponding to the second geographic entity
- the identifier of the second geographic entity and the space vector data of the second geographic entity, the first geographic entity is a pre-change geographic entity, and the second geographic entity is a changed geographic entity.
- the map tiles in the tile matrix set are aggregation type map tiles
- each tile metadata includes an identifier of a corresponding map tile, a scale level to which the corresponding map tile belongs, and a corresponding map.
- the space vector data, the number of aggregates, and the tile state of the aggregated geographic entity in the tile, the aggregated number is used to indicate the number of geographic entities included in the corresponding map tile, and the aggregated geographic entity is the tile Any geographic entity included in the map tile corresponding to the metadata.
- the geographic entity change request includes a geographic entity addition request, a geographic entity deletion request, or a geographic entity update request;
- the first update module is specifically configured to:
- the geographic entity change request is a geographic entity deletion request, reducing the aggregated amount included in each target tile metadata
- the geographic entity change request is a geographic entity update request, reducing a target tile of each target map tile corresponding to the first geographic entity based on the first geographic entity and the second geographic entity included in the target geographic entity And the number of aggregates included in the target tile metadata of each target map tile corresponding to the second geographic entity, where the first geographic entity is a geographic entity before the change,
- the second geographic entity is a changed geographic entity.
- the device further includes:
- a first generating module configured to: when determining that there are no target map tiles to be processed related to the target geographic entity, generate a plurality of blank tile metadata, and use the multiple blank tile metadata as The plurality of target tile metadata; or
- a second generating module configured to: when determining that there are multiple target map tiles to be processed related to the target geographic entity, whether to find and exist with the multiple target map tiles from the tile metadata table Corresponding multiple target tile metadata, when there are multiple target tile metadata corresponding to the multiple target map tiles, generating multiple blank tiles corresponding to the multiple target map tiles Metadata, the plurality of blank tile metadata being used as the plurality of target tile metadata.
- the sending module is specifically configured to:
- the selected target map tile is updated according to the acquired target tile metadata.
- the device further includes:
- An obtaining module configured to obtain, from the tile metadata table, tile metadata whose tile state is an unread state, to obtain multiple tile metadata
- a second update module configured to update a map tile corresponding to each tile metadata of the multiple tile metadata
- a third update module configured to update the tile matrix set according to the updated map tile, and update a tile state of each tile metadata in the multiple tile metadata from a read state to a read state Read status.
- the map tile in the tile matrix set is an aggregate type map tile
- the second update module includes:
- a creating unit configured to create a blank map tile corresponding to the tile metadata for any one of the plurality of tile metadata
- a determining unit configured to determine, according to space vector data of the aggregated geographic entity in the tile metadata, a location of the aggregated geographic entity in the blank map tile, where the aggregated geographic entity is the tile element Any geographic entity included in the map tile corresponding to the data;
- a drawing unit configured to draw an icon and an annotation of the aggregated geographic entity in the blank map tile according to a location of the aggregated geographic entity in the blank map tile, to obtain the tile metadata corresponding a map tile, the icon is used to indicate a type of the aggregated geographic entity, and the label is used to indicate the number of geographic entities included in the map tile corresponding to the tile metadata.
- the drawing unit is specifically configured to:
- the tile matrix set is a tile matrix set corresponding to a type of geographic entity to which the target geographic entity belongs.
- a map tile update apparatus comprising a processor, a communication interface, a memory, and a communication bus;
- the processor, the communication interface, and the memory complete communication with each other through the communication bus;
- the memory is for storing a computer program
- the processor is configured to execute a program stored on the memory to implement the map tile update method provided by the first aspect.
- a computer readable storage medium storing a computer program, the computer program being executed by the processor to implement the map tile update method provided by the first aspect.
- the target tile metadata when receiving the geographic entity change request sent by the administrator client, the target tile metadata is updated, and the tile state of the target tile metadata is updated to the unread state. Since each tile metadata is used to describe information of the corresponding map tile, and the tile state of the tile data data includes the read state and the unread state, the unread state is used to indicate the tile corresponding to the tile metadata. The slice is not processed. Therefore, when the tile matrix set needs to be updated later, the tile matrix set can be updated only according to the tile metadata whose tile state is the unread state, and all the geography through re-determination is avoided.
- the spatial vector data of the entity to update the tile matrix set of each type of geographic entity can effectively alleviate the pressure in updating the tile matrix set and improve the efficiency of updating the tile matrix set.
- the target map tile corresponding to the current map resolution is returned to the administrator client in real time. For the administrator client, when the geographic entity change request is initiated, the updated map can be displayed in real time, and the map is improved. Timeliness.
- FIG. 1 is a flowchart of a method for updating a map tile according to an embodiment of the present application
- FIG. 2 is a flowchart of another method for updating a map tile according to an embodiment of the present application
- FIG. 3 is a schematic diagram of icon division of an aggregated geographic entity according to an embodiment of the present application.
- FIG. 4 is a block diagram of a map tile updating apparatus according to an embodiment of the present application.
- FIG. 5 is a block diagram of another map tile updating apparatus provided by an embodiment of the present application.
- a geographic entity refers to an entity in a geographic database.
- a geographic entity can be divided into a point entity, a linear entity, and a planar entity.
- point entity For example, common cinemas, restaurants, and supermarkets are point entities, rivers and roads are linear entities, and lakes and oceans are planar entities.
- a map tile is a single image generated by a server according to analysis, extraction and rendering of spatial vector data of a geographic entity.
- a map tile is used to describe a type of geographic entity within a spatial location range represented by the map tile.
- the type of the geographic entity to which the map tile belongs is a camera
- the spatial position of the map tile ranges from latitude X1 to latitude X2, longitude Y1 to longitude Y2, and the map tile is used to describe the spatial position latitude X1 to latitude. X2, all cameras distributed in the longitude Y1 to the longitude Y2.
- a tile matrix refers to a set including a plurality of map tiles, the tile matrix includes a plurality of map tiles determined by the server, a coordinate system, a cut-off origin, a preset scale level, and a single map tile size.
- multiple map tiles generated from spatial vector data of a class of geographic entities.
- one tile matrix corresponds to a preset scale level, and the preset scale level is a preset scale level in the server, and the preset scale level is related to the map resolution.
- a tile matrix set refers to a set including a plurality of tile matrices, and all map tiles included in the plurality of tile matrices include only one type of geographic entity, that is, one type of geographic entity corresponds to one tile matrix set. And the plurality of tile matrices are obtained according to different preset scale levels according to space vector data of a type of geographic entity. For example, all cameras in a spatial location correspond to a tile matrix set, and all KFCs correspond to a tile matrix set.
- An electronic map refers to a map formed by layer overlays of map tiles of multiple types of geographic entities.
- the aggregated electronic map refers to, for each map tile constituting the electronic map, only the spatial position of one of the geographic entities included in the map tile is displayed in the map tile, and the map tile includes The number of geographic entities.
- An aggregated geographic entity refers to a geographic entity used in a map tile of an aggregated electronic map to represent all of the geographic entities included in the map tile.
- a map tile includes three geographic entities.
- the three geographic entities may not be marked in the map tile, and the three geographic entities are directly represented by an aggregated geographic entity.
- the number of aggregates refers to the number of all geographic entities included in the map tile in the aggregated electronic map.
- the tile metadata refers to data for describing a geographic entity included in the map tile.
- One map tile corresponds to one tile metadata, and the server may directly generate corresponding to the tile metadata according to information included in the tile metadata. Map tiles.
- a tile state configured to indicate a state of the tile metadata, the tile state including a read state and a missed state, wherein the read state is used to indicate that the server has updated the tile matrix set according to the tile metadata, not read The status is used to indicate that the server has not updated the tile matrix set based on the tile metadata.
- the server determines spatial vector data of all geographic entities included in the geographic entity, and generates a visual representation of all geographic entities included in the geographic entity. Multiple map tiles for spatial locations.
- the server sets a plurality of preset scale levels, each preset scale level corresponds to a map resolution, and the higher the preset scale level, the lower the map resolution corresponding to the preset scale level.
- the server when the server generates a plurality of map tiles at a preset scale level, the plurality of map tiles under the preset scale level constitute a tile matrix of the preset scale level, when the When a plurality of tile levels of a preset scale level are used, the tile matrix of the plurality of preset scale levels constitutes a tile matrix set of the geographic entity.
- the pixel size of the map tile pre-stored by the server is a preset pixel size, that is, a tile matrix set for a class of geographic entities, and the map tiles in each tile matrix included in the tile matrix set.
- the electronic map of the rate is cut according to the preset pixel size to obtain a plurality of map tiles of the same size, and the plurality of map tiles of the same size constitute a tile matrix of a preset scale level 0;
- the slice matrix is equivalent to reducing the map resolution to the map resolution corresponding to the preset scale level 1 according to the preset rule by using the electronic map of the map resolution corresponding to the preset scale level 0, and according to the preset in the reduced electronic map.
- the pixel size is cut to obtain a plurality of map tiles of the same size, and the plurality of map tiles of the same size constitute a tile matrix of a preset scale level 1; and so on until the preset scale level N-1 is determined.
- Tile matrix is
- the preset rule is usually to combine every 2x2 pixels into one pixel. Since the pixel size of the map tile is fixed, and the preset scale level increases, the map resolution corresponding to the preset scale level is reduced. Small, so that the number of map tiles included in the tile matrix of the preset scale level is reduced, until the tile matrix of the preset scale level N-1 includes only one map tile of a preset pixel size.
- the tile matrix set is therefore also referred to as the pyramid tile matrix set.
- the preset pixel size is a pixel size preset by the server. Generally, the preset pixel size is 256 ⁇ 256.
- the tile matrix set of multiple types of geographic entities is stored in the server.
- the user client can directly obtain the geographic entity from the server on the current map.
- the map tile under the preset scale level corresponding to the resolution. Since the spatial location of the geographic entity may change in real life, in order to ensure that the spatial location of the geographic entity in the map tile and the spatial location of the geographic entity in real life are as consistent as possible, when the spatial location of the geographic entity changes, the server needs The tile matrix update method is updated, and the map tile update method provided by the embodiment of the present application is applied to a scenario in which the server updates the tile matrix set.
- FIG. 1 is a flowchart of a method for updating a map tile according to an embodiment of the present application.
- the map tile update method is applied to a server. As shown in FIG. 1 , the map tile update method includes the following steps.
- Step 101 Receive a geographic entity change request sent by an administrator client, where the geographic entity change request carries space vector data of the target geographic entity and a current map resolution.
- the administrator client may send a geographic entity change request to trigger the server to update related data.
- Step 102 Determine, according to the space vector data of the target geographic entity, a plurality of target map tiles to be processed related to the target geographic entity from the tile matrix set.
- the server may determine, according to the space vector data of the target geographic entity, a plurality of target tile matrices related to the target geographic entity in the target tile matrix set, so as to facilitate subsequent Correlation operations are performed based on the plurality of target tile matrices.
- Step 103 Update a plurality of target tile metadata corresponding to the plurality of target map tiles in the tile metadata table, and update the tile states of the plurality of target tile metadata to an unread state;
- Each tile metadata in the tile metadata table corresponds to one map tile, and each tile metadata is used to describe information of a corresponding map tile, and the tile state includes a read state and a missed state.
- the status, the read status is used to indicate that the map tile corresponding to the tile metadata has been processed, and the unread status is used to indicate that the map tile corresponding to the tile metadata has not been processed.
- the server is configured with a tile metadata table, and each tile metadata included in the tile metadata table is used to describe information of the corresponding map tile, so the server may
- the target map tiles update the plurality of target tile metadata corresponding to the plurality of target map tiles.
- the server is configured with a tile state for each tile metadata, wherein the read state is used to indicate that the map tile corresponding to the tile metadata has been processed, and the unread state is used to indicate that the tile metadata corresponds to The map tile is not processed.
- the map tile corresponding to the tile metadata has been processed, and after the tile metadata is updated, the server has updated the corresponding map tile according to the tile metadata.
- the uncompleted processing of the map tile corresponding to the tile metadata means that after updating the tile metadata, the server has not updated the corresponding map tile according to the tile metadata. Therefore, in the embodiment of the present application, the tile status of the tile metadata may be used to indicate whether the server has updated the corresponding map tile according to the tile metadata.
- the tile status corresponding to the multiple target tile elements needs to be updated to the unread state, so that when the subsequent service updates the tile matrix set,
- the tile metadata of the tile state is not read from the tile metadata table, and the corresponding tile is processed according to the obtained tile metadata to prevent the server from updating the tile next time.
- the matrix set time repeats updating the tile matrix set according to the tile metadata in the metadata set, thereby reducing the data processing pressure of updating the tile matrix set.
- Step 104 Process the target map tile corresponding to the current map resolution of the plurality of target map tiles, and send the processed target map tile to the administrator client in real time.
- the administrator client can also receive the processed target map tile in real time when initiating the geographic entity change request, so as to display the changed geographic entity in the current map.
- the target tile metadata when receiving the geographic entity change request sent by the administrator client, the target tile metadata is updated, and the tile state of the target tile metadata is updated to the unread state. Since each tile metadata is used to describe information of the corresponding map tile, and the tile state of the tile data data includes the read state and the unread state, the unread state is used to indicate the tile corresponding to the tile metadata. The slice is not processed. Therefore, when the tile matrix set needs to be updated later, the tile matrix set can be updated only according to the tile metadata whose tile state is the unread state, and all the geography through re-determination is avoided.
- the spatial vector data of the entity to update the tile matrix set of each type of geographic entity can effectively alleviate the pressure in updating the tile matrix set and improve the efficiency of updating the tile matrix set.
- the target map tile corresponding to the current map resolution is returned to the administrator client in real time. For the administrator client, when the geographic entity change request is initiated, the updated map can be displayed in real time, and the map is improved. Timeliness.
- FIG. 2 is a flowchart of a method for updating a map tile according to an embodiment of the present application.
- the method for updating a map tile is applied to a server.
- This embodiment further expands the embodiment shown in FIG. 1 , as shown in FIG. 2 .
- the map tile update method includes the following steps.
- Step 201 Receive a geographic entity change request sent by an administrator client, where the geographic entity change request carries space vector data of the target geographic entity and a current map resolution.
- the administrator can send a geographic entity change request to the server through the administrator client to enable the server to update the tile matrix set.
- the tile matrix set may be updated by performing steps 202 to 206.
- the geographic body change request sent by the administrator client carries space vector data of the target geographic entity, where the space vector data is used to describe a specific spatial location of the target geographic entity.
- the spatial vector data of the geographic entity may be used by the geographic entity. The longitude and latitude in the spatial position are expressed.
- the geographic entity change request may further carry the current map resolution, so that the server determines the preset scale level of the current electronic map according to the current map resolution.
- the target geographic entity is a geographic entity whose spatial location is to be changed.
- the spatial location of the geographic entity may change due to three situations: adding a geographic entity at the spatial location, deleting the geographic entity at the spatial location, or placing a The geographic entity is replaced with another geographic entity. Therefore, the geographic entity change request includes a geographic entity addition request, a geographic entity deletion request, or a geographic entity update request.
- the geographic entity addition request is used to indicate that a target geographic entity is added at the spatial location
- the geographic entity deletion request is used to indicate that the target geographic entity at the spatial location is deleted
- the geographic entity update request is used to indicate that the first geographic entity is to be Replace with the second geographic entity.
- the geographic entity change request is a geographic entity update request
- the space vector data of the target geographic entity carried in the geographic entity update request includes space vector data of the first geographic entity and spatial vector data of the second geographic entity.
- the first geographic entity is a geographical entity before the change
- the second geographic entity is a changed geographic entity.
- the server may not classify the geographic entities in the spatial scope, and only set one tile matrix set.
- the map tiles in the tile matrix set include all geographic entities in a certain spatial range.
- the server may set different tile matrix sets for different types of geographic entities, where the tile matrix set is a tile corresponding to a type of geographic entity to which the target geographic entity belongs. Slice matrix set.
- the geographic entity change request further carries an identifier of the target geographic entity, so that the server determines the target geographic entity according to the identifier of the target geographic entity.
- Step 202 Determine, from the tile matrix set, a plurality of target map tiles to be processed related to the target geographic entity according to the spatial vector data of the target geographic entity.
- each map tile in the plurality of map tiles included in the tile matrix has a corresponding space. a range of locations, so the server can directly search for a map tile of the spatial location range including the spatial vector data from the tile matrix according to the spatial vector data of the target geographic entity, and determine the found map tile as the tile.
- Corresponding target map tiles in the matrix when the server determines the target map tiles corresponding to each tile matrix in the tile matrix set, that is, multiple target map tiles are determined.
- the electronic map in the embodiment of the present application may be an aggregated electronic map, that is, for each map tile, when the geographic entity included in the map tile
- the server uses only one of the geographic entities to represent all the geographic entities included in the map tile, and one of the geographic entities is called an aggregated geographic entity, since one tile metadata corresponds to one map tile,
- the aggregated geographic entity is also any geographic entity included in the map tile corresponding to the tile metadata.
- the map tile further includes an aggregation quantity, which is used to indicate the number of geographic entities included in the map tile.
- tile metadata is first introduced in detail.
- each tile metadata includes an identifier of the corresponding map tile, and the corresponding map tile belongs to The scale level, the spatial vector data of the aggregated geographic entities in the corresponding map tile, the number of aggregates, and the tile state.
- the tile metadata includes an identifier of the tile metadata, an aggregated number, a map tile line number, a map tile column number, a longitude and latitude of the aggregated geographic entity, and a scale level.
- the identifier of the tile metadata is used to uniquely identify the tile metadata.
- the server may use the identifier of each map tile as the tile of the map tile.
- the identifier of the slice metadata; the map tile row number and the map tile column number are the row number and the column number of the map tile in the tile matrix to which it belongs, and the map tile row number and the map tile column number are the server
- the map tile is generated based on the full map geographic extent, slice orientation, slice origin, and scale level.
- the tile metadata may also include an entity type that is used to indicate the type of geographic entity in the tile metadata.
- Table 1 is a tile metadata provided by an embodiment of the present application.
- the foregoing information included in the tile metadata is represented by a field, and each field included in the tile metadata and a description of the respective field are shown in the table. 1.
- the field “identification” is an identifier of the tile metadata
- the identifier of the tile metadata is an identifier of the map tile corresponding to the tile metadata, so the field “identity” is used to indicate the tile metadata.
- the identifier of the corresponding map tile, and the field type of the field “identification” is a number; the field "type” is used to indicate the type of the geographic entity in the tile metadata, and the field type of the field "type” is 32 bits.
- the character “label” is used to indicate the label generated on the map tile corresponding to the tile metadata when the number of geographic entities included in the tile metadata is greater than 1, and the field type of the field “label” is 512.
- Bit character the field “proportion level” is used to indicate the scale level of the tile matrix to which the map tile corresponding to the tile metadata belongs, the field type of the field “proportion level” is 16 characters; the field “column number” and the field
- the “line number” is used to indicate the column number and the line number of the tile tile corresponding to the tile metadata in the tile matrix to which the tile metadata belongs, and the field types of the column “column number” and the field “row number”.
- the field “aggregate quantity” is used to indicate the number of geographic entities included in the map tile corresponding to the tile metadata, the field type of the field “aggregate quantity” is a number; the field “longitude” and the field “latitude” “Used to indicate the longitude and latitude of the aggregated geographic entity in the tile metadata, respectively, and the field types of the field “longitude” and the field “latitude” are numbers.
- each tile metadata includes an identifier of the corresponding map tile, and the corresponding map tile belongs to The scale level, the spatial vector data of each geographic entity included in the corresponding map tile, the identity of each geographic entity, and the tile status.
- the information included in the tile metadata table is substantially the same as the information included in the tile metadata in the first possible implementation manner, except that the corresponding tile is recorded in the tile metadata.
- the server when the server sets different tile matrix sets for different types of geographic entities in advance, in order to facilitate the server to manage the tile metadata of the map tiles of different types of geographic entities,
- the tile metadata of a class of geographic entities the server stores the tile metadata of a class of geographic entities in a tile metadata table, and also stores the tile metadata of the map tiles of a class of geographic entities in a tile.
- the slice metadata table In the slice metadata table.
- the server further configures a tile state for the tile metadata, the tile state includes the read state and the unread state, so that the server only needs to update the tile matrix set to the tile state as the unread state.
- the map tiles of the tile metadata are updated.
- the tile state of each tile metadata may also be represented by a character.
- the tile state is represented by only one-bit character, such as 0 and 1 indicating a tile state, where characters 0 is used to indicate that the current tile metadata has not changed, and the map tile does not need to be regenerated, that is, the character 0 represents the read state; the character 1 is used to indicate that the current tile metadata has changed, and the map tile needs to be regenerated. That is, the character 1 represents the unread state.
- the tile state may also be marked as a character-1, that is, the character-1 is used to indicate that the administrator client or the user client obtains the
- the server may replace the map tile with a transparent image and send the transparent picture to the administrator client or the user client.
- the server when the server receives the geographic entity change request, in order to update the tile matrix set, the server needs to first update the tile metadata of the map tile corresponding to the space vector data of the target geographic entity carried by the geographic entity change request.
- the update is performed, and since the identifier of the tile metadata is the identifier of the map tile corresponding to the tile metadata, the server needs to determine the space vector of the target geographic entity by using the above step 202 before updating the tile metadata.
- the map tile corresponding to the data since the identifier of the tile metadata is the identifier of the map tile corresponding to the tile metadata, the server needs to determine the space vector of the target geographic entity by using the above step 202 before updating the tile metadata.
- Step 203 Update a plurality of target tile metadata corresponding to the plurality of target map tiles in the tile metadata table, and update the tile states of the plurality of target tile metadata to an unread state.
- the server determines the plurality of target map tiles, and then, according to the identifiers of the plurality of target map tiles, selecting tile metadata identifying the identifiers of the plurality of target map tiles from the tile metadata table, A plurality of target tile metadata is obtained, and the plurality of target tile metadata is updated.
- the map tile provided by the embodiment of the present application may be a map tile of an aggregation type or a map tile of a non-aggregation type.
- the information in the tile metadata corresponding to different types of map tiles may be known from step 202. It is also different, so step 203 can be separately described in the following two scenarios:
- the first scenario the map tiles in the tile matrix set are non-aggregated type map tiles.
- the server may update the plurality of target tile metadata into the following three cases:
- the geographic entity change request adds a request to the geographic entity
- the identifier of the target geographic entity and the space vector data of the target geographic entity are added in each target tile metadata.
- each target tile metadata includes space vector data of each geographic entity included in the corresponding map tile and an identifier of each geographic entity, when the geographic entity change request adds a request for the geographic entity, the target needs to be The spatial vector data of the geographic entity is added to each target tile metadata.
- the map tile may include multiple geographic entities, and the identifier of the target geographic entity needs to be added to each target tile metadata.
- the geographic entity change request is a geographic entity deletion request
- the identifier of the target geographic entity and the space vector data of the target geographic entity are added in each target tile metadata.
- each target tile metadata includes space vector data of each geographic entity included in the corresponding map tile, when the geographic entity change request is a geographic entity deletion request, the space vector data of the target geographic entity needs to be The target tile metadata is deleted in each.
- the identity of the target geographic entity needs to be removed from each target tile metadata at this time.
- the geographic entity change request is a geographic entity update request, based on the first geographic entity and the second geographic entity included in the target geographic entity, the target tile of each target map tile corresponding to the first geographic entity Deleting the identifier of the first geographic entity and the space vector data of the first geographic entity in the metadata, and adding the identifier and the second geographic entity to the target tile metadata of each target map tile corresponding to the second geographic entity
- the spatial vector data of the geographic entity, the first geographic entity is a pre-change geographic entity, and the second geographic entity is a changed geographic entity.
- the geographic entity change request is a geographic entity update request
- the step of (1) in the foregoing first scenario is performed on the first geographic entity, and the second geographic entity is executed in the first scenario.
- the steps in (2) are not described in detail here.
- the second scenario the map tile in the tile matrix set is an aggregate type of map tile.
- the server may further update the multiple target tile metadata into the following. three situations:
- the geographic entity add request is used to indicate that the target geographic entity is added to the multiple target map tiles, and any one of the multiple target map tiles is targeted
- the slice increases the number of aggregates included in the target tile metadata corresponding to the target map tile.
- the space vector data of the target geographic entity is used as the spatial vector data of the aggregated geographic entity in the target tile metadata, that is, the longitude and latitude of the target geographic entity are used as the aggregated geographic entity in the target tile metadata. Longitude and latitude.
- the geographic entity change request adds a request to the geographic entity
- the aggregate quantity in the target tile metadata is 1, the number of aggregates included in the target tile metadata is directly increased by 1 to implement the target tile metadata. Add the target geographic entity.
- the number of aggregations included in each target tile metadata when the number of aggregations included in each target tile metadata is increased, the number of aggregations may be increased by one for each additional geographic entity, and of course, 2, 3, etc. may be added. Etc. Just follow the same criteria for each target tile metadata.
- the geographic entity deletion request is used to indicate that the target geographic entity is deleted in the multiple target map tiles, for any one of the multiple target map tiles Tile, which reduces the number of aggregates included in the target tile metadata corresponding to the target map tile. Specifically, after reducing the number of aggregations included in the target tile metadata, if the number of geographic entities included in the target tile metadata is 0, at this time, the aggregated geography in the target tile metadata is also required.
- the space vector data of the entity is deleted, that is, the related data of the longitude and latitude of the aggregated geographic entity in the target tile metadata is deleted, that is, the target tile metadata will not include any geographic entity.
- space vector data of the aggregated geographic entity included in the target tile metadata is the space vector data of the target geographic entity
- a geographic entity is randomly selected from other geographic entities included in the target tile metadata, and spatial vector data of the selected geographic entity is used as spatial vector data of the aggregated geographic entity in the target tile metadata.
- the space vector data of the other geographic entities included in the tile metadata may be: determining a target map tile of the target tile metadata, and determining a spatial location range of the target map tile, at a preset scale level.
- the search space location range includes a map tile of a spatial location range of the target map tile, and selects only the selected map tile from the selected map tile.
- a map tile of one of the other geographic entities; the spatial vector data of the aggregated geographic entity included in the tile metadata of the selected map tile is determined as the spatial vector data of one of the other geographic entities.
- the number of aggregations included in each target tile metadata when the number of aggregations included in each target tile metadata is reduced, the number of aggregations may be reduced by one for each geographic entity reduced, and of course, 2, 3, etc. may be reduced. Etc. Just follow the same criteria for each target tile metadata.
- the geographic entity change request is a geographic entity update request
- determining a plurality of target map tiles corresponding to the first geographic entity according to the method for determining a plurality of target map tiles corresponding to the target geographic entity in step 202 a tile element, and according to the identifiers of the plurality of target map tiles corresponding to the first geographic entity, according to step (2) of the second scenario, the tile elements of the plurality of target map tiles corresponding to the first geographic entity
- the data is updated.
- the plurality of target map tiles corresponding to the second geographic entity are determined according to the method for determining the plurality of target map tiles corresponding to the target geographic entity in step 202, and corresponding to the second geographic entity.
- the identifier of the target map tile is updated according to step (1) in the second scenario, and the tile metadata of the plurality of target map tiles corresponding to the second geographic entity is updated.
- a map corresponding to the spatial extent exists in the tile matrix set.
- Tiles, and corresponding tile metadata is set for each map tile.
- the server may also set the map tiles and the corresponding tile metadata corresponding to the spatial extent only when the geographic entity exists in the spatial extent.
- the following two cases may exist:
- the map tile in the spatial extent of the target geographic entity does not exist in the current tile matrix set.
- a plurality of blank tile metadata are required to be
- the geographic entity change request updates the plurality of blank tile metadata.
- tile metadata when it is determined that there are multiple target map tiles to be processed related to the target geographic entity, it is found from the tile metadata table whether there are multiple targets corresponding to the multiple target map tiles.
- Tile metadata when there is no plurality of target tile metadata corresponding to the plurality of target map tiles, generating a plurality of blank tile metadata corresponding to the plurality of target map tiles, the plurality of Blank tile metadata is used as the plurality of target tile metadata.
- corresponding tile metadata may not exist in the tile metadata table, and at the same time, a plurality of blank tile metadata is also required to be formed. And updating the plurality of blank tile metadata according to the geographic entity change request.
- the server may update the tile matrix set according to the tile metadata whose tile state is the unread state. Specifically, the server may update the tile matrix set by the following steps 204 to 206.
- the server when the administrator client sends the geographic entity change request, the server is in the target tile metadata for the administrator to view the changed electronic map in real time through the administrator client.
- the updated map tile may also be returned to the administrator client by using the following step 207, where the updated map tile is a preset scale level map tile regenerated by the server according to the geographic entity change request.
- the preset scale level is a preset scale level corresponding to the current map resolution of the administrator client.
- Step 204 Obtain tile metadata of the tile state as an unread state from the tile metadata table to obtain a plurality of tile metadata.
- the server can directly obtain the tile state. It is the tile metadata of the unread state, and the map tiles of the tile metadata whose tile state is the unread state are updated by steps 205 and 206.
- the server does not update the tile matrix set in real time, but updates the tile matrix set every preset time period.
- step 204 may be: for any one of the stored tile metadata tables of the at least one tile metadata table, according to the tile state of the tile metadata included in the tile metadata table, from the tile metadata Selecting at least one tile metadata whose tile state is an unread state in the table, and obtaining a metadata set, the metadata set only includes tile metadata in the tile metadata table whose tile state is an unread state;
- the server performs the above operations on at least one of the stored tile metadata tables, at least one metadata set may be acquired. At this time, the at least one metadata set includes the plurality of tile metadata.
- the preset time period is a time period that is preset by the server, and the preset time period may be one week, a half month, or a month.
- the embodiment of the present application is not specifically limited herein.
- Step 205 Update a map tile corresponding to each tile metadata of the plurality of tile metadata.
- the server needs to update the map tiles of the tile metadata according to the tile metadata.
- the tile metadata is created for each tile metadata in the multiple tile metadata. a blank map tile; determining, according to spatial vector data of the aggregated geographic entity in the tile metadata, a location of the aggregated geographic entity in the blank map tile; according to the aggregated geographic entity in the blank map tile Position, draw an icon and an annotation of the aggregated geographic entity in the blank map tile to obtain a map tile corresponding to the tile metadata.
- the icon is used to indicate the type of the aggregated geographic entity, where the label is used to indicate the number of geographic entities included in the map tile corresponding to the tile metadata, in particular, when only one geographic entity is included in the tile metadata.
- the annotation can also be replaced with the name of the geographic entity.
- Determining, according to the spatial vector data of the aggregated geographic entity in the tile metadata, a location of the aggregated geographic entity in the blank map tile, that is, according to the longitude of the aggregated geographic entity in the tile metadata Latitude, determining the location of the aggregated geographic entity in the blank map tile, the location of the aggregated geographic entity in the blank map tile may be the abscissa of the aggregated geographic entity in the plane coordinate system corresponding to the blank tile And ordinate representation.
- the server may determine the abscissa of the aggregated geographic entity in a plane coordinate system corresponding to the blank map tile by using the following formulas (1) to (3):
- ResX represents the number of horizontal pixels in the map resolution
- Math.abs(lon)*2 is the geographical range of the global warp direction
- n is the preset scale level corresponding to the map resolution
- Math.Pow(2,n ) indicates that n is operated on the power of n
- minx represents the longitude of the origin of the cut graph
- lon represents the longitude of the aggregated geographic entity
- GeoLonPixelx is an intermediate variable
- GeoLonPixelx% 256 represents the remainder operation of GeoLonPixelx on 256
- PixelX represents aggregated geography.
- the absc issa of the entity in the plane coordinate system corresponding to the blank map tile
- 256 is the pixel size of the map tile that is now common.
- the server may also determine the ordinate of the aggregated geographic entity in the plane coordinate system corresponding to the blank tile by the following formulas (4) to (6):
- PixelY GeoLonPixely%256 formula (6)
- ResY represents the number of vertical pixels in the map resolution
- Math.abs(lat)*2 is the geographical range of the global dimension line
- n is the preset scale level corresponding to the map resolution
- miny represents the cut-off origin.
- Longitude, lat indicates the longitude of the aggregated geographic entity
- GeoLonPixely is an intermediate variable
- GeoLonPixely%256 indicates that GeoLonPixely performs a remainder operation on 256
- PixelY indicates the ordinate of the aggregated geographic entity in the plane coordinate system corresponding to the blank map tile.
- the icon of the aggregated geographic entity may be drawn in the blank map tile by using the abscissa and the ordinate as the starting point. .
- PixelX-imgWidth/2, PixelY-imgHeight/2) is the starting point of the drawing, and the drawing direction is from the lower left to the upper right of the icon.
- the center position of the icon is exactly the aggregate geography.
- PixelX and PixelY are the abscissa and ordinate of the aggregated geographic entity obtained in the plane coordinate system corresponding to the blank map tile
- imgWidth is the width of the icon of the aggregated geographic entity
- imgHeight is the aggregated geographic entity The height of the icon.
- the icon of the aggregated geographic entity is drawn on the blank map tile by the above method, when the starting point of the drawing is at the edge position of the blank map tile, the blank map tile can only be included at this time. Part of the icon. Therefore, in the embodiment of the present application, in order for the icon of the aggregated geographic entity to be completely displayed on the electronic map, when the aggregated geographic entity is at the edge position of the blank map tile, the aggregated geographic entity is drawn in the blank.
- the first icon is part of an icon of the aggregated geographic entity
- the second icon is part of an icon of the aggregated geographic entity
- the second icon and the first icon are capable of forming a complete icon of the aggregated geographic entity.
- the search for the map tile adjacent to the edge position of the blank map tile may be: when the edge position is the left edge position, searching for a map tile adjacent to the left edge position of the blank map tile; When the edge position is the right edge position, searching for a map tile adjacent to the right edge position of the blank map tile; when the edge position is the upper edge position, searching for the upper edge position of the blank map tile a neighboring map tile; when the edge position is a lower edge position, a map tile adjacent to a lower edge position of the blank map tile is found.
- searching for a map tile adjacent to the blank map tile may be determined according to the tile row number and the tile column number of the blank map tile in the associated tile matrix. For example, when the adjacent map tile is a map tile adjacent to the upper edge position of the blank map tile, the tile row number of the adjacent map tile is the tile row number of the blank map tile. Subtracting 1, the tile column number of the adjacent map tile is the tile column number of the blank map tile, according to the tile row number and the tile column number of the adjacent map tile, The adjacent map tile is found in the tile matrix to which the blank map tile belongs.
- the location of the blank geographic tile is the left edge position of the blank map tile
- (PixelX-imgWidth/2, PixelY-imgHeight/2) is used as the starting point of the drawing
- the drawing direction is from the lower left to the upper right of the icon, and when the drawing ends, the blank map tile includes only the right half of the icon.
- the electronic map displays the integrity of the aggregated geographic entity. icon.
- the drawing starting point determined by the above method may be located at four vertices of the blank map tile, and the first icon drawn on the blank map tile is only the 1/4 of the icon of the aggregated geographic entity, since the edge location is at the vertices of the blank map tile, the server will find 3 adjacent map tiles when looking for tiles adjacent to the blank map tile. At this time, the server draws 1/4 of the icon of the aggregated geographic entity on the three adjacent map tiles, that is, the second icon is 3/4 of the icon of the aggregated geographic entity.
- FIG. 3 is a schematic diagram of icon division of an aggregated geographic entity according to an embodiment of the present invention.
- the edge position is the upper left vertex of the blank map tile
- the icon of the aggregated geographic entity is averaged.
- Divided into 4 parts as shown in Figure 3 only the 4th part of the icon is drawn on the blank map tile, the drawing starting point is (PixelX+imgWidth/2, PixelY-imgHeight/2), and the drawing direction is from the right of the icon.
- the map tile in the tile matrix set is an aggregate type map tile, that is, when the number of geographic entities on the local map tile is greater than 1, only the plurality of geographic entities are drawn on the map tile. one of.
- the location of the aggregated geographic entity on the map tile represents only the location of one of the geographic entities, that is, the location of the aggregated geographic entity on the map tile at this time.
- the number of geographic entities on the local map tile is greater than 1
- the location of the aggregated geographic entity on the map tile is the edge position of the map tile, and may not pass.
- the above method generates an icon of the aggregated geographic entity, and appropriately adjusts the drawing starting point on the current blank map tile, so that the icon of the aggregated geographic entity can be completely displayed on the blank map tile.
- the drawing start point may be moved to the right by at least one distance of the width of the icon, and the icon may be completely drawn on the blank map. On the tiles.
- the map tile includes only one geographic entity
- the location of the icon of the geographic entity and the location of the geographic entity on the map tile as consistent as possible
- the icon of the geographic entity is drawn on the blank map tile, if the location of the geographic entity on the blank map tile is the edge position of the blank map tile, the method of drawing the second icon on the adjacent map tile is still adopted. The integrity of the icon of the geographic entity.
- the implementation of drawing the annotation of the aggregated geographic entity on the blank map tile and drawing the icon of the aggregated geographic entity on the blank map tile is substantially the same, and will not be described in detail herein.
- the location of the icon on the blank map tile may be appropriately adjusted according to the icon of the aggregated geographic entity, and the position is appropriately adjusted according to the position of the blank map tile. This can be done by adjusting the drawing starting point.
- the map tile in the tile matrix set is a non-aggregated type map tile
- the map tile corresponding to each tile metadata in the multiple tile metadata may be updated at the same time.
- Step 206 Update the tile matrix set according to the updated map tile, and update the tile state of each tile metadata in the plurality of tile metadata from the unread state to the read state.
- the server may replace the stored map tile corresponding to the tile metadata with the generated map tile, that is, update the tile matrix set.
- the server since the server has updated the tile matrix set according to the tile state of the unread state of the tile state, it is necessary to update the tile state of the plurality of tile metadata from the unread state to the read state.
- the server avoids updating the map tile of the tile metadata whose tile status is the unread state when the next preset time period is reached.
- step 204 to step 206 may be performed on different sets of tile matrices respectively, when the server updates the tiles of each type of geographic entity.
- the slice matrix set is set, the update of all tile matrix sets is completed.
- Step 207 Process the target map tile corresponding to the current map resolution of the plurality of target map tiles, and send the processed target map tile to the administrator client in real time.
- the server may return to the administrator client to distinguish from the current map.
- the rate corresponds to the updated map tile.
- the process of processing the target map tile corresponding to the current map resolution in the multiple target map tiles may be: when the geographic entity change request carries the current map resolution, the server determines the pre-corresponding to the current map resolution. Setting a scale level; selecting, from the plurality of target map tiles, a target map tile whose scale level is a preset scale level corresponding to the current map resolution; acquiring and selecting from the plurality of target tile metadata after the update The target tile metadata corresponding to the target map tile is updated according to the acquired target tile metadata.
- the administrator client When the administrator client receives the processed target map tile, determining the identifier of the processed target map tile, and identifying the map in the current electronic map as the identifier of the processed target map tile
- the slice is replaced with the processed target map tile, so that the administrator can view the updated electronic map in real time.
- the server determines that the preset scale level corresponding to the current map resolution can be determined by using the formula (1) in the step 205.
- updating the selected target map tile according to the obtained tile metadata may refer to step 205.
- the method for updating the map tile corresponding to each tile metadata in the plurality of tile metadata is not elaborated here.
- the target tile metadata when receiving the geographic entity change request sent by the administrator client, the target tile metadata is updated, and the tile state of the target tile metadata is updated to the unread state. Since each tile metadata is used to describe information of the corresponding map tile, and the tile state of the tile data data includes the read state and the unread state, the unread state is used to indicate the tile corresponding to the tile metadata. The slice is not processed. Therefore, when the tile matrix set needs to be updated later, the tile matrix set can be updated only according to the tile metadata whose tile state is the unread state, and all the geography through re-determination is avoided.
- the spatial vector data of the entity to update the tile matrix set of each type of geographic entity can effectively alleviate the pressure in updating the tile matrix set and improve the efficiency of updating the tile matrix set.
- the target map tile corresponding to the current map resolution is returned to the administrator client in real time. For the administrator client, when the geographic entity change request is initiated, the updated map can be displayed in real time, and the map is improved. Timeliness.
- an embodiment of the present application provides a map tile update apparatus 300.
- the apparatus 300 includes a receiving module 301, a determining module 302, a first updating module 303, and a sending module 304:
- the receiving module 301 is configured to receive a geographic entity change request sent by an administrator client, where the geographic entity change request carries space vector data of the target geographic entity and a current map resolution;
- a determining module 302 configured to determine, according to the space vector data of the target geographic entity, a plurality of target map tiles to be processed related to the target geographic entity from the tile matrix set;
- a first update module 303 configured to update, by using a plurality of target tile metadata corresponding to the multiple target map tiles in a tile metadata table, and to obtain tile states of the multiple target tile metadata Update to the unread state;
- Each tile metadata in the tile metadata table corresponds to a map tile, and each tile metadata is used to describe information of a corresponding map tile, and the tile state includes the read state and the a read state, the read state is used to indicate that the map tile corresponding to the tile metadata has been processed, and the unread state is used to indicate that the map tile corresponding to the tile metadata is not processed;
- the sending module 304 is configured to process the target map tile corresponding to the current map resolution of the plurality of target map tiles, and send the processed target map tile to the administrator client in real time.
- the map tile in the tile matrix set is a non-aggregated type map tile
- each tile metadata includes an identifier of a corresponding map tile, a scale level to which the corresponding map tile belongs, and a corresponding map.
- the geographic entity change request includes a geographic entity addition request, a geographic entity deletion request, or a geographic entity update request;
- the first update module is specifically configured to:
- the geographic entity change request adds a request to the geographic entity
- the identifier of the target geographic entity and the space vector data of the target geographic entity are added in each target tile metadata
- the geographic entity change request is a geographic entity deletion request, deleting the identifier of the target geographic entity and the space vector data of the target geographic entity in each target tile metadata;
- the geographic entity change request is a geographic entity update request
- target tile metadata of each target map tile corresponding to the first geographic entity Deleting the identifier of the first geographic entity and the space vector data of the first geographic entity, and adding the identifier of the second geographic entity to the target tile metadata of each target map tile corresponding to the second geographic entity
- the space vector data of the second geographic entity, the first geographic entity is a pre-change geographic entity, and the second geographic entity is a changed geographic entity.
- the map tile in the tile matrix set is an aggregate type map tile
- each tile metadata includes an identifier of a corresponding map tile, a scale level to which the corresponding map tile belongs, and a corresponding map tile.
- the space vector data, the number of aggregates, and the tile status of the aggregated geographic entity in the slice, the aggregated number is used to indicate the number of geographic entities included in the corresponding map tile, and the aggregated geographic entity is corresponding to the tile metadata. Any geographic entity included in the map tile.
- the geographic entity change request includes a geographic entity addition request, a geographic entity deletion request, or a geographic entity update request;
- the first update module is specifically configured to:
- the geographic entity change request is a geographic entity deletion request, reducing the aggregate amount included in each target tile metadata
- the geographic entity change request is a geographic entity update request
- the device further includes:
- a first generating module configured to: when determining that there are no target map tiles to be processed related to the target geographic entity, generate a plurality of blank tile metadata, and use the multiple blank tile metadata as the multiple Target tile metadata; or,
- a second generating module configured to: when determining that there are multiple target map tiles to be processed related to the target geographic entity, whether there is more corresponding to the multiple target map tiles from the tile metadata table Generating tile metadata, when there is no plurality of target tile metadata corresponding to the plurality of target map tiles, generating a plurality of blank tile metadata corresponding to the plurality of target map tiles, A plurality of blank tile metadata is used as the plurality of target tile metadata.
- the sending module is specifically configured to:
- the selected target map tile is updated according to the acquired target tile metadata.
- the device further includes:
- An obtaining module configured to obtain, from the tile metadata table, tile metadata whose tile state is an unread state, to obtain multiple tile metadata
- a second update module configured to update a map tile corresponding to each tile metadata of the multiple tile metadata
- a third update module configured to update the tile matrix set according to the updated map tile, and update the tile state of each tile metadata in the multiple tile metadata from the unread state to the read status.
- the map tile in the tile matrix set is an aggregate type map tile
- the second update module includes:
- a creating unit configured to create a blank map tile corresponding to the tile metadata for any one of the plurality of tile metadata
- a determining unit configured to determine, according to space vector data of the aggregated geographic entity in the tile metadata, a location of the aggregated geographic entity in the blank map tile, where the aggregated geographic entity is a map tile corresponding to the tile metadata Any geographic entity included in the slice;
- a drawing unit configured to draw an icon and an annotation of the aggregated geographic entity in the blank map tile according to the location of the aggregated geographic entity in the blank map tile, to obtain a map tile corresponding to the tile metadata
- the icon is used to indicate the type of the aggregated geographic entity
- the label is used to indicate the number of geographic entities included in the map tile corresponding to the tile metadata.
- the drawing unit is specifically configured to:
- the tile matrix set is a tile matrix set corresponding to a type of geographic entity to which the target geographic entity belongs.
- the target tile metadata when receiving the geographic entity change request sent by the administrator client, the target tile metadata is updated, and the tile state of the target tile metadata is updated to the unread state. Since each tile metadata is used to describe information of the corresponding map tile, and the tile state of the tile data data includes the read state and the unread state, the unread state is used to indicate the tile corresponding to the tile metadata. The slice is not processed. Therefore, when the tile matrix set needs to be updated later, the tile matrix set can be updated only according to the tile metadata whose tile state is the unread state, and all the geography through re-determination is avoided.
- the spatial vector data of the entity to update the tile matrix set of each type of geographic entity can effectively alleviate the pressure in updating the tile matrix set and improve the efficiency of updating the tile matrix set.
- the target map tile corresponding to the current map resolution is returned to the administrator client in real time. For the administrator client, when the geographic entity change request is initiated, the updated map can be displayed in real time, and the map is improved. Timeliness.
- map tile updating apparatus provided in the above embodiment is only exemplified by the division of the above functional modules when the map tile update is triggered.
- the above function assignment can also be completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
- map tile updating apparatus and the map tile updating method embodiment provided by the foregoing embodiments are in the same concept, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
- FIG. 5 is a block diagram of another map tile updating apparatus 400 provided by an embodiment of the present application.
- device 400 can be provided as a server.
- apparatus 400 includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404.
- the processor 401, the communication interface 402, and the memory 403 complete communication with each other via the communication bus 404.
- the processor 401 may be a CPU (Central Processing Unit), a microprocessor, an ASIC (application-specific integrated circuit), or one or more integrated systems for controlling the execution of the program of the present application. Circuit.
- CPU Central Processing Unit
- ASIC application-specific integrated circuit
- Communication bus 404 can include a path for communicating information between the components described above.
- the memory 403 may be a ROM (read-only memory) or other type of static storage device that can store static information and instructions, a RAM (random access memory) or other type that can store information and instructions.
- the dynamic storage device can also be an EEPROM (Electrically Erasable Programmable Read-Only Memory), a CD-ROM (Compact Disc Read-Only Memory) or other optical disc storage, and a disc storage device. (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be Any other medium accessed, but is not limited to this.
- Memory 403 may be present independently and coupled to processor 401 via communication bus 404. Memory 403 can also be integrated with processor 401.
- the communication interface 402 uses devices such as any transceiver for communicating with other devices or communication networks, such as Ethernet, wireless access networks, WLAN (Wireless Local Area Networks, etc.).
- devices such as any transceiver for communicating with other devices or communication networks, such as Ethernet, wireless access networks, WLAN (Wireless Local Area Networks, etc.).
- the memory 403 is used to store a computer program for executing the solution of the present application, and is controlled by the processor 401 for execution. That is, the processor 401 is configured to execute a program stored on the memory to implement the map tile update method provided by the foregoing embodiment.
- a computer readable storage medium having stored therein a computer program, when a computer program stored in the computer readable storage medium is executed by a processor of a server, The server is enabled to enable the map tile update method provided by the above embodiment.
- a computer program product having instructions stored therein that, when run on a computer, cause the computer to perform a map tile update method method as provided by the above embodiments.
- a chip comprising programmable logic circuitry and/or program instructions for implementing a map tile update method as provided by the above embodiments when the chip is running.
- a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
- the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Remote Sensing (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Processing Or Creating Images (AREA)
- Instructional Devices (AREA)
Abstract
Description
本申请要求于2017年06月07日提交中华人民共和国国家知识产权局、申请号为201710423627.1、发明名称为“地图瓦片更新方法、装置及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority from the Chinese Patent Application of the National Intellectual Property Office of the People's Republic of China, application number 201710423627.1, and the invention titled "Map tile update method, device and computer readable storage medium" on June 07, 2017. The entire contents of this application are incorporated herein by reference.
本申请涉及地图领域,特别涉及一种地图瓦片更新方法、装置及计算机可读存储介质。The present application relates to the field of maps, and in particular, to a method and device for updating a map tile and a computer readable storage medium.
目前的电子地图主要是将诸如电影院、餐馆、超市等多类地理实体的地图瓦片经过图层叠加形成,地图瓦片是由服务器通过WMTS(Web Map Tile Service,切片地图网络服务)技术对地理实体的空间矢量数据处理得到,因此地图瓦片可以直观地表示地理实体的空间位置。由于现实生活中地理实体的空间位置可能会发生变化,如某街道新增一个电影院,因此服务器需要定期对地图瓦片进行更新,以保证地图瓦片中地理实体的空间位置和现实生活中地理实体的空间位置尽量一致。The current electronic map is mainly formed by superimposing map tiles of various types of geographical entities such as cinemas, restaurants, supermarkets, etc., and the map tiles are processed by the server through WMTS (Web Map Tile Service) technology. The spatial vector data processing of the entity is obtained, so the map tile can visually represent the spatial location of the geographic entity. Since the spatial location of geographic entities may change in real life, such as adding a movie theater to a street, the server needs to periodically update the map tiles to ensure the spatial location of the geographic entities in the map tiles and the real-life geographic entities. The spatial location is as consistent as possible.
在WMTS技术中,服务器预先对多个地理实体进行分类,得到至少一类地理实体,如将所有的电影院确定为一类地理实体,将所有的肯德基确定为一类地理实体等。针对任意一类地理实体,服务器按照多个预设比例级别中的每个预设比例级别对该类地理实体中的各个地理实体的空间矢量数据进行分析、提取、渲染等方式的处理,得到该类地理实体在每个预设比例级别下的多个地图瓦片。其中,同一预设比例级别下的地图瓦片的分辨率相同。之后,将同一预设比例级别下的多个地图瓦片构成一个瓦片矩阵,以得到多个瓦片矩阵,将该多个瓦片矩阵构成该类地理实体的瓦片矩阵集。服务器在确定该类地理实体的瓦片矩阵集之后,每隔预设时间段重新确定该类地理实体中所有地理实体的空间矢量数据,并根据重新确定的地理实体的空间矢量数据,按照上述方法重新确定该类地理实体的瓦片矩阵集,也即对该类地理实体的瓦片矩阵集中的地 图瓦片进行更新。In the WMTS technology, the server classifies a plurality of geographic entities in advance to obtain at least one type of geographic entity, such as determining all movie theaters as a type of geographic entity, and determining all KFCs as a type of geographic entity. For any type of geographic entity, the server analyzes, extracts, and renders the spatial vector data of each geographic entity in the geographic entity according to each of the preset proportion levels. A plurality of map tiles of a class geographic entity at each preset scale level. Among them, the map tiles under the same preset scale level have the same resolution. Then, a plurality of map tiles under the same preset scale level form a tile matrix to obtain a plurality of tile matrices, and the plurality of tile matrices constitute a tile matrix set of the geographic entity. After determining the set of tile matrices of the type of the geographic entity, the server re-determines the space vector data of all the geographic entities in the geographic entity for each preset time period, and according to the spatial vector data of the re-determined geographic entity, according to the above method The set of tile matrices of the type of geographic entity is re-determined, that is, the map tiles in the tile matrix set of the geographic entity are updated.
由于服务器是每隔预设时间段更新瓦片矩阵集的,因此若当前某个地理实体发生了变更,管理员客户端记录该地理实体发生了变更,但是服务器仍然在下个预设时间段到达时才能对瓦片矩阵集中的地图瓦片进行更新,也即,管理员客户端在记录某个地理实体进行变更之后,当前显示的地图瓦片仍然是更新前的地图瓦片。另外,由于服务器每隔预设时间段需要重新确定每一类地理实体中的所有地理实体的空间矢量数据,并根据重新确定的所有地理实体的空间矢量数据确定每一类地理实体的瓦片矩阵集,导致服务器在更新瓦片矩阵集的过程中压力较大。Since the server updates the tile matrix set every preset time period, if a current geographic entity changes, the administrator client records that the geographic entity has changed, but the server still arrives in the next preset time period. The map tile in the tile matrix set can be updated, that is, after the administrator client records the change of a geographic entity, the currently displayed map tile is still the map tile before the update. In addition, since the server needs to re-determine the space vector data of all the geographic entities in each type of geographic entity every predetermined time period, and determine the tile matrix of each type of geographic entity according to the spatial vector data of all the determined geographical entities. The set causes the server to be under pressure during the process of updating the tile matrix set.
发明内容Summary of the invention
本申请实施例提供了一种地图瓦片更新方法、装置及计算机可读存储介质,可以解决现有的WMTS技术中管理员客户端在记录某个地理实体进行变更之后,当前显示的地图瓦片仍然是更新前的地图瓦片,以及服务器在更新瓦片矩阵集的过程中压力大的问题。所述技术方案如下:The embodiment of the present application provides a map tile updating method and device, and a computer readable storage medium, which can solve the current map tile displayed by an administrator client after recording a geographic entity to change in the existing WMTS technology. It is still the map tile before the update, and the server has a lot of pressure in the process of updating the tile matrix set. The technical solution is as follows:
第一方面,提供了一种地图瓦片更新方法,所述方法包括:In a first aspect, a method for updating a map tile is provided, the method comprising:
接收管理员客户端发送的地理实体变更请求,所述地理实体变更请求携带目标地理实体的空间矢量数据和当前地图分辨率;Receiving a geographic entity change request sent by an administrator client, where the geographic entity change request carries space vector data of the target geographic entity and a current map resolution;
根据所述目标地理实体的空间矢量数据,从瓦片矩阵集中确定与所述目标地理实体相关的待处理的多个目标地图瓦片;Determining, from the tile matrix set, a plurality of target map tiles to be processed related to the target geographic entity according to the space vector data of the target geographic entity;
对瓦片元数据表中与所述多个目标地图瓦片对应的多个目标瓦片元数据进行更新,将所述多个目标瓦片元数据的瓦片状态均更新为未阅状态;Updating a plurality of target tile metadata corresponding to the plurality of target map tiles in the tile metadata table, and updating the tile states of the plurality of target tile metadata to an unread state;
其中,所述瓦片元数据表中的每条瓦片元数据均对应一个地图瓦片,每条瓦片元数据用于描述对应的地图瓦片的信息,所述瓦片状态包括已阅状态和未阅状态,所述已阅状态用于指示瓦片元数据对应的地图瓦片已完成处理,所述未阅状态用于指示瓦片元数据对应的地图瓦片未完成处理;Each tile metadata in the tile metadata table corresponds to one map tile, and each tile metadata is used to describe information of a corresponding map tile, where the tile state includes a read state. And the read state is used to indicate that the map tile corresponding to the tile metadata has been processed, and the unread state is used to indicate that the map tile corresponding to the tile metadata is not processed;
对所述多个目标地图瓦片中与所述当前地图分辨率对应的目标地图瓦片进行处理,并将处理后的目标地图瓦片实时发送给所述管理员客户端。And processing the target map tile corresponding to the current map resolution in the plurality of target map tiles, and transmitting the processed target map tile to the administrator client in real time.
可选地,所述瓦片矩阵集中的地图瓦片为非聚合类型的地图瓦片,每个瓦片元数据包括对应的地图瓦片的标识、对应的地图瓦片所属的比例级别、对应的地图瓦片中的包括的每个地理实体的空间矢量数据,每个地理实体的标识以 及瓦片状态。Optionally, the map tiles in the tile matrix set are non-aggregated type map tiles, and each tile metadata includes an identifier of a corresponding map tile, a scale level to which the corresponding map tile belongs, and a corresponding The spatial vector data of each geographic entity included in the map tile, the identity of each geographic entity, and the tile status.
可选地,所述地理实体变更请求包括地理实体添加请求、地理实体删除请求或地理实体更新请求;Optionally, the geographic entity change request includes a geographic entity addition request, a geographic entity deletion request, or a geographic entity update request;
所述对瓦片元数据表中与所述多个目标地图瓦片对应的多个目标瓦片元数据进行更新,包括:Updating the plurality of target tile metadata corresponding to the plurality of target map tiles in the tile metadata table, including:
当所述地理实体变更请求为地理实体添加请求时,在每个目标瓦片元数据中增加所述目标地理实体的标识和所述目标地理实体的空间矢量数据;When the geographic entity change request adds a request to the geographic entity, adding an identifier of the target geographic entity and space vector data of the target geographic entity in each target tile metadata;
当所述地理实体变更请求为地理实体删除请求时,在每个目标瓦片元数据中删除所述目标地理实体的标识和所述目标地理实体的空间矢量数据;When the geographic entity change request is a geographic entity deletion request, deleting the identifier of the target geographic entity and the space vector data of the target geographic entity in each target tile metadata;
当所述地理实体变更请求为地理实体更新请求时,基于所述目标地理实体包括的第一地理实体和第二地理实体,在所述第一地理实体对应的每个目标地图瓦片的目标瓦片元数据中删除所述第一地理实体的标识和所述第一地理实体的空间矢量数据,并在所述第二地理实体对应的每个目标地图瓦片的目标瓦片元数据中增加所述第二地理实体的标识和所述第二地理实体的空间矢量数据,所述第一地理实体为变更前的地理实体,所述第二地理实体为变更后的地理实体。When the geographic entity change request is a geographic entity update request, based on the first geographic entity and the second geographic entity included in the target geographic entity, a target tile of each target map tile corresponding to the first geographic entity Deleting the identifier of the first geographic entity and the space vector data of the first geographic entity in the piece of metadata, and adding the target tile metadata of each target map tile corresponding to the second geographic entity The identifier of the second geographic entity and the space vector data of the second geographic entity, the first geographic entity is a pre-change geographic entity, and the second geographic entity is a changed geographic entity.
可选地,所述瓦片矩阵集中的地图瓦片为聚合类型的地图瓦片,每个瓦片元数据包括对应的地图瓦片的标识、对应的地图瓦片所属的比例级别、对应的地图瓦片中的聚合地理实体的空间矢量数据、聚合数量以及瓦片状态,所述聚合数量用于指示对应的地图瓦片中包括的地理实体的个数,所述聚合地理实体为所述瓦片元数据对应的地图瓦片包括的任一地理实体。Optionally, the map tiles in the tile matrix set are aggregation type map tiles, and each tile metadata includes an identifier of a corresponding map tile, a scale level to which the corresponding map tile belongs, and a corresponding map. The space vector data, the number of aggregates, and the tile state of the aggregated geographic entity in the tile, the aggregated number is used to indicate the number of geographic entities included in the corresponding map tile, and the aggregated geographic entity is the tile Any geographic entity included in the map tile corresponding to the metadata.
可选地,所述地理实体变更请求包括地理实体添加请求、地理实体删除请求或地理实体更新请求;Optionally, the geographic entity change request includes a geographic entity addition request, a geographic entity deletion request, or a geographic entity update request;
所述对瓦片元数据表中与所述多个目标地图瓦片对应的多个目标瓦片元数据进行更新,包括:Updating the plurality of target tile metadata corresponding to the plurality of target map tiles in the tile metadata table, including:
当所述地理实体变更请求为地理实体添加请求时,增加每个目标瓦片元数据包括的聚合数量;Increasing the number of aggregates included in each target tile metadata when the geographic entity change request adds a request to the geographic entity;
当所述地理实体变更请求为地理实体删除请求时,减少每个目标瓦片元数据包括的聚合数量;When the geographic entity change request is a geographic entity deletion request, reducing the aggregated amount included in each target tile metadata;
当所述地理实体变更请求为地理实体更新请求时,基于所述目标地理实体包括的第一地理实体和第二地理实体,减少所述第一地理实体对应的每个目标 地图瓦片的目标瓦片元数据包括的聚合数量,并增加所述第二地理实体对应的每个目标地图瓦片的目标瓦片元数据包括的聚合数量,所述第一地理实体为变更前的地理实体,所述第二地理实体为变更后的地理实体。When the geographic entity change request is a geographic entity update request, reducing a target tile of each target map tile corresponding to the first geographic entity based on the first geographic entity and the second geographic entity included in the target geographic entity And the number of aggregates included in the target tile metadata of each target map tile corresponding to the second geographic entity, where the first geographic entity is a geographic entity before the change, The second geographic entity is a changed geographic entity.
可选地,所述根据所述多个目标地图瓦片,对瓦片元数据表中的多个目标瓦片元数据进行更新之前,还包括:Optionally, before updating the multiple target tile metadata in the tile metadata table according to the multiple target map tiles, the method further includes:
当确定不存在与所述目标地理实体相关的待处理的多个目标地图瓦片时,生成多个空白瓦片元数据,将所述多个空白瓦片元数据作为所述多个目标瓦片元数据;或者,When determining that there are no target map tiles to be processed related to the target geographic entity, generating a plurality of blank tile metadata, using the plurality of blank tile metadata as the plurality of target tiles Metadata; or,
当确定存在与所述目标地理实体相关的待处理的多个目标地图瓦片时,从所述瓦片元数据表中查找是否存在与所述多个目标地图瓦片对应的多个目标瓦片元数据,当不存在与所述多个目标地图瓦片对应的多个目标瓦片元数据时,生成与所述多个目标地图瓦片对应的多个空白瓦片元数据,将所述多个空白瓦片元数据作为所述多个目标瓦片元数据。When it is determined that there are a plurality of target map tiles to be processed related to the target geographic entity, searching, from the tile metadata table, whether there are multiple target tiles corresponding to the plurality of target map tiles Metadata, when there is no plurality of target tile metadata corresponding to the plurality of target map tiles, generating a plurality of blank tile metadata corresponding to the plurality of target map tiles, The blank tile metadata is used as the plurality of target tile metadata.
可选地,所述对所述多个目标地图瓦片中与所述当前地图分辨率对应的目标地图瓦片进行处理,包括:Optionally, the processing, by the target map tile corresponding to the current map resolution of the multiple target map tiles, includes:
从多个预设比例级别中确定所述当前地图分辨率对应的预设比例级别;Determining, from a plurality of preset scale levels, a preset scale level corresponding to the current map resolution;
从所述多个目标地图瓦片中选择比例级别为所述当前地图分辨率对应的预设比例级别的目标地图瓦片;Selecting, from the plurality of target map tiles, a target map tile whose scale level is a preset scale level corresponding to the current map resolution;
从更新之后的多个目标瓦片元数据中获取与选择的目标地图瓦片对应的目标瓦片元数据;Obtaining target tile metadata corresponding to the selected target map tile from the plurality of target tile metadata after the update;
根据获取到的目标瓦片元数据对所述选择的目标地图瓦片进行更新。The selected target map tile is updated according to the acquired target tile metadata.
可选地,所述将所述多个目标瓦片元数据的瓦片状态均更新为未阅状态之后,还包括:Optionally, after the updating the tile states of the multiple target tile metadata to the unread state, the method further includes:
从所述瓦片元数据表中获取瓦片状态为未阅状态的瓦片元数据,得到多个瓦片元数据;Obtaining, from the tile metadata table, tile metadata whose tile state is an unread state, to obtain a plurality of tile metadata;
对所述多个瓦片元数据中每个瓦片元数据对应的地图瓦片进行更新;Updating a map tile corresponding to each tile metadata of the plurality of tile metadata;
根据更新之后的地图瓦片,更新所述瓦片矩阵集,并将所述多个瓦片元数据中每个瓦片元数据的瓦片状态从未阅状态更新为已阅状态。Updating the tile matrix set according to the updated map tile, and updating the tile state of each tile metadata of the plurality of tile metadata from the unread state to the read state.
可选地,所述瓦片矩阵集中的地图瓦片为聚合类型的地图瓦片;Optionally, the map tile in the tile matrix set is an aggregate type map tile;
所述对所述多个瓦片元数据中每个瓦片元数据对应的地图瓦片进行更新,包括:Updating the map tile corresponding to each tile metadata of the plurality of tile metadata, including:
对于所述多个瓦片元数据中的任一个瓦片元数据,创建所述瓦片元数据对应的空白地图瓦片;Creating a blank map tile corresponding to the tile metadata for any one of the plurality of tile metadata;
根据所述瓦片元数据中的聚合地理实体的空间矢量数据,确定所述聚合地理实体在所述空白地图瓦片中的位置,所述聚合地理实体为所述瓦片元数据对应的地图瓦片包括的任一地理实体;Determining, according to space vector data of the aggregated geographic entity in the tile metadata, a location of the aggregated geographic entity in the blank map tile, where the aggregated geographic entity is a map tile corresponding to the tile metadata Any geographic entity included in the slice;
根据所述聚合地理实体在所述空白地图瓦片中的位置,绘制所述聚合地理实体在所述空白地图瓦片中的图标和标注,以得到所述瓦片元数据对应的地图瓦片,所述图标用于指示所述聚合地理实体的类型,所述标注用于指示所述瓦片元数据对应的地图瓦片中包括的地理实体的个数。And mapping, according to the location of the aggregated geographic entity in the blank map tile, an icon and an annotation of the aggregated geographic entity in the blank map tile to obtain a map tile corresponding to the tile metadata, The icon is used to indicate a type of the aggregated geographic entity, and the label is used to indicate a number of geographic entities included in a map tile corresponding to the tile metadata.
可选地,所述根据所述聚合地理实体在所述空白地图瓦片中的位置,绘制所述聚合地理实体在所述空白地图瓦片中的图标和标注,以得到所述瓦片元数据对应的地图瓦片,包括:Optionally, the icon and the label of the aggregated geographic entity in the blank map tile are drawn according to the location of the aggregated geographic entity in the blank map tile to obtain the tile metadata. Corresponding map tiles, including:
当所述聚合地理实体处于所述空白地图瓦片的边缘位置时,绘制所述聚合地理实体在所述空白地图瓦片中的第一图标,所述第一图标为所述聚合地理实体的图标的一部分;When the aggregated geographic entity is at an edge position of the blank map tile, drawing a first icon of the aggregated geographic entity in the blank map tile, the first icon being an icon of the aggregated geographic entity a part of;
查找与所述空白地图瓦片的边缘位置相邻的地图瓦片;Finding a map tile adjacent to an edge position of the blank map tile;
根据所述聚合地理实体的空间矢量数据,确定所述聚合地理实体在所述相邻的地图瓦片中的位置;Determining, according to space vector data of the aggregated geographic entity, a location of the aggregated geographic entity in the adjacent map tile;
根据所述聚合地理实体在所述相邻的地图瓦片中的位置,在所述相邻的地图瓦片上绘制所述聚合地理实体的第二图标,所述第二图标为所述聚合地理实体的图标的一部分,且所述第二图标和所述第一图标能够构成所述聚合地理实体的完整图标。Mapping a second icon of the aggregated geographic entity on the adjacent map tile according to a location of the aggregated geographic entity in the adjacent map tile, the second icon being the aggregated geographic entity Part of the icon, and the second icon and the first icon can form a complete icon of the aggregated geographic entity.
可选地,所述瓦片矩阵集为与所述目标地理实体所属的一类地理实体对应的瓦片矩阵集。Optionally, the tile matrix set is a tile matrix set corresponding to a type of geographic entity to which the target geographic entity belongs.
第二方面,提供了一种地图瓦片更新装置,所述装置包括:In a second aspect, a map tile update device is provided, the device comprising:
接收模块,用于接收管理员客户端发送的地理实体变更请求,所述地理实体变更请求携带目标地理实体的空间矢量数据和当前地图分辨率;a receiving module, configured to receive a geographic entity change request sent by an administrator client, where the geographic entity change request carries spatial vector data of the target geographic entity and a current map resolution;
确定模块,用于根据所述目标地理实体的空间矢量数据,从瓦片矩阵集中确定与所述目标地理实体相关的待处理的多个目标地图瓦片;a determining module, configured to determine, according to the space vector data of the target geographic entity, a plurality of target map tiles to be processed related to the target geographic entity from the tile matrix set;
第一更新模块,用于对瓦片元数据表中与所述多个目标地图瓦片对应的多 个目标瓦片元数据进行更新,将所述多个目标瓦片元数据的瓦片状态均更新为未阅状态;a first update module, configured to update, by using a plurality of target tile metadata corresponding to the multiple target map tiles in a tile metadata table, and to perform tile states of the multiple target tile metadata Update to the unread state;
其中,所述瓦片元数据表中的每条瓦片元数据均对应一个地图瓦片,每条瓦片元数据用于描述对应的地图瓦片的信息,所述瓦片状态包括已阅状态和未阅状态,所述已阅状态用于指示瓦片元数据对应的地图瓦片已完成处理,所述未阅状态用于指示瓦片元数据对应的地图瓦片未完成处理;Each tile metadata in the tile metadata table corresponds to one map tile, and each tile metadata is used to describe information of a corresponding map tile, where the tile state includes a read state. And the read state is used to indicate that the map tile corresponding to the tile metadata has been processed, and the unread state is used to indicate that the map tile corresponding to the tile metadata is not processed;
发送模块,用于对所述多个目标地图瓦片中与所述当前地图分辨率对应的目标地图瓦片进行处理,并将处理后的目标地图瓦片实时发送给所述管理员客户端。And a sending module, configured to process the target map tile corresponding to the current map resolution of the plurality of target map tiles, and send the processed target map tile to the administrator client in real time.
可选地,所述瓦片矩阵集中的地图瓦片为非聚合类型的地图瓦片,每个瓦片元数据包括对应的地图瓦片的标识、对应的地图瓦片所属的比例级别、对应的地图瓦片中的包括的每个地理实体的空间矢量数据、每个地理实体的标识以及瓦片状态。Optionally, the map tiles in the tile matrix set are non-aggregated type map tiles, and each tile metadata includes an identifier of a corresponding map tile, a scale level to which the corresponding map tile belongs, and a corresponding The spatial vector data of each geographic entity included in the map tile, the identity of each geographic entity, and the tile status.
可选地,所述地理实体变更请求包括地理实体添加请求、地理实体删除请求或地理实体更新请求;Optionally, the geographic entity change request includes a geographic entity addition request, a geographic entity deletion request, or a geographic entity update request;
所述第一更新模块,具体用于:The first update module is specifically configured to:
当所述地理实体变更请求为地理实体添加请求时,在每个目标瓦片元数据中增加所述目标地理实体的标识和所述目标地理实体的空间矢量数据;When the geographic entity change request adds a request to the geographic entity, adding an identifier of the target geographic entity and space vector data of the target geographic entity in each target tile metadata;
当所述地理实体变更请求为地理实体删除请求时,在每个目标瓦片元数据中删除所述目标地理实体的标识和所述目标地理实体的空间矢量数据;When the geographic entity change request is a geographic entity deletion request, deleting the identifier of the target geographic entity and the space vector data of the target geographic entity in each target tile metadata;
当所述地理实体变更请求为地理实体更新请求时,基于所述目标地理实体包括的第一地理实体和第二地理实体,在所述第一地理实体对应的每个目标地图瓦片的目标瓦片元数据中删除所述第一地理实体的标识和所述第一地理实体的空间矢量数据,并在所述第二地理实体对应的每个目标地图瓦片的目标瓦片元数据中增加所述第二地理实体的标识和所述第二地理实体的空间矢量数据,所述第一地理实体为变更前的地理实体,所述第二地理实体为变更后的地理实体。When the geographic entity change request is a geographic entity update request, based on the first geographic entity and the second geographic entity included in the target geographic entity, a target tile of each target map tile corresponding to the first geographic entity Deleting the identifier of the first geographic entity and the space vector data of the first geographic entity in the piece of metadata, and adding the target tile metadata of each target map tile corresponding to the second geographic entity The identifier of the second geographic entity and the space vector data of the second geographic entity, the first geographic entity is a pre-change geographic entity, and the second geographic entity is a changed geographic entity.
可选地,所述瓦片矩阵集中的地图瓦片为聚合类型的地图瓦片,每个瓦片元数据包括对应的地图瓦片的标识、对应的地图瓦片所属的比例级别、对应的地图瓦片中的聚合地理实体的空间矢量数据、聚合数量以及瓦片状态,所述聚合数量用于指示对应的地图瓦片中包括的地理实体的个数,所述聚合地理实体 为所述瓦片元数据对应的地图瓦片包括的任一地理实体。Optionally, the map tiles in the tile matrix set are aggregation type map tiles, and each tile metadata includes an identifier of a corresponding map tile, a scale level to which the corresponding map tile belongs, and a corresponding map. The space vector data, the number of aggregates, and the tile state of the aggregated geographic entity in the tile, the aggregated number is used to indicate the number of geographic entities included in the corresponding map tile, and the aggregated geographic entity is the tile Any geographic entity included in the map tile corresponding to the metadata.
可选地,所述地理实体变更请求包括地理实体添加请求、地理实体删除请求或地理实体更新请求;Optionally, the geographic entity change request includes a geographic entity addition request, a geographic entity deletion request, or a geographic entity update request;
所述第一更新模块,具体用于:The first update module is specifically configured to:
当所述地理实体变更请求为地理实体添加请求时,增加每个目标瓦片元数据包括的聚合数量;Increasing the number of aggregates included in each target tile metadata when the geographic entity change request adds a request to the geographic entity;
当所述地理实体变更请求为地理实体删除请求时,减少每个目标瓦片元数据包括的聚合数量;When the geographic entity change request is a geographic entity deletion request, reducing the aggregated amount included in each target tile metadata;
当所述地理实体变更请求为地理实体更新请求时,基于所述目标地理实体包括的第一地理实体和第二地理实体,减少所述第一地理实体对应的每个目标地图瓦片的目标瓦片元数据包括的聚合数量,并增加所述第二地理实体对应的每个目标地图瓦片的目标瓦片元数据包括的聚合数量,所述第一地理实体为变更前的地理实体,所述第二地理实体为变更后的地理实体。When the geographic entity change request is a geographic entity update request, reducing a target tile of each target map tile corresponding to the first geographic entity based on the first geographic entity and the second geographic entity included in the target geographic entity And the number of aggregates included in the target tile metadata of each target map tile corresponding to the second geographic entity, where the first geographic entity is a geographic entity before the change, The second geographic entity is a changed geographic entity.
可选地,所述装置还包括:Optionally, the device further includes:
第一生成模块,用于当确定不存在与所述目标地理实体相关的待处理的多个目标地图瓦片时,生成多个空白瓦片元数据,将所述多个空白瓦片元数据作为所述多个目标瓦片元数据;或者,a first generating module, configured to: when determining that there are no target map tiles to be processed related to the target geographic entity, generate a plurality of blank tile metadata, and use the multiple blank tile metadata as The plurality of target tile metadata; or
第二生成模块,用于当确定存在与所述目标地理实体相关的待处理的多个目标地图瓦片时,从所述瓦片元数据表中查找是否存在与所述多个目标地图瓦片对应的多个目标瓦片元数据,当不存在与所述多个目标地图瓦片对应的多个目标瓦片元数据时,生成与所述多个目标地图瓦片对应的多个空白瓦片元数据,将所述多个空白瓦片元数据作为所述多个目标瓦片元数据。a second generating module, configured to: when determining that there are multiple target map tiles to be processed related to the target geographic entity, whether to find and exist with the multiple target map tiles from the tile metadata table Corresponding multiple target tile metadata, when there are multiple target tile metadata corresponding to the multiple target map tiles, generating multiple blank tiles corresponding to the multiple target map tiles Metadata, the plurality of blank tile metadata being used as the plurality of target tile metadata.
可选地,所述发送模块,具体用于:Optionally, the sending module is specifically configured to:
从多个预设比例级别中确定所述当前地图分辨率对应的预设比例级别;Determining, from a plurality of preset scale levels, a preset scale level corresponding to the current map resolution;
从所述多个目标地图瓦片中选择比例级别为所述当前地图分辨率对应的预设比例级别的目标地图瓦片;Selecting, from the plurality of target map tiles, a target map tile whose scale level is a preset scale level corresponding to the current map resolution;
从更新之后的多个目标瓦片元数据中获取与选择的目标地图瓦片对应的目标瓦片元数据;Obtaining target tile metadata corresponding to the selected target map tile from the plurality of target tile metadata after the update;
根据获取到的目标瓦片元数据对所述选择的目标地图瓦片进行更新。The selected target map tile is updated according to the acquired target tile metadata.
可选地,所述装置还包括:Optionally, the device further includes:
获取模块,用于从所述瓦片元数据表中获取瓦片状态为未阅状态的瓦片元 数据,得到多个瓦片元数据;An obtaining module, configured to obtain, from the tile metadata table, tile metadata whose tile state is an unread state, to obtain multiple tile metadata;
第二更新模块,用于对所述多个瓦片元数据中每个瓦片元数据对应的地图瓦片进行更新;a second update module, configured to update a map tile corresponding to each tile metadata of the multiple tile metadata;
第三更新模块,用于根据更新之后的地图瓦片,更新所述瓦片矩阵集,并将所述多个瓦片元数据中每个瓦片元数据的瓦片状态从未阅状态更新为已阅状态。a third update module, configured to update the tile matrix set according to the updated map tile, and update a tile state of each tile metadata in the multiple tile metadata from a read state to a read state Read status.
可选地,所述瓦片矩阵集中的地图瓦片为聚合类型的地图瓦片;Optionally, the map tile in the tile matrix set is an aggregate type map tile;
所述第二更新模块包括:The second update module includes:
创建单元,用于对于所述多个瓦片元数据中的任一个瓦片元数据,创建所述瓦片元数据对应的空白地图瓦片;a creating unit, configured to create a blank map tile corresponding to the tile metadata for any one of the plurality of tile metadata;
确定单元,用于根据所述瓦片元数据中的聚合地理实体的空间矢量数据,确定所述聚合地理实体在所述空白地图瓦片中的位置,所述聚合地理实体为所述瓦片元数据对应的地图瓦片包括的任一地理实体;a determining unit, configured to determine, according to space vector data of the aggregated geographic entity in the tile metadata, a location of the aggregated geographic entity in the blank map tile, where the aggregated geographic entity is the tile element Any geographic entity included in the map tile corresponding to the data;
绘制单元,用于根据所述聚合地理实体在所述空白地图瓦片中的位置,绘制所述聚合地理实体在所述空白地图瓦片中的图标和标注,以得到所述瓦片元数据对应的地图瓦片,所述图标用于指示所述聚合地理实体的类型,所述标注用于指示所述瓦片元数据对应的地图瓦片中包括的地理实体的个数。a drawing unit, configured to draw an icon and an annotation of the aggregated geographic entity in the blank map tile according to a location of the aggregated geographic entity in the blank map tile, to obtain the tile metadata corresponding a map tile, the icon is used to indicate a type of the aggregated geographic entity, and the label is used to indicate the number of geographic entities included in the map tile corresponding to the tile metadata.
可选地,所述绘制单元,具体用于:Optionally, the drawing unit is specifically configured to:
当所述聚合地理实体处于所述空白地图瓦片的边缘位置时,绘制所述聚合地理实体在所述空白地图瓦片中的第一图标,所述第一图标为所述聚合地理实体的图标的一部分;When the aggregated geographic entity is at an edge position of the blank map tile, drawing a first icon of the aggregated geographic entity in the blank map tile, the first icon being an icon of the aggregated geographic entity a part of;
查找与所述空白地图瓦片的边缘位置相邻的地图瓦片;Finding a map tile adjacent to an edge position of the blank map tile;
根据所述聚合地理实体的空间矢量数据,确定所述聚合地理实体在所述相邻的地图瓦片中的位置;Determining, according to space vector data of the aggregated geographic entity, a location of the aggregated geographic entity in the adjacent map tile;
根据所述聚合地理实体在所述相邻的地图瓦片中的位置,在所述相邻的地图瓦片上绘制所述聚合地理实体的第二图标,所述第二图标为所述聚合地理实体的图标的一部分,且所述第二图标和所述第一图标能够构成所述聚合地理实体的完整图标。Mapping a second icon of the aggregated geographic entity on the adjacent map tile according to a location of the aggregated geographic entity in the adjacent map tile, the second icon being the aggregated geographic entity Part of the icon, and the second icon and the first icon can form a complete icon of the aggregated geographic entity.
可选地,所述瓦片矩阵集为与所述目标地理实体所属的一类地理实体对应的瓦片矩阵集。Optionally, the tile matrix set is a tile matrix set corresponding to a type of geographic entity to which the target geographic entity belongs.
第三方面,提供一种地图瓦片更新装置,所述地图瓦片更新装置包括处理器、通信接口、存储器和通信总线;In a third aspect, a map tile update apparatus is provided, the map tile update apparatus comprising a processor, a communication interface, a memory, and a communication bus;
所述处理器、所述通信接口和所述存储器通过所述通信总线完成相互间的通信;The processor, the communication interface, and the memory complete communication with each other through the communication bus;
所述存储器用于存放计算机程序;The memory is for storing a computer program;
所述处理器用于执行存储器上所存放的程序,以实现上述第一方面提供的地图瓦片更新方法。The processor is configured to execute a program stored on the memory to implement the map tile update method provided by the first aspect.
第四方面,提供一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述第一方面提供的地图瓦片更新方法。In a fourth aspect, a computer readable storage medium is provided, the computer readable storage medium storing a computer program, the computer program being executed by the processor to implement the map tile update method provided by the first aspect.
本申请实施例提供的技术方案带来的有益效果是:The beneficial effects brought by the technical solutions provided by the embodiments of the present application are:
在本申请实施例中,当接收到管理员客户端发送的地理实体变更请求时,对目标瓦片元数据进行更新,并将目标瓦片元数据的瓦片状态更新为未阅状态。由于每条瓦片元数据用于描述对应的地图瓦片的信息,且瓦片数据数据的瓦片状态包括已阅状态和未阅状态,未阅状态用于指示瓦片元数据对应的地图瓦片未完成处理,因此,当后续需要对瓦片矩阵集进行更新时,可以仅根据瓦片状态为未阅状态的瓦片元数据对瓦片矩阵集进行更新,避免了通过重新确定的所有地理实体的空间矢量数据来更新每一类地理实体的瓦片矩阵集,可以有效缓解在更新瓦片矩阵集过程中的压力,提高了更新瓦片矩阵集的效率。另外,实时向管理员客户端返回与当前地图分辨率对应的目标地图瓦片,对于管理员客户端而言,当发起地理实体变更请求时,还可以实时显示更新之后的地图,提高了地图的时效性。In the embodiment of the present application, when receiving the geographic entity change request sent by the administrator client, the target tile metadata is updated, and the tile state of the target tile metadata is updated to the unread state. Since each tile metadata is used to describe information of the corresponding map tile, and the tile state of the tile data data includes the read state and the unread state, the unread state is used to indicate the tile corresponding to the tile metadata. The slice is not processed. Therefore, when the tile matrix set needs to be updated later, the tile matrix set can be updated only according to the tile metadata whose tile state is the unread state, and all the geography through re-determination is avoided. The spatial vector data of the entity to update the tile matrix set of each type of geographic entity can effectively alleviate the pressure in updating the tile matrix set and improve the efficiency of updating the tile matrix set. In addition, the target map tile corresponding to the current map resolution is returned to the administrator client in real time. For the administrator client, when the geographic entity change request is initiated, the updated map can be displayed in real time, and the map is improved. Timeliness.
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present application. Other drawings may also be obtained from those of ordinary skill in the art in light of the inventive work.
图1是本申请实施例提供的一种地图瓦片更新方法流程图;FIG. 1 is a flowchart of a method for updating a map tile according to an embodiment of the present application;
图2是本申请实施例提供的另一种地图瓦片更新方法流程图;2 is a flowchart of another method for updating a map tile according to an embodiment of the present application;
图3是本申请实施例提供的一种聚合地理实体的图标划分示意图;3 is a schematic diagram of icon division of an aggregated geographic entity according to an embodiment of the present application;
图4是本申请实施例提供的一种地图瓦片更新装置框图;4 is a block diagram of a map tile updating apparatus according to an embodiment of the present application;
图5是本申请实施例提供的另一种地图瓦片更新装置框图。FIG. 5 is a block diagram of another map tile updating apparatus provided by an embodiment of the present application.
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objects, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
为了后续便于说明,在对本申请实施例提供的地图瓦片更新方法进行详细说明之前,先对本申请实施例涉及的名词进行介绍。For the convenience of the following description, the nouns related to the embodiments of the present application are introduced before the detailed description of the map tile updating method provided by the embodiment of the present application.
地理实体,是指地理数据库中的实体,地理实体可以分为点状实体、线状实体和面状实体。例如,常见的电影院、餐馆和超市等为点状实体,河流和道路等为线状实体,湖泊和海洋等为面状实体。A geographic entity refers to an entity in a geographic database. A geographic entity can be divided into a point entity, a linear entity, and a planar entity. For example, common cinemas, restaurants, and supermarkets are point entities, rivers and roads are linear entities, and lakes and oceans are planar entities.
地图瓦片,是由服务器根据地理实体的空间矢量数据经过分析、提取和渲染而生成的单张图片,一个地图瓦片用于描述该地图瓦片代表的空间位置范围内的一类地理实体。例如,地图瓦片所属的地理实体的类型为摄像头,该地图瓦片的空间位置范围为纬度X1至纬度X2,经度Y1至经度Y2,此时该地图瓦片用于描述空间位置纬度X1至纬度X2,经度Y1至经度Y2内分布的所有的摄像头。A map tile is a single image generated by a server according to analysis, extraction and rendering of spatial vector data of a geographic entity. A map tile is used to describe a type of geographic entity within a spatial location range represented by the map tile. For example, the type of the geographic entity to which the map tile belongs is a camera, and the spatial position of the map tile ranges from latitude X1 to latitude X2, longitude Y1 to longitude Y2, and the map tile is used to describe the spatial position latitude X1 to latitude. X2, all cameras distributed in the longitude Y1 to the longitude Y2.
瓦片矩阵,是指包括多个地图瓦片的一个集合,该瓦片矩阵包括的多个地图瓦片是由服务器在确定了坐标系、切图原点、预设比例级别和单个地图瓦片大小的前提下,根据一类地理实体的空间矢量数据生成的多个地图瓦片。其中,一个瓦片矩阵对应于一个预设比例级别,预设比例级别为服务器中预先设置的比例级别,且预设比例级别和地图分辨率相关。A tile matrix refers to a set including a plurality of map tiles, the tile matrix includes a plurality of map tiles determined by the server, a coordinate system, a cut-off origin, a preset scale level, and a single map tile size. On the premise, multiple map tiles generated from spatial vector data of a class of geographic entities. Wherein, one tile matrix corresponds to a preset scale level, and the preset scale level is a preset scale level in the server, and the preset scale level is related to the map resolution.
瓦片矩阵集,是指包括多个瓦片矩阵的集合,该多个瓦片矩阵包括的所有地图瓦片中仅包含一类地理实体,也即一类地理实体对应于一个瓦片矩阵集,且该多个瓦片矩阵为根据一类地理实体的空间矢量数据按照不同的预设比例级别得到。例如,空间位置内所有的摄像头对应一个瓦片矩阵集,所有的肯德基对应一个瓦片矩阵集。A tile matrix set refers to a set including a plurality of tile matrices, and all map tiles included in the plurality of tile matrices include only one type of geographic entity, that is, one type of geographic entity corresponds to one tile matrix set. And the plurality of tile matrices are obtained according to different preset scale levels according to space vector data of a type of geographic entity. For example, all cameras in a spatial location correspond to a tile matrix set, and all KFCs correspond to a tile matrix set.
电子地图,是指由多类地理实体的地图瓦片经过图层叠加形成的地图。An electronic map refers to a map formed by layer overlays of map tiles of multiple types of geographic entities.
聚合电子地图,是指对于构成该电子地图的每个地图瓦片,该地图瓦片中 仅显示该地图瓦片包括的所有地理实体中的一个地理实体的空间位置,以及该地图瓦片包括的地理实体的个数。The aggregated electronic map refers to, for each map tile constituting the electronic map, only the spatial position of one of the geographic entities included in the map tile is displayed in the map tile, and the map tile includes The number of geographic entities.
聚合地理实体,是指在聚合电子地图的地图瓦片中用于代表该地图瓦片包括的所有地理实体的地理实体。例如,某地图瓦片中包括3个地理实体,此时,可以不用在地图瓦片中分别标出这3个地理实体,直接通过一个聚合地理实体来代表这3个地理实体。An aggregated geographic entity refers to a geographic entity used in a map tile of an aggregated electronic map to represent all of the geographic entities included in the map tile. For example, a map tile includes three geographic entities. In this case, the three geographic entities may not be marked in the map tile, and the three geographic entities are directly represented by an aggregated geographic entity.
聚合数量,是指在聚合电子地图中的地图瓦片包括的所有地理实体的个数。The number of aggregates refers to the number of all geographic entities included in the map tile in the aggregated electronic map.
瓦片元数据,是指用于描述地图瓦片包括的地理实体的数据,一个地图瓦片对应一个瓦片元数据,服务器可以直接根据瓦片元数据包括的信息生成该瓦片元数据对应的地图瓦片。The tile metadata refers to data for describing a geographic entity included in the map tile. One map tile corresponds to one tile metadata, and the server may directly generate corresponding to the tile metadata according to information included in the tile metadata. Map tiles.
瓦片状态,用于指示瓦片元数据的状态,瓦片状态包括已阅状态和未阅状态,其中,已阅状态用于指示服务器已根据瓦片元数据更新了瓦片矩阵集,未阅状态用于指示服务器未根据瓦片元数据更新瓦片矩阵集。a tile state, configured to indicate a state of the tile metadata, the tile state including a read state and a missed state, wherein the read state is used to indicate that the server has updated the tile matrix set according to the tile metadata, not read The status is used to indicate that the server has not updated the tile matrix set based on the tile metadata.
另外,在此对本申请实施例的应用场景也予以介绍。在本申请实施例中,针对多类地理实体中的一类地理实体,服务器确定该类地理实体包括的所有地理实体的空间矢量数据,并生成可以直观表现该类地理实体包括的所有地理实体的空间位置的多个地图瓦片。其中,服务器设置多个预设比例级别,每一个预设比例级别对应于一个地图分辨率,且预设比例级别越高,该预设比例级别对应的地图分辨率越低。对于一类地理实体,服务器在生成一个预设比例级别下的多个地图瓦片时,将该预设比例级别下的多个地图瓦片构成该预设比例级别的瓦片矩阵,当得到该多个预设比例级别的瓦片矩阵时,将该多个预设比例级别的瓦片矩阵构成该类地理实体的瓦片矩阵集。In addition, the application scenarios of the embodiments of the present application are also introduced herein. In the embodiment of the present application, for a type of geographic entity in a plurality of types of geographic entities, the server determines spatial vector data of all geographic entities included in the geographic entity, and generates a visual representation of all geographic entities included in the geographic entity. Multiple map tiles for spatial locations. The server sets a plurality of preset scale levels, each preset scale level corresponds to a map resolution, and the higher the preset scale level, the lower the map resolution corresponding to the preset scale level. For a type of geographic entity, when the server generates a plurality of map tiles at a preset scale level, the plurality of map tiles under the preset scale level constitute a tile matrix of the preset scale level, when the When a plurality of tile levels of a preset scale level are used, the tile matrix of the plurality of preset scale levels constitutes a tile matrix set of the geographic entity.
值得注意的是,服务器预先存储的地图瓦片的像素大小为预设像素大小,也即对于一类地理实体的瓦片矩阵集,该瓦片矩阵集中包括的各个瓦片矩阵中的地图瓦片为像素大小一致的地图瓦片。因此,对于一类地理实体的瓦片矩阵集,假如多个预设比例级别为0到N-1,对于预设比例级别0的瓦片矩阵,相当于将预设比例级别0对应的地图分辨率的电子地图按照预设像素大小进行切割,得到多个大小相同的地图瓦片,该多个大小相同的地图瓦片构成预设比例级别0的瓦片矩阵;对于预设比例级别1的瓦片矩阵,相当于将预设比例级别 0对应的地图分辨率的电子地图按照预设规则将地图分辨率缩小至预设比例级别1对应的地图分辨率,并在缩小后的电子地图中按照预设像素大小进行切割,得到多个大小相同的地图瓦片,该多个大小相同的地图瓦片构成预设比例级别1的瓦片矩阵;…以此类推,直至确定预设比例级别N-1的瓦片矩阵。It is worth noting that the pixel size of the map tile pre-stored by the server is a preset pixel size, that is, a tile matrix set for a class of geographic entities, and the map tiles in each tile matrix included in the tile matrix set. A map tile that is consistent in pixel size. Therefore, for a tile matrix set of a type of geographic entity, if a plurality of preset scale levels are 0 to N-1, for a tile matrix of a preset scale level 0, it is equivalent to distinguishing a map corresponding to the preset scale level 0. The electronic map of the rate is cut according to the preset pixel size to obtain a plurality of map tiles of the same size, and the plurality of map tiles of the same size constitute a tile matrix of a preset scale level 0; The slice matrix is equivalent to reducing the map resolution to the map resolution corresponding to the preset scale level 1 according to the preset rule by using the electronic map of the map resolution corresponding to the preset scale level 0, and according to the preset in the reduced electronic map. The pixel size is cut to obtain a plurality of map tiles of the same size, and the plurality of map tiles of the same size constitute a tile matrix of a preset scale level 1; and so on until the preset scale level N-1 is determined. Tile matrix.
其中,预设规则通常为将每2x2的像素合成为一个像素,由于地图瓦片的像素大小是固定的,而随着预设比例级别的增加,该预设比例级别对应的地图分辨率在减小,因此导致该预设比例级别的瓦片矩阵中包括的地图瓦片的数量在减小,直至预设比例级别N-1的瓦片矩阵中仅包括一个预设像素大小的地图瓦片,因此瓦片矩阵集也称为金字塔瓦片矩阵集。预设像素大小为服务器预先设置的像素大小,通常地,该预设像素大小为256×256。The preset rule is usually to combine every 2x2 pixels into one pixel. Since the pixel size of the map tile is fixed, and the preset scale level increases, the map resolution corresponding to the preset scale level is reduced. Small, so that the number of map tiles included in the tile matrix of the preset scale level is reduced, until the tile matrix of the preset scale level N-1 includes only one map tile of a preset pixel size. The tile matrix set is therefore also referred to as the pyramid tile matrix set. The preset pixel size is a pixel size preset by the server. Generally, the preset pixel size is 256×256.
由此可知,在服务器中存储有多类地理实体的瓦片矩阵集,当用户欲通过用户客户端的电子地图查看某个地理实体时,用户客户端可以直接从服务器中获取该地理实体在当前地图分辨率对应的预设比例级别下的地图瓦片。由于现实生活中地理实体的空间位置可能会发生变化,因此为了保证地图瓦片中地理实体的空间位置和现实生活中地理实体的空间位置尽量一致,当地理实体的空间位置发生变化时,服务器需要对瓦片矩阵集进行更新,而本申请实施例提供的地图瓦片更新方法应用于该服务器对瓦片矩阵集进行更新的场景。It can be seen that the tile matrix set of multiple types of geographic entities is stored in the server. When the user wants to view a certain geographic entity through the electronic map of the user client, the user client can directly obtain the geographic entity from the server on the current map. The map tile under the preset scale level corresponding to the resolution. Since the spatial location of the geographic entity may change in real life, in order to ensure that the spatial location of the geographic entity in the map tile and the spatial location of the geographic entity in real life are as consistent as possible, when the spatial location of the geographic entity changes, the server needs The tile matrix update method is updated, and the map tile update method provided by the embodiment of the present application is applied to a scenario in which the server updates the tile matrix set.
图1为本申请实施例提供的一种地图瓦片更新方法流程图,该地图瓦片更新方法应用于服务器中,如图1所示,该地图瓦片更新方法包括以下步骤。FIG. 1 is a flowchart of a method for updating a map tile according to an embodiment of the present application. The map tile update method is applied to a server. As shown in FIG. 1 , the map tile update method includes the following steps.
步骤101:接收管理员客户端发送的地理实体变更请求,该地理实体变更请求携带目标地理实体的空间矢量数据和当前地图分辨率。Step 101: Receive a geographic entity change request sent by an administrator client, where the geographic entity change request carries space vector data of the target geographic entity and a current map resolution.
在本申请实施例中,当某个地理实体的空间位置发生变化时,管理员客户端可以发送地理实体变更请求,以触发服务器更新相关数据。In the embodiment of the present application, when the spatial location of a geographic entity changes, the administrator client may send a geographic entity change request to trigger the server to update related data.
步骤102:根据该目标地理实体的空间矢量数据,从瓦片矩阵集中确定与该目标地理实体相关的待处理的多个目标地图瓦片。Step 102: Determine, according to the space vector data of the target geographic entity, a plurality of target map tiles to be processed related to the target geographic entity from the tile matrix set.
当服务器接收到该地理实体变更请求时,可以根据该目标地理实体的空间矢量数据,从瓦片矩阵集中确定目标瓦片矩阵集中与该目标地理实体相关的多个目标瓦片矩阵,以便于后续根据该多个目标瓦片矩阵进行相关的操作。When the server receives the geographic entity change request, the server may determine, according to the space vector data of the target geographic entity, a plurality of target tile matrices related to the target geographic entity in the target tile matrix set, so as to facilitate subsequent Correlation operations are performed based on the plurality of target tile matrices.
步骤103:对瓦片元数据表中与该多个目标地图瓦片对应的多个目标瓦片元数据进行更新,将该多个目标瓦片元数据的瓦片状态均更新为未阅状态;其 中,瓦片元数据表中的每条瓦片元数据均对应一个地图瓦片,每条瓦片元数据用于描述对应的地图瓦片的信息,该瓦片状态包括已阅状态和未阅状态,已阅状态用于指示瓦片元数据对应的地图瓦片已完成处理,未阅状态用于指示瓦片元数据对应的地图瓦片未完成处理。Step 103: Update a plurality of target tile metadata corresponding to the plurality of target map tiles in the tile metadata table, and update the tile states of the plurality of target tile metadata to an unread state; Each tile metadata in the tile metadata table corresponds to one map tile, and each tile metadata is used to describe information of a corresponding map tile, and the tile state includes a read state and a missed state. The status, the read status is used to indicate that the map tile corresponding to the tile metadata has been processed, and the unread status is used to indicate that the map tile corresponding to the tile metadata has not been processed.
在本申请实施例中,服务器预设配置有瓦片元数据表,该瓦片元数据表中包括的每个瓦片元数据用于描述对应的地图瓦片的信息,因此服务器可以根据该多个目标地图瓦片,对与该多个目标地图瓦片对应的多个目标瓦片元数据进行更新。In the embodiment of the present application, the server is configured with a tile metadata table, and each tile metadata included in the tile metadata table is used to describe information of the corresponding map tile, so the server may The target map tiles update the plurality of target tile metadata corresponding to the plurality of target map tiles.
另外,由于服务器为每个瓦片元数据配置有瓦片状态,其中,已阅状态用于指示瓦片元数据对应的地图瓦片已完成处理,未阅状态用于指示瓦片元数据对应的地图瓦片未完成处理。In addition, since the server is configured with a tile state for each tile metadata, wherein the read state is used to indicate that the map tile corresponding to the tile metadata has been processed, and the unread state is used to indicate that the tile metadata corresponds to The map tile is not processed.
具体地,在申请实施例中,瓦片元数据对应的地图瓦片已完成处理,是指在更新完瓦片元数据之后,服务器已根据该瓦片元数据对对应的地图瓦片进行了更新。瓦片元数据对应的地图瓦片未完成处理,是指在更新完瓦片元数据之后,服务器尚未根据该瓦片元数据对对应的地图瓦片进行更新。由此可知,在本申请实施例中,瓦片元数据的瓦片状态可以用于指示服务器是否已根据瓦片元数据更新了对应的地图瓦片。Specifically, in the application embodiment, the map tile corresponding to the tile metadata has been processed, and after the tile metadata is updated, the server has updated the corresponding map tile according to the tile metadata. . The uncompleted processing of the map tile corresponding to the tile metadata means that after updating the tile metadata, the server has not updated the corresponding map tile according to the tile metadata. Therefore, in the embodiment of the present application, the tile status of the tile metadata may be used to indicate whether the server has updated the corresponding map tile according to the tile metadata.
因此,当服务器对多个目标瓦片元数据进行更新之后,还需将该多个目标瓦片元对应的瓦片状态更新为未阅状态,以便于后续服务对瓦片矩阵集进行更新时,只需从该瓦片元数据表中分别获取瓦片状态为未阅状态的瓦片元数据,并根据获取到的瓦片元数据对对应的地图瓦片进行处理,避免服务器在下次更新瓦片矩阵集时重复根据该元数据集中的瓦片元数据对瓦片矩阵集进行更新,从而降低了更新瓦片矩阵集的数据处理压力。Therefore, after the server updates the multiple target tile metadata, the tile status corresponding to the multiple target tile elements needs to be updated to the unread state, so that when the subsequent service updates the tile matrix set, The tile metadata of the tile state is not read from the tile metadata table, and the corresponding tile is processed according to the obtained tile metadata to prevent the server from updating the tile next time. The matrix set time repeats updating the tile matrix set according to the tile metadata in the metadata set, thereby reducing the data processing pressure of updating the tile matrix set.
步骤104:对该多个目标地图瓦片中与当前地图分辨率对应的目标地图瓦片进行处理,并将处理后的目标地图瓦片实时发送给管理员客户端。Step 104: Process the target map tile corresponding to the current map resolution of the plurality of target map tiles, and send the processed target map tile to the administrator client in real time.
通过步骤104,可以使管理员客户端在发起地理实体变更请求时,还可以实时接收到处理之后的目标地图瓦片,以便于在当前地图中显示变更之后的地理实体。Through
在本申请实施例中,当接收到管理员客户端发送的地理实体变更请求时,对目标瓦片元数据进行更新,并将目标瓦片元数据的瓦片状态更新为未阅状态。由于每条瓦片元数据用于描述对应的地图瓦片的信息,且瓦片数据数据的 瓦片状态包括已阅状态和未阅状态,未阅状态用于指示瓦片元数据对应的地图瓦片未完成处理,因此,当后续需要对瓦片矩阵集进行更新时,可以仅根据瓦片状态为未阅状态的瓦片元数据对瓦片矩阵集进行更新,避免了通过重新确定的所有地理实体的空间矢量数据来更新每一类地理实体的瓦片矩阵集,可以有效缓解在更新瓦片矩阵集过程中的压力,提高了更新瓦片矩阵集的效率。另外,实时向管理员客户端返回与当前地图分辨率对应的目标地图瓦片,对于管理员客户端而言,当发起地理实体变更请求时,还可以实时显示更新之后的地图,提高了地图的时效性。In the embodiment of the present application, when receiving the geographic entity change request sent by the administrator client, the target tile metadata is updated, and the tile state of the target tile metadata is updated to the unread state. Since each tile metadata is used to describe information of the corresponding map tile, and the tile state of the tile data data includes the read state and the unread state, the unread state is used to indicate the tile corresponding to the tile metadata. The slice is not processed. Therefore, when the tile matrix set needs to be updated later, the tile matrix set can be updated only according to the tile metadata whose tile state is the unread state, and all the geography through re-determination is avoided. The spatial vector data of the entity to update the tile matrix set of each type of geographic entity can effectively alleviate the pressure in updating the tile matrix set and improve the efficiency of updating the tile matrix set. In addition, the target map tile corresponding to the current map resolution is returned to the administrator client in real time. For the administrator client, when the geographic entity change request is initiated, the updated map can be displayed in real time, and the map is improved. Timeliness.
图2为本申请实施例提供的一种地图瓦片更新方法流程图,该地图瓦片更新方法应用于服务器中,该实施例是对上述图1所示的实施例进一步展开说明,如图2所示,该地图瓦片更新方法包括以下步骤。FIG. 2 is a flowchart of a method for updating a map tile according to an embodiment of the present application. The method for updating a map tile is applied to a server. This embodiment further expands the embodiment shown in FIG. 1 , as shown in FIG. 2 . As shown, the map tile update method includes the following steps.
步骤201:接收管理员客户端发送的地理实体变更请求,该地理实体变更请求携带目标地理实体的空间矢量数据和当前地图分辨率。Step 201: Receive a geographic entity change request sent by an administrator client, where the geographic entity change request carries space vector data of the target geographic entity and a current map resolution.
在本申请实施例中,由于现实生活中地理实体的空间位置可能会发生变化,如某街道新增一个电影院,为了保证地图瓦片中地理实体的空间位置和现实生活中地理实体的空间位置尽量一致,管理员可以通过管理员客户端向服务器发送地理实体变更请求,以使服务器对瓦片矩阵集进行更新。当服务器接收到管理员客户端发送的地理实体变更请求时,可以通过执行步骤202至步骤206对该瓦片矩阵集进行更新。In the embodiment of the present application, since the spatial location of the geographic entity may change in real life, such as adding a movie theater in a street, in order to ensure the spatial location of the geographic entity in the map tile and the spatial location of the geographical entity in real life, try to Consistently, the administrator can send a geographic entity change request to the server through the administrator client to enable the server to update the tile matrix set. When the server receives the geographic entity change request sent by the administrator client, the tile matrix set may be updated by performing
其中,管理员客户端发送的地理体变更请求携带目标地理实体的空间矢量数据,该空间矢量数据用于描述该目标地理实体具体的空间位置,通常地理实体的空间矢量数据可以采用该地理实体在空间位置中的经度和纬度表示。The geographic body change request sent by the administrator client carries space vector data of the target geographic entity, where the space vector data is used to describe a specific spatial location of the target geographic entity. Generally, the spatial vector data of the geographic entity may be used by the geographic entity. The longitude and latitude in the spatial position are expressed.
进一步地,由于不同的预设比例级别对应不同的地图分辨率,因此该地理实体变更请求还可以携带当前地图分辨率,以便于服务器根据该当前地图分辨率,确定当前电子地图的预设比例级别。Further, since the different preset scale levels correspond to different map resolutions, the geographic entity change request may further carry the current map resolution, so that the server determines the preset scale level of the current electronic map according to the current map resolution. .
另外,目标地理实体为待变更空间位置的地理实体,由于地理实体的空间位置发生变化可能包括三种情况:在该空间位置处添加地理实体、将该空间位置处的地理实体删除、或者将一个地理实体替换为其他地理实体。因此,该地理实体变更请求包括地理实体添加请求、地理实体删除请求或者地理实体更新请求。In addition, the target geographic entity is a geographic entity whose spatial location is to be changed. The spatial location of the geographic entity may change due to three situations: adding a geographic entity at the spatial location, deleting the geographic entity at the spatial location, or placing a The geographic entity is replaced with another geographic entity. Therefore, the geographic entity change request includes a geographic entity addition request, a geographic entity deletion request, or a geographic entity update request.
其中,地理实体添加请求用于指示在该空间位置处添加一个目标地理实体,地理实体删除请求用于指示将该空间位置处的目标地理实体删除,地理实体更新请求用于指示将第一地理实体替换为第二地理实体。特别地,当地理实体变更请求为地理实体更新请求时,该地理实体更新请求中携带的目标地理实体的空间矢量数据包括第一地理实体的空间矢量数据和第二地理实体的空间矢量数据。其中,第一地理实体为变更前的地理实体,第二地理实体为变更后的地理实体。Wherein the geographic entity addition request is used to indicate that a target geographic entity is added at the spatial location, the geographic entity deletion request is used to indicate that the target geographic entity at the spatial location is deleted, and the geographic entity update request is used to indicate that the first geographic entity is to be Replace with the second geographic entity. Specifically, when the geographic entity change request is a geographic entity update request, the space vector data of the target geographic entity carried in the geographic entity update request includes space vector data of the first geographic entity and spatial vector data of the second geographic entity. The first geographic entity is a geographical entity before the change, and the second geographic entity is a changed geographic entity.
另外,服务器可以不对空间范围内的地理实体进行分类,仅仅设置一个瓦片矩阵集,此时该瓦片矩阵集中的地图瓦片包括一定空间范围内的所有地理实体。可选地,为了提高服务器处理数据的速率,服务器可以针对不同类型的地理实体设置不同的瓦片矩阵集,此时上述瓦片矩阵集为与该目标地理实体所属的一类地理实体对应的瓦片矩阵集。In addition, the server may not classify the geographic entities in the spatial scope, and only set one tile matrix set. At this time, the map tiles in the tile matrix set include all geographic entities in a certain spatial range. Optionally, in order to increase the rate at which the server processes data, the server may set different tile matrix sets for different types of geographic entities, where the tile matrix set is a tile corresponding to a type of geographic entity to which the target geographic entity belongs. Slice matrix set.
特别地,当服务器针对不同类型的地理实体设置不同的瓦片矩阵集时,该地理实体变更请求还携带该目标地理实体的标识,以便于服务器根据该目标地理实体的标识,确定该目标地理实体所属的一类地理实体的瓦片矩阵集。Specifically, when the server sets different sets of tile matrices for different types of geographic entities, the geographic entity change request further carries an identifier of the target geographic entity, so that the server determines the target geographic entity according to the identifier of the target geographic entity. A set of tile matrices of a class of geographic entities to which it belongs.
步骤202:根据目标地理实体的空间矢量数据,从瓦片矩阵集中确定与目标地理实体相关的待处理的多个目标地图瓦片。Step 202: Determine, from the tile matrix set, a plurality of target map tiles to be processed related to the target geographic entity according to the spatial vector data of the target geographic entity.
具体地,当服务器接收到地理实体变更请求时,对于瓦片矩阵集中的任一个瓦片矩阵,由于该瓦片矩阵中包括的多个地图瓦片中的每个地图瓦片都有对应的空间位置范围,因此服务器可以直接根据该目标地理实体的空间矢量数据,从该瓦片矩阵中查找空间位置范围包括该空间矢量数据的地图瓦片,并将查找到的地图瓦片确定为该瓦片矩阵中对应的目标地图瓦片;当服务器确定该瓦片矩阵集中每个瓦片矩阵对应的目标地图瓦片时,也即确定得到多个目标地图瓦片。Specifically, when the server receives the geographic entity change request, for each tile matrix in the tile matrix set, each map tile in the plurality of map tiles included in the tile matrix has a corresponding space. a range of locations, so the server can directly search for a map tile of the spatial location range including the spatial vector data from the tile matrix according to the spatial vector data of the target geographic entity, and determine the found map tile as the tile. Corresponding target map tiles in the matrix; when the server determines the target map tiles corresponding to each tile matrix in the tile matrix set, that is, multiple target map tiles are determined.
另外,为了减少服务器在生成地图瓦片过程中的处理压力,本申请实施例中的电子地图可以为聚合电子地图,也即对于每个地图瓦片,当该地图瓦片中包括的地理实体的个数大于1时,服务器仅采用其中一个地理实体代表该地图瓦片中包括的所有地理实体,该其中一个地理实体称为聚合地理实体,由于一个瓦片元数据对应于一个地图瓦片,因此该聚合地理实体也为瓦片元数据对应的地图瓦片包括的任一地理实体。另外,为了表明该地图瓦片中地理实体的个数,该地图瓦片中还包括聚合数量,该聚合数量用于指示该地图瓦片中包括的 地理实体的个数。In addition, in order to reduce the processing pressure of the server in the process of generating the map tile, the electronic map in the embodiment of the present application may be an aggregated electronic map, that is, for each map tile, when the geographic entity included in the map tile When the number is greater than 1, the server uses only one of the geographic entities to represent all the geographic entities included in the map tile, and one of the geographic entities is called an aggregated geographic entity, since one tile metadata corresponds to one map tile, The aggregated geographic entity is also any geographic entity included in the map tile corresponding to the tile metadata. In addition, in order to indicate the number of geographic entities in the map tile, the map tile further includes an aggregation quantity, which is used to indicate the number of geographic entities included in the map tile.
为了后续便于说明,在此先对瓦片元数据进行详细的介绍。For the convenience of the description, the tile metadata is first introduced in detail.
在第一种可能的实现方式中,当瓦片矩阵集中的地图瓦片为聚合类型的地图瓦片时,每个瓦片元数据包括对应的地图瓦片的标识、对应的地图瓦片所属的比例级别、对应的地图瓦片中的聚合地理实体的空间矢量数据、聚合数量以及瓦片状态。In a first possible implementation manner, when the map tile in the tile matrix set is an aggregate type of map tile, each tile metadata includes an identifier of the corresponding map tile, and the corresponding map tile belongs to The scale level, the spatial vector data of the aggregated geographic entities in the corresponding map tile, the number of aggregates, and the tile state.
具体地,瓦片元数据包括瓦片元数据的标识、聚合数量、地图瓦片行号、地图瓦片列号、聚合地理实体的经度和纬度以及比例级别等。其中,瓦片元数据的标识用于唯一标识该瓦片元数据,为了便于服务器查找每个地图瓦片的瓦片元数据,服务器可以将每个地图瓦片的标识作为该地图瓦片的瓦片元数据的标识;地图瓦片行号和地图瓦片列号为地图瓦片在所属的瓦片矩阵中的行号和列号,且地图瓦片行号和地图瓦片列号为服务器在生成该地图瓦片时根据全图地理范围、切片方向、切片原点和比例级别确定。Specifically, the tile metadata includes an identifier of the tile metadata, an aggregated number, a map tile line number, a map tile column number, a longitude and latitude of the aggregated geographic entity, and a scale level. The identifier of the tile metadata is used to uniquely identify the tile metadata. To facilitate the server to find the tile metadata of each map tile, the server may use the identifier of each map tile as the tile of the map tile. The identifier of the slice metadata; the map tile row number and the map tile column number are the row number and the column number of the map tile in the tile matrix to which it belongs, and the map tile row number and the map tile column number are the server The map tile is generated based on the full map geographic extent, slice orientation, slice origin, and scale level.
另外,为了清楚表明瓦片元数据中的地理实体的类型,该瓦片元数据还可以包括实体类型,该实体类型用于指示瓦片元数据中的地理实体的类型。Additionally, to clearly indicate the type of geographic entity in the tile metadata, the tile metadata may also include an entity type that is used to indicate the type of geographic entity in the tile metadata.
例如,表1为本申请实施例提供的一种瓦片元数据,该瓦片元数据包括的上述信息采用字段表示,该瓦片元数据包括的各个字段以及对该各个字段的说明详见表1。其中,字段“标识”为该瓦片元数据的标识,由于瓦片元数据的标识即为该瓦片元数据对应的地图瓦片的标识,因此字段“标识”用于指示该瓦片元数据对应的地图瓦片的标识,且字段“标识”的字段类型为数字;字段“类型”用于指示该瓦片元数据中的地理实体所属的类型,该字段“类型”的字段类型为32位字符;字段“标注”用于指示当该瓦片元数据中包括的地理实体的数量大于1时,在该瓦片元数据对应的地图瓦片上生成的标注,字段“标注”的字段类型为512位字符;字段“比例级别”用于指示该瓦片元数据对应的地图瓦片所属的瓦片矩阵的比例级别,字段“比例级别”的字段类型为16位字符;字段“列号”和字段“行号”分别用于指示该瓦片元数据对应的地图瓦片在所属的瓦片矩阵的列号和行号,字段“列号”和字段“行号”的字段类型均为16位字符;字段“聚合数量”用于指示该瓦片元数据对应的地图瓦片中包括的地理实体的个数,字段“聚合数量”的字段类型为数字;字段“经度”和字段“纬度”分别用于指示该瓦片元数据中的聚合地理实体的经度和纬度,字段“经度”和字段“纬度”的字段类型均为数字。For example, Table 1 is a tile metadata provided by an embodiment of the present application. The foregoing information included in the tile metadata is represented by a field, and each field included in the tile metadata and a description of the respective field are shown in the table. 1. The field “identification” is an identifier of the tile metadata, and the identifier of the tile metadata is an identifier of the map tile corresponding to the tile metadata, so the field “identity” is used to indicate the tile metadata. The identifier of the corresponding map tile, and the field type of the field "identification" is a number; the field "type" is used to indicate the type of the geographic entity in the tile metadata, and the field type of the field "type" is 32 bits. The character "label" is used to indicate the label generated on the map tile corresponding to the tile metadata when the number of geographic entities included in the tile metadata is greater than 1, and the field type of the field "label" is 512. Bit character; the field "proportion level" is used to indicate the scale level of the tile matrix to which the map tile corresponding to the tile metadata belongs, the field type of the field "proportion level" is 16 characters; the field "column number" and the field The "line number" is used to indicate the column number and the line number of the tile tile corresponding to the tile metadata in the tile matrix to which the tile metadata belongs, and the field types of the column "column number" and the field "row number". 16-bit character; the field "aggregate quantity" is used to indicate the number of geographic entities included in the map tile corresponding to the tile metadata, the field type of the field "aggregate quantity" is a number; the field "longitude" and the field "latitude" "Used to indicate the longitude and latitude of the aggregated geographic entity in the tile metadata, respectively, and the field types of the field "longitude" and the field "latitude" are numbers.
表1Table 1
在第二种可能的实现方式中,当瓦片矩阵集中的地图瓦片为非聚合类型的地图瓦片时,每个瓦片元数据包括对应的地图瓦片的标识、对应的地图瓦片所属的比例级别、对应的地图瓦片中的包括的每个地理实体的空间矢量数据,每个地理实体的标识以及瓦片状态。In a second possible implementation manner, when the map tile in the tile matrix set is a non-aggregated type map tile, each tile metadata includes an identifier of the corresponding map tile, and the corresponding map tile belongs to The scale level, the spatial vector data of each geographic entity included in the corresponding map tile, the identity of each geographic entity, and the tile status.
此时,瓦片元数据表包括的信息和上述第一种可能的实现方式中的瓦片元数据包括的信息基本相同,不同之处在于,此时瓦片元数据中记录有对应的地图瓦片包括的所有地理实体的标识和所有地理实体的空间矢量数据,而不仅仅是其中一个聚合地理实体的空间矢量数据。At this time, the information included in the tile metadata table is substantially the same as the information included in the tile metadata in the first possible implementation manner, except that the corresponding tile is recorded in the tile metadata. The identity of all geographic entities included in the slice and the spatial vector data of all geographic entities, not just the spatial vector data of one of the aggregated geographic entities.
另外,在本申请实施例中,当服务器预先为不同类型的地理实体设置不同的瓦片矩阵集时,为了便于服务器对不同类型的地理实体的地图瓦片的瓦片元数据进行管理,对于一类地理实体的瓦片元数据,服务器将该一类地理实体的瓦片元数据存储在一个瓦片元数据表中,也即将一类地理实体的地图瓦片的瓦片元数据存储在一个瓦片元数据表中。In addition, in the embodiment of the present application, when the server sets different tile matrix sets for different types of geographic entities in advance, in order to facilitate the server to manage the tile metadata of the map tiles of different types of geographic entities, The tile metadata of a class of geographic entities, the server stores the tile metadata of a class of geographic entities in a tile metadata table, and also stores the tile metadata of the map tiles of a class of geographic entities in a tile. In the slice metadata table.
进一步地,服务器还为瓦片元数据配置了瓦片状态,该瓦片状态包括已阅状态和未阅状态,以此便于服务器在更新瓦片矩阵集时仅对瓦片状态为未阅状 态的瓦片元数据的地图瓦片进行更新。特别地,每个瓦片元数据的瓦片状态也可以用字符表示,例如,在本申请实施例中,瓦片状态仅用1位字符表示,如采用0和1表示瓦片状态,其中字符0用于指示当前瓦片元数据没有发生变化,无需重新生成地图瓦片,也即字符0代表已阅状态;字符1用于指示当前瓦片元数据发生了变化,需要重新生成地图瓦片,也即字符1代表未阅状态。Further, the server further configures a tile state for the tile metadata, the tile state includes the read state and the unread state, so that the server only needs to update the tile matrix set to the tile state as the unread state. The map tiles of the tile metadata are updated. In particular, the tile state of each tile metadata may also be represented by a character. For example, in the embodiment of the present application, the tile state is represented by only one-bit character, such as 0 and 1 indicating a tile state, where characters 0 is used to indicate that the current tile metadata has not changed, and the map tile does not need to be regenerated, that is, the character 0 represents the read state; the character 1 is used to indicate that the current tile metadata has changed, and the map tile needs to be regenerated. That is, the character 1 represents the unread state.
值得注意的是,当该瓦片元数据中不包括任何地理实体时,该瓦片状态还可以标记为字符-1,也即字符-1用于指示当管理员客户端或用户客户端获取该瓦片元数据的地图瓦片时,由于该地图瓦片中不包括任何地理实体,服务器可以以透明图片替代该地图瓦片,并向管理员客户端或用户客户端发送该透明图片。It should be noted that when any geographic entity is not included in the tile metadata, the tile state may also be marked as a character-1, that is, the character-1 is used to indicate that the administrator client or the user client obtains the When the map tile of the tile metadata is included, since the map tile does not include any geographic entity, the server may replace the map tile with a transparent image and send the transparent picture to the administrator client or the user client.
因此,当服务器接收到地理实体变更请求时,为了实现对瓦片矩阵集进行更新,服务器需要先对该地理实体变更请求携带的目标地理实体的空间矢量数据对应的地图瓦片的瓦片元数据进行更新,又由于瓦片元数据的标识为该瓦片元数据对应的地图瓦片的标识,因此服务器在对瓦片元数据进行更新之前,需先通过上述步骤202确定目标地理实体的空间矢量数据对应的地图瓦片。Therefore, when the server receives the geographic entity change request, in order to update the tile matrix set, the server needs to first update the tile metadata of the map tile corresponding to the space vector data of the target geographic entity carried by the geographic entity change request. The update is performed, and since the identifier of the tile metadata is the identifier of the map tile corresponding to the tile metadata, the server needs to determine the space vector of the target geographic entity by using the
步骤203:对瓦片元数据表中与该多个目标地图瓦片对应的多个目标瓦片元数据进行更新,将该多个目标瓦片元数据的瓦片状态均更新为未阅状态。Step 203: Update a plurality of target tile metadata corresponding to the plurality of target map tiles in the tile metadata table, and update the tile states of the plurality of target tile metadata to an unread state.
在服务器确定该多个目标地图瓦片之后,然后根据该多个目标地图瓦片的标识,从瓦片元数据表中,选择标识为该多个目标地图瓦片的标识的瓦片元数据,得到多个目标瓦片元数据,并对该多个目标瓦片元数据进行更新。After the server determines the plurality of target map tiles, and then, according to the identifiers of the plurality of target map tiles, selecting tile metadata identifying the identifiers of the plurality of target map tiles from the tile metadata table, A plurality of target tile metadata is obtained, and the plurality of target tile metadata is updated.
由于本申请实施例提供的地图瓦片可以为聚合类型的地图瓦片,也可以为非聚合类型的地图瓦片,由步骤202可知,不同类型的地图瓦片对应的瓦片元数据中的信息也不同,因此步骤203可以分以下两种场景分别说明:The map tile provided by the embodiment of the present application may be a map tile of an aggregation type or a map tile of a non-aggregation type. The information in the tile metadata corresponding to different types of map tiles may be known from
第一种场景:瓦片矩阵集中的地图瓦片为非聚合类型的地图瓦片。The first scenario: the map tiles in the tile matrix set are non-aggregated type map tiles.
由于地理实体变更请求包括地理实体添加请求、地理实体删除请求或地理实体更新请求,因此,在第一种场景中,服务器对该多个目标瓦片元数据进行更新可以分为以下三种情况:Since the geographic entity change request includes a geographic entity addition request, a geographic entity deletion request, or a geographic entity update request, in the first scenario, the server may update the plurality of target tile metadata into the following three cases:
(1)当地理实体变更请求为地理实体添加请求时,在每个目标瓦片元数据中增加该目标地理实体的标识和该目标地理实体的空间矢量数据。(1) When the geographic entity change request adds a request to the geographic entity, the identifier of the target geographic entity and the space vector data of the target geographic entity are added in each target tile metadata.
由于每个目标瓦片元数据包括对应的地图瓦片包括的每个地理实体的空间矢量数据和每个地理实体的标识,因此,当地理实体变更请求为地理实体添 加请求时,需将该目标地理实体的空间矢量数据添加至每个目标瓦片元数据中。Since each target tile metadata includes space vector data of each geographic entity included in the corresponding map tile and an identifier of each geographic entity, when the geographic entity change request adds a request for the geographic entity, the target needs to be The spatial vector data of the geographic entity is added to each target tile metadata.
另外,对于非聚合类型的地图瓦片,该地图瓦片中可能包括多个地理实体,此时还需将该目标地理实体的标识添加至每个目标瓦片元数据中。In addition, for a non-aggregated type of map tile, the map tile may include multiple geographic entities, and the identifier of the target geographic entity needs to be added to each target tile metadata.
(2)当该地理实体变更请求为地理实体删除请求时,在每个目标瓦片元数据中增加该目标地理实体的标识和该目标地理实体的空间矢量数据。(2) When the geographic entity change request is a geographic entity deletion request, the identifier of the target geographic entity and the space vector data of the target geographic entity are added in each target tile metadata.
由于每个目标瓦片元数据包括对应的地图瓦片包括的每个地理实体的空间矢量数据,因此,当地理实体变更请求为地理实体删除请求时,需将该目标地理实体的空间矢量数据从该每个目标瓦片元数据中删除。Since each target tile metadata includes space vector data of each geographic entity included in the corresponding map tile, when the geographic entity change request is a geographic entity deletion request, the space vector data of the target geographic entity needs to be The target tile metadata is deleted in each.
同样地,此时还需将该目标地理实体的标识从每个目标瓦片元数据中删除。Similarly, the identity of the target geographic entity needs to be removed from each target tile metadata at this time.
(3)当该地理实体变更请求为地理实体更新请求时,基于该目标地理实体包括的第一地理实体和第二地理实体,在第一地理实体对应的每个目标地图瓦片的目标瓦片元数据中删除第一地理实体的标识和第一地理实体的空间矢量数据,并在第二地理实体对应的每个目标地图瓦片的目标瓦片元数据中增加第二地理实体的标识和第二地理实体的空间矢量数据,该第一地理实体为变更前的地理实体,该第二地理实体为变更后的地理实体。(3) when the geographic entity change request is a geographic entity update request, based on the first geographic entity and the second geographic entity included in the target geographic entity, the target tile of each target map tile corresponding to the first geographic entity Deleting the identifier of the first geographic entity and the space vector data of the first geographic entity in the metadata, and adding the identifier and the second geographic entity to the target tile metadata of each target map tile corresponding to the second geographic entity The spatial vector data of the geographic entity, the first geographic entity is a pre-change geographic entity, and the second geographic entity is a changed geographic entity.
当该地理实体变更请求为地理实体更新请求时,相当于对该第一地理实体执行上述第一种场景中的(1)中的步骤,对该第二地理实体执行上述第一种场景中的(2)中的步骤,在此不再详细说明。When the geographic entity change request is a geographic entity update request, the step of (1) in the foregoing first scenario is performed on the first geographic entity, and the second geographic entity is executed in the first scenario. The steps in (2) are not described in detail here.
第二种场景:瓦片矩阵集中的地图瓦片为聚合类型的地图瓦片。The second scenario: the map tile in the tile matrix set is an aggregate type of map tile.
同样地,由于地理实体变更请求包括地理实体添加请求、地理实体删除请求或地理实体更新请求,因此,在第二种场景中,服务器对该多个目标瓦片元数据进行更新也可以分为以下三种情况:Similarly, since the geographic entity change request includes a geographic entity addition request, a geographic entity deletion request, or a geographic entity update request, in the second scenario, the server may further update the multiple target tile metadata into the following. three situations:
(1)当地理实体变更请求为地理实体添加请求时,增加每个目标瓦片元数据包括的聚合数量。(1) When a geographic entity change request adds a request to a geographic entity, the number of aggregates included in each target tile metadata is increased.
当地理实体变更请求为地理实体添加请求时,该地理实体添加请求用于指示在该多个目标地图瓦片中添加该目标地理实体,对于该多个目标地图瓦片中的任一个目标地图瓦片,增加该目标地图瓦片对应的目标瓦片元数据包括的聚合数量。特别地,在增加该目标瓦片元数据包括的聚合数量之前,如果该目标瓦片元数据包括的地理实体的个数为0,在增加该目标瓦片元数据包括的聚合 数量之后,还可以将该目标地理实体的空间矢量数据作为该目标瓦片元数据中的聚合地理实体的空间矢量数据,也即,将该目标地理实体的经度和纬度作为该目标瓦片元数据中的聚合地理实体的经度和纬度。When the geographic entity change request adds a request to the geographic entity, the geographic entity add request is used to indicate that the target geographic entity is added to the multiple target map tiles, and any one of the multiple target map tiles is targeted The slice increases the number of aggregates included in the target tile metadata corresponding to the target map tile. In particular, before increasing the number of aggregations included in the target tile metadata, if the number of geographic entities included in the target tile metadata is 0, after increasing the number of aggregations included in the target tile metadata, The space vector data of the target geographic entity is used as the spatial vector data of the aggregated geographic entity in the target tile metadata, that is, the longitude and latitude of the target geographic entity are used as the aggregated geographic entity in the target tile metadata. Longitude and latitude.
例如,当地理实体变更请求为地理实体添加请求,且目标瓦片元数据中的聚合数量为1时,直接将目标瓦片元数据包括的聚合数量加1,以实现在该目标瓦片元数据中添加该目标地理实体。For example, when the geographic entity change request adds a request to the geographic entity, and the aggregate quantity in the target tile metadata is 1, the number of aggregates included in the target tile metadata is directly increased by 1 to implement the target tile metadata. Add the target geographic entity.
需要说明的是,在本申请实施例中,当增加每个目标瓦片元数据包括的聚合数量时,每增加一个地理实体时,该聚合数量可以增加1,当然,也可以增加2、3等等,只需每个目标瓦片元数据按照同样的标准即可。It should be noted that, in the embodiment of the present application, when the number of aggregations included in each target tile metadata is increased, the number of aggregations may be increased by one for each additional geographic entity, and of course, 2, 3, etc. may be added. Etc. Just follow the same criteria for each target tile metadata.
(2)当该地理实体变更请求为地理实体删除请求时,减少每个目标瓦片元数据包括的聚合数量。(2) When the geographic entity change request is a geographic entity deletion request, the number of aggregates included in each target tile metadata is reduced.
当该地理实体变更请求为地理实体删除请求时,该地理实体删除请求用于指示在该多个目标地图瓦片中删除该目标地理实体,对于该多个目标地图瓦片中的任一个目标地图瓦片,减少该目标地图瓦片对应的目标瓦片元数据包括的聚合数量。特别地,在减少该目标瓦片元数据包括的聚合数量之后,如果该目标瓦片元数据包括的地理实体的个数为0,此时,还需将该目标瓦片元数据中的聚合地理实体的空间矢量数据删除,也即,将该目标瓦片元数据中的聚合地理实体的经度和纬度的相关数据删除,也即该目标瓦片元数据中将不包括任何地理实体。When the geographic entity change request is a geographic entity deletion request, the geographic entity deletion request is used to indicate that the target geographic entity is deleted in the multiple target map tiles, for any one of the multiple target map tiles Tile, which reduces the number of aggregates included in the target tile metadata corresponding to the target map tile. Specifically, after reducing the number of aggregations included in the target tile metadata, if the number of geographic entities included in the target tile metadata is 0, at this time, the aggregated geography in the target tile metadata is also required. The space vector data of the entity is deleted, that is, the related data of the longitude and latitude of the aggregated geographic entity in the target tile metadata is deleted, that is, the target tile metadata will not include any geographic entity.
另外需要说明的是,当该目标瓦片元数据包括的聚合地理实体的空间矢量数据为该目标地理实体的空间矢量数据时,在将该目标瓦片元数据包括的聚合数量减少之后,还可以从该目标瓦片元数据包括的其他地理实体中随机选择一个地理实体,并将选择的地理实体的空间矢量数据作为该目标瓦片元数据中的聚合地理实体的空间矢量数据。In addition, when the space vector data of the aggregated geographic entity included in the target tile metadata is the space vector data of the target geographic entity, after the number of aggregates included in the target tile metadata is reduced, A geographic entity is randomly selected from other geographic entities included in the target tile metadata, and spatial vector data of the selected geographic entity is used as spatial vector data of the aggregated geographic entity in the target tile metadata.
其中,确定该瓦片元数据包括的其他地理实体的空间矢量数据可以为:确定该目标瓦片元数据的目标地图瓦片,并确定该目标地图瓦片的空间位置范围,在预设比例级别小于该目标地图瓦片的预设比例级别的瓦片矩阵中,查找空间位置范围包含于该目标地图瓦片的空间位置范围的地图瓦片,并从查找到的地图瓦片中选择仅包括该其他地理实体中的一个地理实体的地图瓦片;将选择的地图瓦片的瓦片元数据包括的聚合地理实体的空间矢量数据确定为该其他地理实体中的一个地理实体的空间矢量数据。The space vector data of the other geographic entities included in the tile metadata may be: determining a target map tile of the target tile metadata, and determining a spatial location range of the target map tile, at a preset scale level. In a tile matrix that is smaller than a preset scale level of the target map tile, the search space location range includes a map tile of a spatial location range of the target map tile, and selects only the selected map tile from the selected map tile. A map tile of one of the other geographic entities; the spatial vector data of the aggregated geographic entity included in the tile metadata of the selected map tile is determined as the spatial vector data of one of the other geographic entities.
需要说明的是,在本申请实施例中,当减少每个目标瓦片元数据包括的聚合数量时,每减少一个地理实体时,该聚合数量可以减少1,当然,也可以减少2、3等等,只需每个目标瓦片元数据按照同样的标准即可。It should be noted that, in the embodiment of the present application, when the number of aggregations included in each target tile metadata is reduced, the number of aggregations may be reduced by one for each geographic entity reduced, and of course, 2, 3, etc. may be reduced. Etc. Just follow the same criteria for each target tile metadata.
(3)当地理实体变更请求为地理实体更新请求时,基于第一地理实体和第一地理实体标识,减少第一地理实体对应的每个目标地图瓦片的目标瓦片元数据包括的聚合数量,并增加第二地理实体对应的每个目标地图瓦片的目标瓦片元数据包括的聚合数量。(3) when the geographic entity change request is a geographic entity update request, reducing the aggregate quantity of the target tile metadata of each target map tile corresponding to the first geographic entity based on the first geographic entity and the first geographic entity identifier And increasing the number of aggregates included in the target tile metadata of each target map tile corresponding to the second geographic entity.
当地理实体变更请求为地理实体更新请求时,对于第一地理实体,按照步骤202中确定目标地理实体对应的多个目标地图瓦片的方法,确定该第一地理实体对应的多个目标地图瓦片,并根据该第一地理实体对应的多个目标地图瓦片的标识,按照上述第二种场景中(2)步骤,对该第一地理实体对应的多个目标地图瓦片的瓦片元数据进行更新。对于第二地理实体,按照步骤202中确定目标地理实体对应的多个目标地图瓦片的方法,确定该第二地理实体对应的多个目标地图瓦片,并根据该第二地理实体对应的多个目标地图瓦片的标识,按照上述第二种场景中的(1)步骤,对该第二地理实体对应的多个目标地图瓦片的瓦片元数据进行更新。When the geographic entity change request is a geographic entity update request, for the first geographic entity, determining a plurality of target map tiles corresponding to the first geographic entity according to the method for determining a plurality of target map tiles corresponding to the target geographic entity in step 202 a tile element, and according to the identifiers of the plurality of target map tiles corresponding to the first geographic entity, according to step (2) of the second scenario, the tile elements of the plurality of target map tiles corresponding to the first geographic entity The data is updated. For the second geographic entity, the plurality of target map tiles corresponding to the second geographic entity are determined according to the method for determining the plurality of target map tiles corresponding to the target geographic entity in
值得注意的是,在本申请实施例中,为了提高后续处理数据的便捷性,对于一定空间范围,无论该空间范围内是否存在地理实体,瓦片矩阵集中均存在与该空间范围内对应的地图瓦片,并对每个地图瓦片设置有对应的瓦片元数据。It should be noted that, in the embodiment of the present application, in order to improve the convenience of subsequent processing data, for a certain spatial range, regardless of whether a geographic entity exists in the spatial extent, a map corresponding to the spatial extent exists in the tile matrix set. Tiles, and corresponding tile metadata is set for each map tile.
当然,服务器也可以仅仅在该空间范围内存在地理实体时,设置与该空间范围内对应的地图瓦片和对应的瓦片元数据。此时,在根据该多个目标地图瓦片,对瓦片元数据表中的多个目标瓦片元数据进行更新之前,还可能存在以下两种情况:Of course, the server may also set the map tiles and the corresponding tile metadata corresponding to the spatial extent only when the geographic entity exists in the spatial extent. At this time, before updating the plurality of target tile metadata in the tile metadata table according to the plurality of target map tiles, the following two cases may exist:
第一种情况,当确定不存在与该目标地理实体相关的待处理的多个目标地图瓦片时,生成多个空白瓦片元数据,将该多个空白瓦片元数据作为该多个目标瓦片元数据。In the first case, when it is determined that there are no target map tiles to be processed related to the target geographic entity, multiple blank tile metadata is generated, and the multiple blank tile metadata is used as the multiple targets. Tile metadata.
也即,当前该瓦片矩阵集中不存在该目标地理实体所在的空间范围内的地图瓦片,此时为了后续便于生成对应的地图瓦片,需先生成多个空白瓦片元数据,以根据该地理实体变更请求,对该多个空白瓦片元数据进行更新。That is, the map tile in the spatial extent of the target geographic entity does not exist in the current tile matrix set. In this case, in order to facilitate the subsequent generation of the corresponding map tile, a plurality of blank tile metadata are required to be The geographic entity change request updates the plurality of blank tile metadata.
第二种情况,当确定存在与该目标地理实体相关的待处理的多个目标地图 瓦片时,从该瓦片元数据表中查找是否存在与该多个目标地图瓦片对应的多个目标瓦片元数据,当不存在与该多个目标地图瓦片对应的多个目标瓦片元数据时,生成与该多个目标地图瓦片对应的多个空白瓦片元数据,将该多个空白瓦片元数据作为该多个目标瓦片元数据。In the second case, when it is determined that there are multiple target map tiles to be processed related to the target geographic entity, it is found from the tile metadata table whether there are multiple targets corresponding to the multiple target map tiles. Tile metadata, when there is no plurality of target tile metadata corresponding to the plurality of target map tiles, generating a plurality of blank tile metadata corresponding to the plurality of target map tiles, the plurality of Blank tile metadata is used as the plurality of target tile metadata.
在第二种情况中,在存在该多个目标地图瓦片的情况下,该瓦片元数据表中可能不存在对应的瓦片元数据,此时同样需先生成多个空白瓦片元数据,以根据该地理实体变更请求,对该多个空白瓦片元数据进行更新。In the second case, in the case where the plurality of target map tiles exist, corresponding tile metadata may not exist in the tile metadata table, and at the same time, a plurality of blank tile metadata is also required to be formed. And updating the plurality of blank tile metadata according to the geographic entity change request.
在本申请实施例中,当服务器根据管理员客户端发送的地理实体变更请求对瓦片元数据进行更新之后,此时更新后的瓦片元数据的瓦片状态为未阅状态,因此服务器可以根据该瓦片状态为未阅状态的瓦片元数据更新瓦片矩阵集。具体地,服务器可以通过下述步骤204至步骤206对瓦片矩阵集进行更新。In the embodiment of the present application, after the server updates the tile metadata according to the geographic entity change request sent by the administrator client, the tile state of the updated tile metadata is the unread state, so the server may The tile matrix set is updated according to the tile metadata whose tile state is the unread state. Specifically, the server may update the tile matrix set by the following
另外,在本申请实施例中,当管理员客户端发送地理实体变更请求时,为了使管理员可以通过管理员客户端实时看到更改后的电子地图,服务器在对多个目标瓦片元数据进行更新之后,还可以通过下述步骤207向管理员客户端返回更新后的地图瓦片,该更新后的地图瓦片为服务器根据该地理实体变更请求重新生成的预设比例级别的地图瓦片,该预设比例级别为该管理员客户端的当前地图分辨率对应的预设比例级别。In addition, in the embodiment of the present application, when the administrator client sends the geographic entity change request, the server is in the target tile metadata for the administrator to view the changed electronic map in real time through the administrator client. After the update is performed, the updated map tile may also be returned to the administrator client by using the following
步骤204:从瓦片元数据表中分别获取瓦片状态为未阅状态的瓦片元数据,得到多个瓦片元数据。Step 204: Obtain tile metadata of the tile state as an unread state from the tile metadata table to obtain a plurality of tile metadata.
由于瓦片元数据的瓦片状态可以用来指示该瓦片元数据是否发生变化且服务器是否已根据该瓦片元数据更新该瓦片元数据的地图瓦片,因此服务器可以直接获取瓦片状态为未阅状态的瓦片元数据,并通过步骤205和步骤206对该瓦片状态为未阅状态的瓦片元数据的地图瓦片进行更新。Since the tile status of the tile metadata can be used to indicate whether the tile metadata has changed and the server has updated the map tile of the tile metadata according to the tile metadata, the server can directly obtain the tile state. It is the tile metadata of the unread state, and the map tiles of the tile metadata whose tile state is the unread state are updated by
另外,为了减轻服务器更新瓦片矩阵集的压力,服务器并不是实时对瓦片矩阵集进行更新,而是每隔预设时间段对瓦片矩阵集进行更新。In addition, in order to alleviate the pressure of the server to update the tile matrix set, the server does not update the tile matrix set in real time, but updates the tile matrix set every preset time period.
可选地,当服务器针对不同类型的地理实体设置不同的瓦片矩阵集时,也即,当服务器将一类地理实体的瓦片元数据存储在一个瓦片元数据表中时,步骤204的实现过程可以为:针对存储的至少一个瓦片元数据表中的任一个瓦片元数据表,根据该瓦片元数据表中包括的瓦片元数据的瓦片状态,从该瓦片元数据表中选择至少一个瓦片状态为未阅状态的瓦片元数据,得到一个元数据集,该元数据集仅包括该瓦片元数据表中瓦片状态为未阅状态的瓦片元数据; 当服务器对存储的至少一个瓦片元数据表均执行以上操作时,可以获取至少一个元数据集。此时,该至少一个元数据集中包括该多个瓦片元数据。Optionally, when the server sets different tile matrix sets for different types of geographic entities, that is, when the server stores tile metadata of a type of geographic entity in a tile metadata table,
其中,预设时间段为服务器预先设置的时间段,该预设时间段可以为一周、半个月或一个月等,本申请实施例在此不做具体限定。The preset time period is a time period that is preset by the server, and the preset time period may be one week, a half month, or a month. The embodiment of the present application is not specifically limited herein.
步骤205:对该多个瓦片元数据中每个瓦片元数据对应的地图瓦片进行更新。Step 205: Update a map tile corresponding to each tile metadata of the plurality of tile metadata.
由于该多个瓦片元数据均为瓦片状态为未阅状态的瓦片元数据,对于该多个瓦片元数据中的每个瓦片元数据,该瓦片元数据和当前该瓦片元数据的地图瓦片的信息已经不一致,因此,服务器需要根据该瓦片元数据对该瓦片元数据的地图瓦片进行更新。Since the plurality of tile metadata are tile metadata whose tile state is an unread state, for each tile metadata of the plurality of tile metadata, the tile metadata and the current tile The information of the map tiles of the metadata has been inconsistent, and therefore, the server needs to update the map tiles of the tile metadata according to the tile metadata.
在一种可能的实现方式中,当瓦片矩阵集中的地图瓦片为聚合类型的地图瓦片时,对于该多个瓦片元数据中的每个瓦片元数据,创建该瓦片元数据的空白地图瓦片;根据该瓦片元数据中的聚合地理实体的空间矢量数据,确定该聚合地理实体在该空白地图瓦片中的位置;根据该聚合地理实体在该空白地图瓦片中的位置,绘制该聚合地理实体在该空白地图瓦片中的图标和标注,以得到该瓦片元数据对应的地图瓦片。该图标用于指示聚合地理实体的类型,该标注用于指示该瓦片元数据对应的地图瓦片中包括的地理实体的个数,特别地,当该瓦片元数据中仅包括一个地理实体,此时,该标注也可以用该地理实体的名称代替。In a possible implementation manner, when the map tile in the tile matrix set is an aggregate type map tile, the tile metadata is created for each tile metadata in the multiple tile metadata. a blank map tile; determining, according to spatial vector data of the aggregated geographic entity in the tile metadata, a location of the aggregated geographic entity in the blank map tile; according to the aggregated geographic entity in the blank map tile Position, draw an icon and an annotation of the aggregated geographic entity in the blank map tile to obtain a map tile corresponding to the tile metadata. The icon is used to indicate the type of the aggregated geographic entity, where the label is used to indicate the number of geographic entities included in the map tile corresponding to the tile metadata, in particular, when only one geographic entity is included in the tile metadata. At this point, the annotation can also be replaced with the name of the geographic entity.
其中,根据该瓦片元数据中的聚合地理实体的空间矢量数据,确定该聚合地理实体在该空白地图瓦片中的位置,也即,根据该瓦片元数据中的聚合地理实体的经度和纬度,确定该聚合地理实体在该空白地图瓦片中的位置,该聚合地理实体在该空白地图瓦片中的位置可以用该聚合地理实体在该空白瓦片对应的平面坐标系中的横坐标和纵坐标表示。Determining, according to the spatial vector data of the aggregated geographic entity in the tile metadata, a location of the aggregated geographic entity in the blank map tile, that is, according to the longitude of the aggregated geographic entity in the tile metadata Latitude, determining the location of the aggregated geographic entity in the blank map tile, the location of the aggregated geographic entity in the blank map tile may be the abscissa of the aggregated geographic entity in the plane coordinate system corresponding to the blank tile And ordinate representation.
由于服务器在生成地图瓦片时,切图原点是固定的,也即该平面坐标系的原点的经度和纬度是确定的,因此该聚合地理实体在该空白瓦片对应的平面坐标系中的横坐标和纵坐标可以根据切图原点的经度和纬度以及该空白地图瓦片的当前预设比例级别确定。在一种可能的实现方式中,服务器可以通过如下公式(1)至公式(3)来确定该聚合地理实体在该空白地图瓦片对应的平面坐标系中的横坐标:Since the origin of the cut map is fixed when the server generates the map tile, that is, the longitude and latitude of the origin of the plane coordinate system are determined, the horizontal position of the aggregated geographic entity in the plane coordinate system corresponding to the blank tile The coordinates and ordinate can be determined based on the longitude and latitude of the cut origin and the current preset scale level of the blank map tile. In a possible implementation manner, the server may determine the abscissa of the aggregated geographic entity in a plane coordinate system corresponding to the blank map tile by using the following formulas (1) to (3):
ResX=Math.abs(lon)*2/Math.Pow(2,n) 公式(1)ResX=Math.abs(lon)*2/Math.Pow(2,n) Formula (1)
GeoLonPixelx=(lon-minx)/ResX 公式(2)GeoLonPixelx=(lon-minx)/ResX formula (2)
PixelX=GeoLonPixelx%256 公式(3)PixelX=GeoLonPixelx%256 formula (3)
其中,ResX表示地图分辨率中横向像素点个数,Math.abs(lon)*2为全球经线方向的地理范围,n为该地图分辨率对应的预设比例级别,Math.Pow(2,n)表示对2进行n次幂的运算,minx表示切图原点的经度,lon表示聚合地理实体的经度,GeoLonPixelx为一中间变量,GeoLonPixelx%256表示将GeoLonPixelx对256进行取余操作,PixelX表示聚合地理实体在该空白地图瓦片对应的平面坐标系中的横坐标,另外256为现在通用的地图瓦片的像素大小。Among them, ResX represents the number of horizontal pixels in the map resolution, Math.abs(lon)*2 is the geographical range of the global warp direction, and n is the preset scale level corresponding to the map resolution, Math.Pow(2,n ) indicates that n is operated on the power of n, minx represents the longitude of the origin of the cut graph, lon represents the longitude of the aggregated geographic entity, GeoLonPixelx is an intermediate variable, GeoLonPixelx% 256 represents the remainder operation of GeoLonPixelx on 256, and PixelX represents aggregated geography. The abscissa of the entity in the plane coordinate system corresponding to the blank map tile, and 256 is the pixel size of the map tile that is now common.
服务器还可以通过下述公式(4)至公式(6)确定该聚合地理实体在该空白瓦片对应的平面坐标系中的纵坐标:The server may also determine the ordinate of the aggregated geographic entity in the plane coordinate system corresponding to the blank tile by the following formulas (4) to (6):
ResY=Math.abs(lat)*2/Math.Pow(2,n) 公式(4)ResY=Math.abs(lat)*2/Math.Pow(2,n) Formula (4)
GeoLonPixely=(lat-miny)/ResY 公式(5)GeoLonPixely=(lat-miny)/ResY formula (5)
PixelY=GeoLonPixely%256 公式(6)PixelY=GeoLonPixely%256 formula (6)
其中,ResY表示地图分辨率中的纵向像素点个数,Math.abs(lat)*2为全球维线方向的地理范围,n为该地图分辨率对应的预设比例级别,miny表示切图原点的经度,lat表示聚合地理实体的经度,GeoLonPixely为一中间变量,GeoLonPixely%256表示将GeoLonPixely对256进行取余操作,PixelY表示聚合地理实体在该空白地图瓦片对应的平面坐标系中的纵坐标。Among them, ResY represents the number of vertical pixels in the map resolution, Math.abs(lat)*2 is the geographical range of the global dimension line, n is the preset scale level corresponding to the map resolution, and miny represents the cut-off origin. Longitude, lat indicates the longitude of the aggregated geographic entity, GeoLonPixely is an intermediate variable, GeoLonPixely%256 indicates that GeoLonPixely performs a remainder operation on 256, and PixelY indicates the ordinate of the aggregated geographic entity in the plane coordinate system corresponding to the blank map tile. .
当服务器确定聚合地理实体在空白地图瓦片对应的平面坐标系中的横坐标和纵坐标之后,可以直接以该横坐标和纵坐标为起点,在空白地图瓦片中绘制该聚合地理实体的图标。After the server determines that the aggregated geographic entity is in the horizontal coordinate and the ordinate of the plane coordinate system corresponding to the blank map tile, the icon of the aggregated geographic entity may be drawn in the blank map tile by using the abscissa and the ordinate as the starting point. .
当然,在本申请实施例中,为了使聚合地理实体的图标在该空白地图瓦片的位置尽可能和该聚合地理实体在该空白地图瓦片上的位置一致,在绘制该聚合地理实体的图标时,可以适当地对绘制的起点进行调整。Of course, in the embodiment of the present application, in order to make the position of the icon of the aggregated geographic entity in the position of the blank map tile as close as possible on the blank map tile, when the icon of the aggregated geographic entity is drawn , you can adjust the starting point of the drawing appropriately.
例如,以(PixelX-imgWidth/2,PixelY-imgHeight/2)为绘制的起点,绘制方向为从该图标的左下方到右上方,此时绘制结束时,该图标的中心位置恰好为该聚合地理实体在该空白地图瓦片中对应的位置。其中,PixelX和PixelY为上述得到的该聚合地理实体在该空白地图瓦片对应的平面坐标系中的横坐标和纵坐标,imgWidth为该聚合地理实体的图标的宽度,imgHeight为该聚合地理实体的图标的高度。For example, (PixelX-imgWidth/2, PixelY-imgHeight/2) is the starting point of the drawing, and the drawing direction is from the lower left to the upper right of the icon. At the end of the drawing, the center position of the icon is exactly the aggregate geography. The location of the entity in the blank map tile. Wherein, PixelX and PixelY are the abscissa and ordinate of the aggregated geographic entity obtained in the plane coordinate system corresponding to the blank map tile, imgWidth is the width of the icon of the aggregated geographic entity, and imgHeight is the aggregated geographic entity The height of the icon.
值得注意的是,当通过上述方法在该空白地图瓦片上绘制该聚合地理实体 的图标时,当该绘制的起点处于该空白地图瓦片的边缘位置时,此时该空白地图瓦片仅能包括该图标的一部分。因此,在本申请实施例中,为了使该聚合地理实体的图标可以完整地显示在电子地图上,当该聚合地理实体处于该空白地图瓦片的边缘位置时,绘制该聚合地理实体在该空白地图瓦片中的第一图标,并查找与该空白地图瓦片的边缘位置相邻的地图瓦片;根据该聚合地理实体的空间矢量数据,确定该聚合地理实体在该相邻的地图瓦片中的位置;根据该聚合地理实体在该相邻的地图瓦片中的位置,在该相邻的地图瓦片上绘制该聚合地理实体的第二图标。It should be noted that when the icon of the aggregated geographic entity is drawn on the blank map tile by the above method, when the starting point of the drawing is at the edge position of the blank map tile, the blank map tile can only be included at this time. Part of the icon. Therefore, in the embodiment of the present application, in order for the icon of the aggregated geographic entity to be completely displayed on the electronic map, when the aggregated geographic entity is at the edge position of the blank map tile, the aggregated geographic entity is drawn in the blank. a first icon in the map tile and looking up a map tile adjacent to an edge location of the blank map tile; determining, based on spatial vector data of the aggregated geographic entity, the aggregated geographic entity in the adjacent map tile a location in the location; a second icon of the aggregated geographic entity is drawn on the adjacent map tile based on the location of the aggregated geographic entity in the neighboring map tile.
其中,第一图标为该聚合地理实体的图标的一部分,第二图标为该聚合地理实体的图标的一部分,且第二图标和第一图标能够构成该聚合地理实体的完整图标。The first icon is part of an icon of the aggregated geographic entity, the second icon is part of an icon of the aggregated geographic entity, and the second icon and the first icon are capable of forming a complete icon of the aggregated geographic entity.
具体地,查找与该空白地图瓦片的边缘位置相邻的地图瓦片可以为:当该边缘位置为左边边缘位置时,查找与该空白地图瓦片的左边边缘位置相邻的地图瓦片;当该边缘位置为右边边缘位置时,查找与该空白地图瓦片的右边边缘位置相邻的地图瓦片;当该边缘位置为上方边缘位置时,查找与该空白地图瓦片的上方边缘位置相邻的地图瓦片;当该边缘位置为下方边缘位置时,查找与该空白地图瓦片的下方边缘位置相邻的地图瓦片。Specifically, the search for the map tile adjacent to the edge position of the blank map tile may be: when the edge position is the left edge position, searching for a map tile adjacent to the left edge position of the blank map tile; When the edge position is the right edge position, searching for a map tile adjacent to the right edge position of the blank map tile; when the edge position is the upper edge position, searching for the upper edge position of the blank map tile a neighboring map tile; when the edge position is a lower edge position, a map tile adjacent to a lower edge position of the blank map tile is found.
另外,查找与该空白地图瓦片相邻的地图瓦片,可以根据该空白地图瓦片在所属瓦片矩阵中的瓦片行号和瓦片列号确定。比如,该相邻的地图瓦片为与该空白地图瓦片上方边缘位置相邻的地图瓦片时,该相邻的地图瓦片的瓦片行号为该空白地图瓦片的瓦片行号减1,该相邻的地图瓦片的瓦片列号为该空白地图瓦片的瓦片列号,根据该相邻的地图瓦片的瓦片行号和瓦片列号,即可从该空白地图瓦片所属的瓦片矩阵中查找到该相邻的地图瓦片。In addition, searching for a map tile adjacent to the blank map tile may be determined according to the tile row number and the tile column number of the blank map tile in the associated tile matrix. For example, when the adjacent map tile is a map tile adjacent to the upper edge position of the blank map tile, the tile row number of the adjacent map tile is the tile row number of the blank map tile. Subtracting 1, the tile column number of the adjacent map tile is the tile column number of the blank map tile, according to the tile row number and the tile column number of the adjacent map tile, The adjacent map tile is found in the tile matrix to which the blank map tile belongs.
例如,当该聚合地理实体在该空白地图瓦片的位置为该空白地图瓦片的左边边缘位置处时,此时若以(PixelX-imgWidth/2,PixelY-imgHeight/2)为绘制的起点,绘制方向为从该图标的左下方到右上方,那么绘制结束时,该空白地图瓦片仅包括该图标的右半部分。For example, when the location of the blank geographic tile is the left edge position of the blank map tile, if (PixelX-imgWidth/2, PixelY-imgHeight/2) is used as the starting point of the drawing, The drawing direction is from the lower left to the upper right of the icon, and when the drawing ends, the blank map tile includes only the right half of the icon.
此时,为了在电子地图上可以完成查看到该聚合地理实体的图标,在该空白地图瓦片上仅绘制该图标的右半部分,也即第一图标为该聚合地理实体的图标的右半部分,绘制起点为(PixelX+imgWidth/2,PixelY),也即从该图标的右方向左方开始绘制。并查找与该空白地图瓦片的左边位置相邻的地图瓦片, 在该相邻的地图瓦片上确定该聚合地理实体的位置为该相邻的地图瓦片的右边边缘位置,并在该相邻的地图瓦片上绘制该聚合地理实体的图标的左半部分图标,也即第二图标为该图标的左半部分。由于电子地图是由不不同的地图瓦片叠加而成,也即,电子地图中同时包括该空白地图瓦片和该相邻的地图瓦片,因此电子地图上显示的是该聚合地理实体的完整图标。At this time, in order to complete the view of the icon of the aggregated geographic entity on the electronic map, only the right half of the icon is drawn on the blank map tile, that is, the first icon is the right half of the icon of the aggregated geographic entity. The drawing starting point is (PixelX+imgWidth/2, PixelY), that is, drawing from the right to the left of the icon. And searching for a map tile adjacent to a left position of the blank map tile, determining, on the adjacent map tile, a location of the aggregated geographic entity as a right edge position of the adjacent map tile, and in the phase The left half of the icon of the icon of the aggregated geographic entity is drawn on the neighboring map tile, that is, the second icon is the left half of the icon. Since the electronic map is superimposed by different map tiles, that is, the electronic map includes both the blank map tile and the adjacent map tile, the electronic map displays the integrity of the aggregated geographic entity. icon.
值得注意的是,绘制该聚合地理实体的图标时,通过上述方法确定的绘制起点可能位于该空白地图瓦片的四个顶点处,此时在该空白地图瓦片上绘制的第一图标仅为该聚合地理实体的图标的1/4,由于边缘位置为该空白地图瓦片的顶点处,因此查找与该空白地图瓦片相邻的瓦片时服务器将查找到3个相邻的地图瓦片,此时服务器在该3个相邻的地图瓦片上分别绘制该聚合地理实体的图标的1/4,也即第二图标为该聚合地理实体的图标的3/4。It should be noted that when drawing the icon of the aggregated geographic entity, the drawing starting point determined by the above method may be located at four vertices of the blank map tile, and the first icon drawn on the blank map tile is only the 1/4 of the icon of the aggregated geographic entity, since the edge location is at the vertices of the blank map tile, the server will find 3 adjacent map tiles when looking for tiles adjacent to the blank map tile. At this time, the server draws 1/4 of the icon of the aggregated geographic entity on the three adjacent map tiles, that is, the second icon is 3/4 of the icon of the aggregated geographic entity.
例如,图3为发明实施例提供的一种聚合地理实体的图标划分示意图,如图3所示,当该边缘位置为该空白地图瓦片的左上方顶点时,将该聚合地理实体的图标平均划分为如图3所示的4部分,在该空白地图瓦片上仅绘制该图标的第4部分,绘制起点为(PixelX+imgWidth/2,PixelY-imgHeight/2),绘制方向从该图标的右下方向左上方;并且在与该空白地图瓦片左边相邻的地图瓦片上绘制该图标的第3部分,在与该空白地图瓦片上边相邻的地图瓦片上绘制该图标的第2部分,在与该空白地图瓦片左上边相邻的地图瓦片上绘制该图标的第1部分。For example, FIG. 3 is a schematic diagram of icon division of an aggregated geographic entity according to an embodiment of the present invention. As shown in FIG. 3, when the edge position is the upper left vertex of the blank map tile, the icon of the aggregated geographic entity is averaged. Divided into 4 parts as shown in Figure 3, only the 4th part of the icon is drawn on the blank map tile, the drawing starting point is (PixelX+imgWidth/2, PixelY-imgHeight/2), and the drawing direction is from the right of the icon. Bottom direction to the upper left; and drawing the third part of the icon on the map tile adjacent to the left side of the blank map tile, drawing the second part of the icon on the map tile adjacent to the blank map tile The first part of the icon is drawn on the map tile adjacent to the upper left side of the blank map tile.
另外,当瓦片矩阵集中的地图瓦片为聚合类型的地图瓦片时,也即,当地图瓦片上的地理实体的个数大于1时,在该地图瓦片上仅绘制该多个地理实体中的一个。此时,当地图瓦片上的地理实体的个数大于1时,该地图瓦片上的聚合地理实体的位置仅代表其中一个地理实体的位置,也即,此时聚合地理实体在地图瓦片上的位置无需过于精准,所以在本申请实施例中,当地图瓦片上的地理实体的个数大于1,且聚合地理实体在该地图瓦片上的位置为该地图瓦片的边缘位置时,也可以不通过上述方法生成该聚合地理实体的图标,而是在当前空白地图瓦片上适当地调整绘制起点,使该聚合地理实体的图标可以完整显示在该空白地图瓦片上。In addition, when the map tile in the tile matrix set is an aggregate type map tile, that is, when the number of geographic entities on the local map tile is greater than 1, only the plurality of geographic entities are drawn on the map tile. one of. At this time, when the number of geographic entities on the local map tile is greater than 1, the location of the aggregated geographic entity on the map tile represents only the location of one of the geographic entities, that is, the location of the aggregated geographic entity on the map tile at this time. In the embodiment of the present application, the number of geographic entities on the local map tile is greater than 1, and the location of the aggregated geographic entity on the map tile is the edge position of the map tile, and may not pass. The above method generates an icon of the aggregated geographic entity, and appropriately adjusts the drawing starting point on the current blank map tile, so that the icon of the aggregated geographic entity can be completely displayed on the blank map tile.
例如,当该聚合地理实体的位置在该空白地图瓦片的左边边缘位置时,可以将绘制起点向右移动至少1个该图标的宽度的距离,此时可以将该图标完整绘制在该空白地图瓦片上。For example, when the location of the aggregated geographic entity is at the left edge position of the blank map tile, the drawing start point may be moved to the right by at least one distance of the width of the icon, and the icon may be completely drawn on the blank map. On the tiles.
需要说明的是,当该地图瓦片上仅包括一个地理实体时,为了使该地图瓦片上该聚合地理实体也即该地理实体的图标的位置和该地理实体在该地图瓦片上的位置尽量一致,在空白地图瓦片上绘制该地理实体的图标时,如果该地理实体在该空白地图瓦片上的位置为该空白地图瓦片的边缘位置,仍采用在相邻地图瓦片上绘制第二图标的方法保证该地理实体的图标的完整性。It should be noted that, when the map tile includes only one geographic entity, in order to make the aggregated geographic entity on the map tile, that is, the location of the icon of the geographic entity and the location of the geographic entity on the map tile as consistent as possible, When the icon of the geographic entity is drawn on the blank map tile, if the location of the geographic entity on the blank map tile is the edge position of the blank map tile, the method of drawing the second icon on the adjacent map tile is still adopted. The integrity of the icon of the geographic entity.
另外,在该空白地图瓦片上绘制该聚合地理实体的标注和在该空白地图瓦片上绘制该聚合地理实体的图标的实现方式基本相同,在此不做详细说明。其中,为了使该标注在该空白地图瓦片上位置较为美观,可以根据该聚合地理实体的图标在该空白地图瓦片上位置,对该标注在该空白地图瓦片上位置适当地调整,具体适当地调整可以通过调整绘制起点来实现。In addition, the implementation of drawing the annotation of the aggregated geographic entity on the blank map tile and drawing the icon of the aggregated geographic entity on the blank map tile is substantially the same, and will not be described in detail herein. In order to make the location of the annotation on the blank map tile more beautiful, the location of the icon on the blank map tile may be appropriately adjusted according to the icon of the aggregated geographic entity, and the position is appropriately adjusted according to the position of the blank map tile. This can be done by adjusting the drawing starting point.
可选地,当瓦片矩阵集中的地图瓦片为非聚合类型的地图瓦片时,此时对该多个瓦片元数据中每个瓦片元数据对应的地图瓦片进行更新同样可以参考上述过程,本申请实施例在此不再详细说明。Optionally, when the map tile in the tile matrix set is a non-aggregated type map tile, the map tile corresponding to each tile metadata in the multiple tile metadata may be updated at the same time. The foregoing process is not described in detail herein.
步骤206:根据更新之后的地图瓦片,更新瓦片矩阵集,并将多个瓦片元数据中每个瓦片元数据的瓦片状态从未阅状态更新为已阅状态。Step 206: Update the tile matrix set according to the updated map tile, and update the tile state of each tile metadata in the plurality of tile metadata from the unread state to the read state.
在根据每个瓦片元数据更新对应的地图瓦片之后,服务器可以将存储的该瓦片元数据对应的地图瓦片替换为生成的地图瓦片,也即更新瓦片矩阵集。此时,由于服务器已经根据瓦片状态为未阅状态的瓦片元数据更新了瓦片矩阵集,因此需要将该多个瓦片元数据的瓦片状态从未阅状态更新为已阅状态,避免服务器在下次预设时间段达到时,重复对该瓦片状态为未阅状态的瓦片元数据的地图瓦片进行更新。After updating the corresponding map tile according to each tile metadata, the server may replace the stored map tile corresponding to the tile metadata with the generated map tile, that is, update the tile matrix set. At this time, since the server has updated the tile matrix set according to the tile state of the unread state of the tile state, it is necessary to update the tile state of the plurality of tile metadata from the unread state to the read state. The server avoids updating the map tile of the tile metadata whose tile status is the unread state when the next preset time period is reached.
可选地,当服务器针对不同类型的地理实体设置不同的瓦片矩阵集时,可以对不同的瓦片矩阵集分别执行步骤204至步骤206的操作,当服务器更新完每一类地理实体的瓦片矩阵集时,完成对所有瓦片矩阵集的更新。Optionally, when the server sets different sets of tile matrices for different types of geographic entities, the operations of
步骤207:对多个目标地图瓦片中与当前地图分辨率对应的目标地图瓦片进行处理,并将处理后的目标地图瓦片实时发送给管理员客户端。Step 207: Process the target map tile corresponding to the current map resolution of the plurality of target map tiles, and send the processed target map tile to the administrator client in real time.
在本申请实施例中,当管理员通过管理员客户端更改电子地图上的地理实体时,为了使管理员可以实时查看到更改后的电子地图,服务器可以向管理员客户端返回与当前地图分辨率对应的更新后的地图瓦片。In the embodiment of the present application, when the administrator changes the geographic entity on the electronic map through the administrator client, in order to enable the administrator to view the changed electronic map in real time, the server may return to the administrator client to distinguish from the current map. The rate corresponds to the updated map tile.
其中,对多个目标地图瓦片中与当前地图分辨率对应的目标地图瓦片进行处理的实现过程可以为:当地理实体变更请求携带当前地图分辨率时,服务器 确定当前地图分辨率对应的预设比例级别;从该多个目标地图瓦片中选择比例级别为该当前地图分辨率对应的预设比例级别的目标地图瓦片;从更新之后的多个目标瓦片元数据中获取与选择的目标地图瓦片对应的目标瓦片元数据,根据获取到的目标瓦片元数据对该选择的目标地图瓦片进行更新。The process of processing the target map tile corresponding to the current map resolution in the multiple target map tiles may be: when the geographic entity change request carries the current map resolution, the server determines the pre-corresponding to the current map resolution. Setting a scale level; selecting, from the plurality of target map tiles, a target map tile whose scale level is a preset scale level corresponding to the current map resolution; acquiring and selecting from the plurality of target tile metadata after the update The target tile metadata corresponding to the target map tile is updated according to the acquired target tile metadata.
当管理员客户端接收到该处理后的目标地图瓦片时,确定该处理后的目标地图瓦片的标识,并将当前电子地图中标识为该处理后的目标地图瓦片的标识的地图瓦片替换为该处理后的目标地图瓦片,以实现管理员可以实时查看到更新后的电子地图。When the administrator client receives the processed target map tile, determining the identifier of the processed target map tile, and identifying the map in the current electronic map as the identifier of the processed target map tile The slice is replaced with the processed target map tile, so that the administrator can view the updated electronic map in real time.
其中,服务器确定当前地图分辨率对应的预设比例级别可以通过步骤205中的公式(1)确定,另外,根据获取到的瓦片元数据对该选择的目标地图瓦片进行更新可以参考步骤205中的对多个瓦片元数据中每个瓦片元数据对应的地图瓦片进行更新的方法,在此不再详细阐述。The server determines that the preset scale level corresponding to the current map resolution can be determined by using the formula (1) in the
在本申请实施例中,当接收到管理员客户端发送的地理实体变更请求时,对目标瓦片元数据进行更新,并将目标瓦片元数据的瓦片状态更新为未阅状态。由于每条瓦片元数据用于描述对应的地图瓦片的信息,且瓦片数据数据的瓦片状态包括已阅状态和未阅状态,未阅状态用于指示瓦片元数据对应的地图瓦片未完成处理,因此,当后续需要对瓦片矩阵集进行更新时,可以仅根据瓦片状态为未阅状态的瓦片元数据对瓦片矩阵集进行更新,避免了通过重新确定的所有地理实体的空间矢量数据来更新每一类地理实体的瓦片矩阵集,可以有效缓解在更新瓦片矩阵集过程中的压力,提高了更新瓦片矩阵集的效率。另外,实时向管理员客户端返回与当前地图分辨率对应的目标地图瓦片,对于管理员客户端而言,当发起地理实体变更请求时,还可以实时显示更新之后的地图,提高了地图的时效性。In the embodiment of the present application, when receiving the geographic entity change request sent by the administrator client, the target tile metadata is updated, and the tile state of the target tile metadata is updated to the unread state. Since each tile metadata is used to describe information of the corresponding map tile, and the tile state of the tile data data includes the read state and the unread state, the unread state is used to indicate the tile corresponding to the tile metadata. The slice is not processed. Therefore, when the tile matrix set needs to be updated later, the tile matrix set can be updated only according to the tile metadata whose tile state is the unread state, and all the geography through re-determination is avoided. The spatial vector data of the entity to update the tile matrix set of each type of geographic entity can effectively alleviate the pressure in updating the tile matrix set and improve the efficiency of updating the tile matrix set. In addition, the target map tile corresponding to the current map resolution is returned to the administrator client in real time. For the administrator client, when the geographic entity change request is initiated, the updated map can be displayed in real time, and the map is improved. Timeliness.
参见图4,本申请实施例提供了一种地图瓦片更新装置300,该装置300包括接收模块301、确定模块302、第一更新模块303和发送模块304:Referring to FIG. 4, an embodiment of the present application provides a map tile update apparatus 300. The apparatus 300 includes a receiving
接收模块301,用于接收管理员客户端发送的地理实体变更请求,该地理实体变更请求携带目标地理实体的空间矢量数据和当前地图分辨率;The receiving
确定模块302,用于根据该目标地理实体的空间矢量数据,从瓦片矩阵集中确定与该目标地理实体相关的待处理的多个目标地图瓦片;a determining
第一更新模块303,用于对瓦片元数据表中与所述多个目标地图瓦片对应 的多个目标瓦片元数据进行更新,将该多个目标瓦片元数据的瓦片状态均更新为未阅状态;a
其中,该瓦片元数据表中的每条瓦片元数据均对应一个地图瓦片,每条瓦片元数据用于描述对应的地图瓦片的信息,该瓦片状态包括已阅状态和未阅状态,该已阅状态用于指示瓦片元数据对应的地图瓦片已完成处理,该未阅状态用于指示瓦片元数据对应的地图瓦片未完成处理;Each tile metadata in the tile metadata table corresponds to a map tile, and each tile metadata is used to describe information of a corresponding map tile, and the tile state includes the read state and the a read state, the read state is used to indicate that the map tile corresponding to the tile metadata has been processed, and the unread state is used to indicate that the map tile corresponding to the tile metadata is not processed;
发送模块304,用于对该多个目标地图瓦片中与该当前地图分辨率对应的目标地图瓦片进行处理,并将处理后的目标地图瓦片实时发送给该管理员客户端。The sending
可选地,该瓦片矩阵集中的地图瓦片为非聚合类型的地图瓦片,每个瓦片元数据包括对应的地图瓦片的标识、对应的地图瓦片所属的比例级别、对应的地图瓦片中的包括的每个地理实体的空间矢量数据、每个地理实体的标识以及瓦片状态。Optionally, the map tile in the tile matrix set is a non-aggregated type map tile, and each tile metadata includes an identifier of a corresponding map tile, a scale level to which the corresponding map tile belongs, and a corresponding map. The spatial vector data of each geographic entity included in the tile, the identity of each geographic entity, and the tile state.
可选地,该地理实体变更请求包括地理实体添加请求、地理实体删除请求或地理实体更新请求;Optionally, the geographic entity change request includes a geographic entity addition request, a geographic entity deletion request, or a geographic entity update request;
该第一更新模块,具体用于:The first update module is specifically configured to:
当该地理实体变更请求为地理实体添加请求时,在每个目标瓦片元数据中增加该目标地理实体的标识和该目标地理实体的空间矢量数据;When the geographic entity change request adds a request to the geographic entity, the identifier of the target geographic entity and the space vector data of the target geographic entity are added in each target tile metadata;
当该地理实体变更请求为地理实体删除请求时,在每个目标瓦片元数据中删除该目标地理实体的标识和该目标地理实体的空间矢量数据;When the geographic entity change request is a geographic entity deletion request, deleting the identifier of the target geographic entity and the space vector data of the target geographic entity in each target tile metadata;
当该地理实体变更请求为地理实体更新请求时,基于该目标地理实体包括的第一地理实体和该第一地理实体,在第一地理实体对应的每个目标地图瓦片的目标瓦片元数据中删除该第一地理实体的标识和该第一地理实体的空间矢量数据,并在第二地理实体对应的每个目标地图瓦片的目标瓦片元数据中增加该第二地理实体的标识和该第二地理实体的空间矢量数据,该第一地理实体为变更前的地理实体,该第二地理实体为变更后的地理实体。When the geographic entity change request is a geographic entity update request, based on the first geographic entity included in the target geographic entity and the first geographic entity, target tile metadata of each target map tile corresponding to the first geographic entity Deleting the identifier of the first geographic entity and the space vector data of the first geographic entity, and adding the identifier of the second geographic entity to the target tile metadata of each target map tile corresponding to the second geographic entity The space vector data of the second geographic entity, the first geographic entity is a pre-change geographic entity, and the second geographic entity is a changed geographic entity.
可选地,该瓦片矩阵集中的地图瓦片为聚合类型的地图瓦片,每个瓦片元数据包括对应的地图瓦片的标识、对应的地图瓦片所属的比例级别、对应的地图瓦片中的聚合地理实体的空间矢量数据、聚合数量以及瓦片状态,该聚合数量用于指示对应的地图瓦片中包括的地理实体的个数,该聚合地理实体为该瓦片元数据对应的地图瓦片包括的任一地理实体。Optionally, the map tile in the tile matrix set is an aggregate type map tile, and each tile metadata includes an identifier of a corresponding map tile, a scale level to which the corresponding map tile belongs, and a corresponding map tile. The space vector data, the number of aggregates, and the tile status of the aggregated geographic entity in the slice, the aggregated number is used to indicate the number of geographic entities included in the corresponding map tile, and the aggregated geographic entity is corresponding to the tile metadata. Any geographic entity included in the map tile.
可选地,该地理实体变更请求包括地理实体添加请求、地理实体删除请求或地理实体更新请求;Optionally, the geographic entity change request includes a geographic entity addition request, a geographic entity deletion request, or a geographic entity update request;
该第一更新模块,具体用于:The first update module is specifically configured to:
当该地理实体变更请求为地理实体添加请求时,增加每个目标瓦片元数据包括的聚合数量;When the geographic entity change request adds a request to the geographic entity, increasing the aggregate amount included in each target tile metadata;
当该地理实体变更请求为地理实体删除请求时,减少每个目标瓦片元数据包括的聚合数量;When the geographic entity change request is a geographic entity deletion request, reducing the aggregate amount included in each target tile metadata;
当该地理实体变更请求为地理实体更新请求时,基于该目标地理实体包括的第一地理实体和该第一地理实体,减少该第一地理实体对应的每个目标地图瓦片的目标瓦片元数据包括的聚合数量,并增加该第二地理实体对应的每个目标地图瓦片的目标瓦片元数据包括的聚合数量,该第一地理实体为变更前的地理实体,该第二地理实体为变更后的地理实体。When the geographic entity change request is a geographic entity update request, reducing a target tile element of each target map tile corresponding to the first geographic entity based on the first geographic entity included in the target geographic entity and the first geographic entity The number of aggregates included in the data, and the number of aggregates included in the target tile metadata of each target map tile corresponding to the second geographic entity, where the first geographic entity is a pre-change geographic entity, and the second geographic entity is The changed geographic entity.
可选地,该装置还包括:Optionally, the device further includes:
第一生成模块,用于当确定不存在与该目标地理实体相关的待处理的多个目标地图瓦片时,生成多个空白瓦片元数据,将该多个空白瓦片元数据作为该多个目标瓦片元数据;或者,a first generating module, configured to: when determining that there are no target map tiles to be processed related to the target geographic entity, generate a plurality of blank tile metadata, and use the multiple blank tile metadata as the multiple Target tile metadata; or,
第二生成模块,用于当确定存在与该目标地理实体相关的待处理的多个目标地图瓦片时,从该瓦片元数据表中查找是否存在与该多个目标地图瓦片对应的多个目标瓦片元数据,当不存在与该多个目标地图瓦片对应的多个目标瓦片元数据时,生成与该多个目标地图瓦片对应的多个空白瓦片元数据,将该多个空白瓦片元数据作为该多个目标瓦片元数据。a second generating module, configured to: when determining that there are multiple target map tiles to be processed related to the target geographic entity, whether there is more corresponding to the multiple target map tiles from the tile metadata table Generating tile metadata, when there is no plurality of target tile metadata corresponding to the plurality of target map tiles, generating a plurality of blank tile metadata corresponding to the plurality of target map tiles, A plurality of blank tile metadata is used as the plurality of target tile metadata.
可选地,该发送模块,具体用于:Optionally, the sending module is specifically configured to:
从多个预设比例级别中确定该当前地图分辨率对应的预设比例级别;Determining a preset proportional level corresponding to the current map resolution from a plurality of preset scale levels;
从该多个目标地图瓦片中选择比例级别为该当前地图分辨率对应的预设比例级别的目标地图瓦片;Selecting, from the plurality of target map tiles, a target map tile whose scale level is a preset scale level corresponding to the current map resolution;
从更新之后的多个目标瓦片元数据中获取与选择的目标地图瓦片对应的目标瓦片元数据;Obtaining target tile metadata corresponding to the selected target map tile from the plurality of target tile metadata after the update;
根据获取到的目标瓦片元数据对该选择的目标地图瓦片进行更新。The selected target map tile is updated according to the acquired target tile metadata.
可选地,该装置还包括:Optionally, the device further includes:
获取模块,用于从该瓦片元数据表中获取瓦片状态为未阅状态的瓦片元数据,得到多个瓦片元数据;An obtaining module, configured to obtain, from the tile metadata table, tile metadata whose tile state is an unread state, to obtain multiple tile metadata;
第二更新模块,用于对该多个瓦片元数据中每个瓦片元数据对应的地图瓦片进行更新;a second update module, configured to update a map tile corresponding to each tile metadata of the multiple tile metadata;
第三更新模块,用于根据更新之后的地图瓦片,更新该瓦片矩阵集,并将该多个瓦片元数据中每个瓦片元数据的瓦片状态从未阅状态更新为已阅状态。a third update module, configured to update the tile matrix set according to the updated map tile, and update the tile state of each tile metadata in the multiple tile metadata from the unread state to the read status.
可选地,该瓦片矩阵集中的地图瓦片为聚合类型的地图瓦片;Optionally, the map tile in the tile matrix set is an aggregate type map tile;
该第二更新模块包括:The second update module includes:
创建单元,用于对于该多个瓦片元数据中的任一个瓦片元数据,创建该瓦片元数据对应的空白地图瓦片;a creating unit, configured to create a blank map tile corresponding to the tile metadata for any one of the plurality of tile metadata;
确定单元,用于根据该瓦片元数据中的聚合地理实体的空间矢量数据,确定该聚合地理实体在该空白地图瓦片中的位置,该聚合地理实体为该瓦片元数据对应的地图瓦片包括的任一地理实体;a determining unit, configured to determine, according to space vector data of the aggregated geographic entity in the tile metadata, a location of the aggregated geographic entity in the blank map tile, where the aggregated geographic entity is a map tile corresponding to the tile metadata Any geographic entity included in the slice;
绘制单元,用于根据该聚合地理实体在该空白地图瓦片中的位置,绘制该聚合地理实体在该空白地图瓦片中的图标和标注,以得到该瓦片元数据对应的地图瓦片,该图标用于指示该聚合地理实体的类型,该标注用于指示该瓦片元数据对应的地图瓦片中包括的地理实体的个数。a drawing unit, configured to draw an icon and an annotation of the aggregated geographic entity in the blank map tile according to the location of the aggregated geographic entity in the blank map tile, to obtain a map tile corresponding to the tile metadata, The icon is used to indicate the type of the aggregated geographic entity, and the label is used to indicate the number of geographic entities included in the map tile corresponding to the tile metadata.
可选地,该绘制单元,具体用于:Optionally, the drawing unit is specifically configured to:
当该聚合地理实体处于该空白地图瓦片的边缘位置时,绘制该聚合地理实体在该空白地图瓦片中的第一图标,该第一图标为该聚合地理实体的图标的一部分;When the aggregated geographic entity is at an edge position of the blank map tile, drawing a first icon of the aggregated geographic entity in the blank map tile, the first icon being part of an icon of the aggregated geographic entity;
查找与该空白地图瓦片的边缘位置相邻的地图瓦片;Finding a map tile adjacent to an edge position of the blank map tile;
根据该聚合地理实体的空间矢量数据,确定该聚合地理实体在该相邻的地图瓦片中的位置;Determining, according to space vector data of the aggregated geographic entity, a location of the aggregated geographic entity in the adjacent map tile;
根据该聚合地理实体在该相邻的地图瓦片中的位置,在该相邻的地图瓦片上绘制该聚合地理实体的第二图标,该第二图标为该聚合地理实体的图标的一部分,且该第二图标和该第一图标能够构成该聚合地理实体的完整图标。Depicting a second icon of the aggregated geographic entity on the adjacent map tile according to a location of the aggregated geographic entity in the adjacent map tile, the second icon being part of an icon of the aggregated geographic entity, and The second icon and the first icon can form a complete icon of the aggregated geographic entity.
可选地,该瓦片矩阵集为与该目标地理实体所属的一类地理实体对应的瓦片矩阵集。Optionally, the tile matrix set is a tile matrix set corresponding to a type of geographic entity to which the target geographic entity belongs.
在本申请实施例中,当接收到管理员客户端发送的地理实体变更请求时,对目标瓦片元数据进行更新,并将目标瓦片元数据的瓦片状态更新为未阅状态。由于每条瓦片元数据用于描述对应的地图瓦片的信息,且瓦片数据数据的瓦片状态包括已阅状态和未阅状态,未阅状态用于指示瓦片元数据对应的地图 瓦片未完成处理,因此,当后续需要对瓦片矩阵集进行更新时,可以仅根据瓦片状态为未阅状态的瓦片元数据对瓦片矩阵集进行更新,避免了通过重新确定的所有地理实体的空间矢量数据来更新每一类地理实体的瓦片矩阵集,可以有效缓解在更新瓦片矩阵集过程中的压力,提高了更新瓦片矩阵集的效率。另外,实时向管理员客户端返回与当前地图分辨率对应的目标地图瓦片,对于管理员客户端而言,当发起地理实体变更请求时,还可以实时显示更新之后的地图,提高了地图的时效性。In the embodiment of the present application, when receiving the geographic entity change request sent by the administrator client, the target tile metadata is updated, and the tile state of the target tile metadata is updated to the unread state. Since each tile metadata is used to describe information of the corresponding map tile, and the tile state of the tile data data includes the read state and the unread state, the unread state is used to indicate the tile corresponding to the tile metadata. The slice is not processed. Therefore, when the tile matrix set needs to be updated later, the tile matrix set can be updated only according to the tile metadata whose tile state is the unread state, and all the geography through re-determination is avoided. The spatial vector data of the entity to update the tile matrix set of each type of geographic entity can effectively alleviate the pressure in updating the tile matrix set and improve the efficiency of updating the tile matrix set. In addition, the target map tile corresponding to the current map resolution is returned to the administrator client in real time. For the administrator client, when the geographic entity change request is initiated, the updated map can be displayed in real time, and the map is improved. Timeliness.
需要说明的是:上述实施例提供的地图瓦片更新装置在触发地图瓦片更新时,仅以上述各功能模块的划分进行举例说明。当然,也可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的地图瓦片更新装置与地图瓦片更新方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that the map tile updating apparatus provided in the above embodiment is only exemplified by the division of the above functional modules when the map tile update is triggered. Of course, the above function assignment can also be completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the map tile updating apparatus and the map tile updating method embodiment provided by the foregoing embodiments are in the same concept, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
图5是本申请实施例提供的另一种地图瓦片更新装置400的框图。例如,装置400可以被提供为一服务器。参照图5,装置400包括处理器401、通信接口402、存储器403和通信总线404。FIG. 5 is a block diagram of another map tile updating apparatus 400 provided by an embodiment of the present application. For example, device 400 can be provided as a server. Referring to FIG. 5, apparatus 400 includes a
如图5所示,处理器401、通信接口402和存储器403通过通信总线404完成相互间的通信。As shown in FIG. 5, the
处理器401可以是一个CPU(Central Processing Unit,中央处理器),微处理器,ASIC(application-specific integrated circuit,特定应用集成电路),或一个或多个用于控制本申请方案程序执行的集成电路。The
通信总线404可包括一通路,在上述组件之间传送信息。
存储器403可以是ROM(read-only memory,只读存储器)或可存储静态信息和指令的其它类型的静态存储设备,RAM(random access memory,随机存取存储器)或者可存储信息和指令的其它类型的动态存储设备,也可以是EEPROM(Electrically Erasable Programmable Read-Only Memory,电可擦可编程只读存储器)、CD-ROM(Compact Disc Read-Only Memory,只读光盘)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介 质,但不限于此。存储器403可以是独立存在,通过通信总线404与处理器401相连接。存储器403也可以和处理器401集成在一起。The
通信接口402,使用任何收发器一类的装置,用于与其它设备或通信网络通信,如以太网,无线接入网,WLAN(Wireless Local Area Networks,无线局域网)等。The
其中,存储器403用于存储执行本申请方案的计算机程序,并由处理器401来控制执行。也即,处理器401用于执行存储器上所存放的程序,以实现上述实施例提供的地图瓦片更新方法。The
在示例性实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质内存储有计算机程序,当该计算机可读存储介质中存储的计算机程序由服务器的处理器执行时,使得服务器能够上述实施例提供的地图瓦片更新方法。In an exemplary embodiment, there is also provided a computer readable storage medium having stored therein a computer program, when a computer program stored in the computer readable storage medium is executed by a processor of a server, The server is enabled to enable the map tile update method provided by the above embodiment.
在示例性实施例中,还提供了一种计算机程序产品,所述计算机程序产品中存储有指令,当其在计算机上运行时,使得计算机执行如上述实施例提供的地图瓦片更新方法方法。In an exemplary embodiment, there is also provided a computer program product having instructions stored therein that, when run on a computer, cause the computer to perform a map tile update method method as provided by the above embodiments.
在示例性实施例中,还提供了一种芯片,所述芯片包括可编程逻辑电路和/或程序指令,当所述芯片运行时用于实现如上述实施例提供的地图瓦片更新方法。In an exemplary embodiment, there is also provided a chip comprising programmable logic circuitry and/or program instructions for implementing a map tile update method as provided by the above embodiments when the chip is running.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium. The storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application are included in the protection of the present application. Within the scope.
Claims (24)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710423627.1 | 2017-06-07 | ||
| CN201710423627 | 2017-06-07 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018223990A1 true WO2018223990A1 (en) | 2018-12-13 |
Family
ID=64566788
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/090134 Ceased WO2018223990A1 (en) | 2017-06-07 | 2018-06-06 | Map tile updating method and device and computer readable storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109002452B (en) |
| WO (1) | WO2018223990A1 (en) |
Families Citing this family (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110597941B (en) * | 2019-09-11 | 2023-12-29 | 广州力挚网络科技有限公司 | Map display method and system |
| CN111325841B (en) * | 2020-02-18 | 2021-03-30 | 国网河北省电力有限公司 | Smart map data system modeling method and application thereof in power audit operation |
| CN111753041B (en) * | 2020-06-30 | 2022-12-02 | 重庆紫光华山智安科技有限公司 | Data aggregation rendering method, device and system, electronic equipment and storage medium |
| CN112231426A (en) * | 2020-10-13 | 2021-01-15 | 重庆紫光华山智安科技有限公司 | Vector tile point data based updating method, system, medium and terminal |
| CN116993857B (en) * | 2023-08-11 | 2024-04-02 | 中国科学院西北生态环境资源研究院 | A method, device, storage medium and electronic device for preparing thematic maps |
| WO2025129621A1 (en) * | 2023-12-22 | 2025-06-26 | Qualcomm Incorporated | Selective high-definition map downloading |
| CN117632972B (en) * | 2024-01-26 | 2024-04-12 | 中国电子科技集团公司第十五研究所 | Map tile aggregation publishing method, device, electronic device and storage medium |
| US12182907B1 (en) | 2024-08-09 | 2024-12-31 | Northwest Institute Of Eco-Environment And Resources, Chinese Academy Of Sciences | Thematic map preparation method and apparatus, storage medium and electronic device |
| CN119006737B (en) * | 2024-10-25 | 2024-12-20 | 江苏省地质测绘大队 | Live-action three-dimensional scene model updating management method based on geographic space boundary constraint |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8204966B1 (en) * | 2011-09-26 | 2012-06-19 | Google Inc. | Map tile data pre-fetching based on user activity analysis |
| CN105359189A (en) * | 2013-05-15 | 2016-02-24 | 谷歌公司 | Use of map data difference tiles to iteratively provide map data to a client device |
| KR20160116441A (en) * | 2015-03-30 | 2016-10-10 | 한국전자통신연구원 | System and method for partial update and partial tile map generation using electronic navigation chart update information |
Family Cites Families (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2012157850A2 (en) * | 2011-05-19 | 2012-11-22 | 에스케이플래닛 주식회사 | Real-time map data updating system and method |
| US8612491B2 (en) * | 2011-10-25 | 2013-12-17 | The United States Of America, As Represented By The Secretary Of The Navy | System and method for storing a dataset of image tiles |
| US9201898B2 (en) * | 2013-05-15 | 2015-12-01 | Google Inc. | Efficient fetching of map tile data |
| CN103488760B (en) * | 2013-09-26 | 2017-02-15 | 中国测绘科学研究院 | Provision method of geographic information tile services and device for implementing provision method |
| US10042863B2 (en) * | 2014-05-28 | 2018-08-07 | Oracle International Corporation | Automatic update for map cache |
| CN104537031B (en) * | 2014-12-19 | 2018-06-08 | 百度在线网络技术(北京)有限公司 | The amending method and device of a kind of map datum |
| CN104778212B (en) * | 2014-12-19 | 2018-08-07 | 北京搜狗科技发展有限公司 | Map datum generation method and device, map datum read method and device |
| US20170091993A1 (en) * | 2015-09-25 | 2017-03-30 | Microsoft Technology Licensing, Llc | 3D Model Generation From Map Data and User Interface |
-
2017
- 2017-11-06 CN CN201711077419.7A patent/CN109002452B/en active Active
-
2018
- 2018-06-06 WO PCT/CN2018/090134 patent/WO2018223990A1/en not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8204966B1 (en) * | 2011-09-26 | 2012-06-19 | Google Inc. | Map tile data pre-fetching based on user activity analysis |
| CN105359189A (en) * | 2013-05-15 | 2016-02-24 | 谷歌公司 | Use of map data difference tiles to iteratively provide map data to a client device |
| KR20160116441A (en) * | 2015-03-30 | 2016-10-10 | 한국전자통신연구원 | System and method for partial update and partial tile map generation using electronic navigation chart update information |
Non-Patent Citations (1)
| Title |
|---|
| MA, WEICHUN ET AL.: "Python ArcGIS Server 7* (Time-update Method of Tile Caches of ArcGIS Server Based on Python", GEOSPATIAL INFORMATION, vol. 11, no. 1, 28 February 2013 (2013-02-28), pages 147 - 149 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109002452A (en) | 2018-12-14 |
| CN109002452B (en) | 2020-10-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2018223990A1 (en) | Map tile updating method and device and computer readable storage medium | |
| US9798819B2 (en) | Selective map marker aggregation | |
| US9646406B2 (en) | Position searching method and apparatus based on electronic map | |
| US10032302B2 (en) | Rebuilding images based on historical image data | |
| US8775420B2 (en) | Text display of geo-referenced information based on relative distance to a user location | |
| CN110084877B (en) | Managing map elements using aggregated feature identifiers | |
| US10475224B2 (en) | Reality-augmented information display method and apparatus | |
| CN104995657B (en) | System and method for resizing an image | |
| CN101339486B (en) | Method and apparatus for providing picture file | |
| US20150356763A1 (en) | Method and apparatus for grouping and de-overlapping items in a user interface | |
| US10018480B2 (en) | Point of interest selection based on a user request | |
| CN110887499B (en) | Method and terminal for processing road data and interest point data in map | |
| JP2017505923A (en) | System and method for geolocation of images | |
| US9811539B2 (en) | Hierarchical spatial clustering of photographs | |
| US20200097564A1 (en) | Selecting points of interest for display on a personalized digital map | |
| CN105095314A (en) | Point of interest (POI) marking method, terminal, navigation server and navigation system | |
| WO2016011763A1 (en) | Image presentation method, apparatus and device, and nonvolatile computer storage medium | |
| CN112214562A (en) | Data processing method and device, electronic equipment and machine-readable storage medium | |
| CN117788726A (en) | Map data rendering method and device, electronic equipment and storage medium | |
| CN111382223B (en) | Electronic map display method, terminal and electronic equipment | |
| US8885952B1 (en) | Method and system for presenting similar photos based on homographies | |
| US20150130817A1 (en) | Generating a sidebar from vector tiles | |
| CN104133845A (en) | Multimedia information display method and multimedia information display processing equipment | |
| US20190311509A1 (en) | Generation and presentation of distance cartograms | |
| US9779545B1 (en) | Footprint based business label placement |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18813583 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18813583 Country of ref document: EP Kind code of ref document: A1 |