Emergency safety management GIS big data vector slice service map
By adopting vector tile technology based on tile pyramid model in emergency management GIS, vector data is sparse and simplified and cropped, and multiple problems in vector data display in traditional technology are solved, achieving efficient, flexible and real-time data processing and display.
Patent Information
- Application Number
- CN202510127315.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-03
- Publication Date
- 2025-06-17
AI Technical Summary
There are many problems with vector data display in traditional emergency management GIS, including the client's inability to interact with tile in the image format, the vector data accuracy is affected by map resolution, rendering slicing destroys data integrity, lack of flexibility, and the inability to update real-world data changes in real-time.
The vector tile technology based on the tile pyramid model is adopted to simplify the vector data by optimizing the global constraint algorithm, and the data is cropped and encoded according to the Mapbox vector tile standard. Use quad-tree index for storage management, and design client cache policies and vector tile map styles to realize static and dynamic tiling services for vector tile.
It improves the transmission efficiency and storage density of vector data, retains the integrity and flexibility of vector data, realizes rapid updates of real-time changing data, and significantly improves the data processing and display capabilities of emergency management GIS.
Smart Images

Figure CN120162392A_ABST
Abstract
Description
Technical Field
[0001] This application relates to an emergency management GIS vector tile service map, and particularly to an emergency safety management GIS big data vector tile service map, belonging to the technical field of emergency GIS maps. Background Art
[0002] The biggest difference between the emergency management geographic information system and other geographic information systems lies in that emergency GIS has high requirements for the real-time, flexibility, integrity, data update speed and map style change of data. In traditional emergency management GIS, the processing of a large amount of vector data is mostly realized based on raster tile services. The original vector feature data is pre-rendered into a raster through a tile pyramid model, and then sliced into raster tile data with different resolutions, and then published in the form of a service.
[0003] The use of the tile pyramid model allows the client to only request the map tiles covering the current view and cache the tiles near the view, so that the client does not need to load all the tile data, greatly reducing the data access volume and optimizing the data transmission. However, such a processing process also has some problems: First, the client cannot interact with the tile in the form of a picture. When interacting, the client sends a request to the server again and realizes it through the WFS service of the server; Second, the accuracy of the vector data does not change with the change of the map resolution, but the accuracy of the rasterized vector data is affected by the map resolution. Third, the rendering and slicing process is a process of converting geographic coordinate data into a picture, which destroys the integrity of the data. If you want to query the attributes of the polygon of the picture, you need to request from the server again; Fourth, the data style of the vector data needs to be customized before rendering. Once rendered and sliced, it cannot be changed, which lacks flexibility; Finally, in emergency management GIS, the most important thing is the change of real-world data. Once the ground feature elements change but cannot be displayed on the map in real time, it is necessary to re-render and slice the data, and this rendering and slicing process takes a long time.
[0004] Due to these existing problems, it is necessary to visualize the vector elements from a new perspective. Whether it is progressive transmission or tiling processing, significant progress has been made in the research on vector element maps so far, but there are still some problems in the direct visualization and loading of vector geographic data. The tiling process of vector data should be combined with progressive transmission, which can more effectively relieve the data transmission pressure, and the client also does not need to request all the tile data, but only needs to load the specified tiles according to the current view, effectively improving the user experience.
[0005] Problems to be solved by the emergency management GIS vector tile service map of the prior art and key technical difficulties of this application include:
[0006] (1) In the tile pyramid model of the prior art, the client only needs to request map tiles covering the current view and cache tiles near the view. However, there are also problems with this processing flow: First, the client cannot interact with tiles in image format. During interaction, the client sends requests to the server again and realizes it through the WFS service of the server. Second, the accuracy of vector data does not change with the change of map resolution, but the accuracy of rasterized vector data is affected by map resolution. Third, the process of rendering slices is a process of converting geographic coordinate data into pictures, which destroys the integrity of the data. If you want to query the attributes of polygons in the picture, you need to request from the server again. Fourth, the data style of vector data needs to be customized before rendering. Once the rendering slices are made, they cannot be changed, which lacks flexibility. Finally, in emergency management GIS, the most important thing is the change of real-world data. Once the feature of the ground object changes, it cannot be displayed on the map in real time, and the data needs to be re-rendered and sliced. This rendering and slicing process takes a long time. The prior art cannot solve these problems.
[0007] (2) The prior art has realized the generation of vector tiles, but has not made a specific design for the structure of vector tiles. Their tile generation is only a clipping process of the original vector data. Therefore, a specific design for the structure of vector tiles needs to be given, such as which specific fields need to be included in the tile and what each field represents, which need to be defined one by one. In the existing vector tile generation process, the core idea of progressive transmission, that is, lossy transmission, is mostly not borrowed. The tiles generated according to the multi-resolution tile pyramid model are all clippings of the original vector data at different levels of the pyramid model, that is, the vector data of each layer is regarded as lossless. Therefore, consider thinning and simplifying the original vector data according to the needs of different levels, and only perform lossless clipping at the highest level, which not only reduces the storage pressure of vector tiles but also alleviates the transmission pressure.
[0008] (3) In the prior art, there is no specific method for the clipping of tiles during the tile generation process, and there are many ideas for the clipping of vector features. For example, when a planar feature exceeds a tile, it is considered to stuff the entire feature into the tile, or the vector feature is clipped according to the tile boundary and then stitched together during loading. Although the former ensures the integrity of the feature, it causes data redundancy, while the latter is complex to implement but avoids data redundancy. The prior art lacks the design of the structural model of vector tiles in accordance with the Mapbox vector tile standard, and cannot thin and simplify vector geographic features layer by layer under the tile pyramid model. It lacks ideas for clipping vector features and performing tiling processing, cannot re-encode the generated tiles, cannot organize and manage the stored vector tiles through the created quadtree index, and cannot meet the requirement of quickly and efficiently providing geographic information services by the emergency GIS map under a large amount of low-quality data. Summary of the Invention
[0009] Aiming at the problems existing in the display of vector data in traditional emergency GIS, based on the tile pyramid model in the raster tile map, this application uses an optimized global constraint algorithm to thin and simplify the original vector data at each level, uses the tile pyramid model to clip and slice the thinned and simplified vector data, and implements each tile according to the vector tile standard proposed by Mapbox. Through the organization and management of vector tiles, it is published in the form of a service. In addition, the style of the tile is designed. When the client requests a tile, it will specify the style, and the requested vector tile will be rendered and visualized according to the specified style. Design a vector tile model according to the vector tile standard proposed by Mapbox and optimize the global constraint algorithm. According to the tile pyramid model, design the clipping idea and clip the point, line, and surface features in the vector data. Use the quadtree index to organize and store and manage the generated tiles. Design the cache strategy for the client, expand the existing WMS and WMTS service standards, and design the vector tile map style, and publish the vector tiles in the form of a service. Implement the related technologies of vector tiles, create a prototype system, realize the static and dynamic slicing services of the vector map, and load and render it on the client, with higher stability. Especially when the quantity of emergency safety management is huge and the quality is poor, the map accuracy and efficiency have obvious advantages.
[0010] To achieve the above technical effects, the technical solutions adopted in this application are as follows:
[0011] For the emergency safety management GIS big data vector slicing service map, first simplify the vector features from the data source, and then use the tile pyramid to slice and re-encode to solve the problem of the transmission pressure of a large amount of vector data in the vector feature service, design the vector slicing service map and implement it;
[0012] One is to establish a vector tile model based on the tile pyramid model and according to the Mapbox vector tile standard; the second is to optimize the disadvantage of too many nestings in the global constraint algorithm. The improved global constraint method simplifies and thins the vector geographic data from the data source, and adds area and Manhattan distance as screening factors; the third is to construct clipping methods for point, line, and polygon features in vector features, use the tile pyramid model to realize the slicing and re - encoding of vector features, and store them in the MongoDB database, and conduct scheduling management through the created quadtree index; the fourth is to design the cache strategy and vector tile map style of the vector tile map client, update the geographic vector features from the perspectives of vector static slices and dynamic slices, and expand the OGC's WMS and WMTS services to realize the publication of vector tile map services; the fifth is to establish the overall structure of the system from three levels: hierarchical design, technical system, and architecture, and implement the prototype system;
[0013] 1) Based on the vector.mvt data format, adopt the Mapbox vector tile standard and implement the vector tile model;
[0014] 2) At each level of the tile pyramid model, use two factors, Manhattan distance and area, to screen and thin the vector elements in units of vector elements, and then use the optimized global constraint algorithm to perform secondary thinning on the screened vector geographic elements to remove redundant points inside the vector geographic elements;
[0015] 3) Construct two data update methods, vector static slices and vector dynamic slices, for the update of vector geographic elements, and provide a method to meet the efficient and rapid update of data in emergency management GIS for the data update of the global and local regions.
[0016] Preferably, for the design of the vector tile model: the vector tile uses Google Protocol Buffers to re - encode and serialize the tile, alleviating the data transmission pressure of the vector tile. When using it, define the data format structure once, and then automatically generate specific source code according to the encoder, which is convenient for effectively reading or writing formatted data across platforms. The serialization result is the connection of byte to byte, omitting the field name;
[0017] The vector tile is a collection of layers. Each layer consists of geometric elements and metadata describing the basic information of the layer. The geometric elements contain the geometric information and attribute information of the elements. Each vector tile contains at least one layer, and each layer contains at least one element. The layer contains a total of six fields: version, name, keys, values, extent, and features. Each features contains four fields: geometry, type, tags, and id;
[0018] The layer contains a version field, which represents the version number followed by the layer and is the first field of the layer. When the decoder of the client decodes the vector tile, it will first parse the version field to determine whether it can parse the layer. When encountering an unknown version layer, the decoder tries to parse it, skips the layer, and then continues to parse the next layer. The name field in the layer represents the layer name, and the name value in each vector tile is uniquely determined. When adding a new layer to the tile, it is necessary to check the existing layers to see if there is a layer with the same name. The metadata in each layer feature contains one or more key-value pairs, and then corresponding index lists (keys, values) are established for all the key and value values for the common use of the layer features. Each element of the keys field of the layer is of string type, and the keys list is a non-repeating set of the attribute names of the layer features. Each element of the values field of the layer is one of multiple types of values (integer type, string type, boolean type, floating-point type), and the values in the values list are unique. The key or value in the layer can be directly queried and retrieved according to its index number in the keys or values.
[0019] Preferably, for vector feature thinning and simplification: improve the global constraint method: connect the endpoints of the linear feature into a straight line, find the point with the maximum distance to the straight line among the remaining points, and record the maximum distance as dmax. Compare dmax with the critical value D. If dmax < D, then eliminate all intermediate points. If dmax > D, retain the point corresponding to dMax and divide the linear feature into two parts;
[0020] When implementing the global constraint method, it is combined with the stack data structure. The specific implementation steps are as follows:
[0021] The first step: The endpoints A and B of the curve have index values indexA and indexB respectively, and set the Z value of A and B to 1, and set the Z value of the remaining points to 0. The Z value is used to store the distance from the point to the straight line, and generate the stack Stack;
[0022] The second step: Connect A and B, find the point C with the maximum distance to the straight line AB among the remaining points, and record dmax and the index value indexC;
[0023] The third step: Compare dmax with the critical value. If dmax is greater than the critical value, then set the Z value of point C to dmax, push the index values indexA and indexC of A and C onto the stack Stack, assign C to A. If dmax is less than the critical value, perform two pop operations on the stack Stack and assign them to indexB and indexA respectively, find the corresponding points according to the index values and assign them to B and A respectively. By default, the value popped when the stack Stack is empty is null;
[0024] Step 4: Determine whether indexB is empty. If it is not empty, repeat the above Steps 1 to 3. If it is empty, the new ordered point set composed of points with non-zero Z values is the compressed linear feature.
[0025] Before performing the global constraint method, add two additional screening factors for each feature: Manhattan distance and area. When performing the slicing operation, compare the Manhattan distance and area with the critical values respectively. Only when it is greater than the critical value, add the feature to the tile, otherwise do not add it.
[0026] Preferably, for vector data feature clipping: When performing clipping, consider the inheritance relationship of the attribute information of the vector data, and clip the geometric information of the point, line, and polygon features of the vector feature according to the range of the tile.
[0027] The core of clipping polygon features and linear features is to clip the linear features. And an ordered set of points constitutes a linear feature. When clipping a linear feature, the actual operation object is each geometric point. The clipping of vector features is to extract the part belonging to the tile range according to the tile range and add it to the tile. All clippings are performed based on a copy of the original data. If vector features are clipped in a certain tile area, the vector data within the tile should be removed from the copy data, and the newly generated intersection points should be used as the new boundaries of the features to continue the subsequent clipping, which is convenient for improving the clipping efficiency.
[0028] 1) Point feature clipping: Only need to compare the point with the range of the tile TBbox(TXmin, TYmin, TXmax, TYmax). If the point is within the range, directly add the point feature to the tile. For special points falling on the tile boundary, it is set that the tile only saves the points on the left boundary and the upper boundary, so as to ensure that these points will only be stored once and not repeatedly stored.
[0029] 2) Line feature clipping: The relationship between the linear feature and the tile area is summarized into three cases: the linear feature is entirely inside the tile, the linear feature is entirely outside the tile, and the linear feature and the vector tile have intersections. Among them, there are multiple cases of intersections, that is, there is one intersection, two intersections, and multiple intersections.
[0030] When judging the relative position between the vector feature and the tile area, calculate the Bbox(Xmin, Ymin, Xmax, Ymax) of the feature, and compare the Bbox of the linear feature with the TBbox(TXmin, TYmin, TXmax, TYmax) of the tile area range to judge the relative position between the linear feature and the tile. The judgment method is as follows:
[0031] Step 1: Compare the Bbox of the linear feature with the tile area to obtain three cases: the linear feature is entirely inside the tile (TXmin < Xmin, TYmin < Ymin, Xmax < TXmax, Ymax < TYmax), the linear feature is entirely outside the tile (Xmax < TXmin or Ymax < TYmin or TXmax < Xin or TYmax < Ymin), and the linear feature intersects with the tile. Only in the third case is it necessary to perform a clipping operation on the vector feature. The linear feature is composed of an ordered point set, and the subsequent operation is to find the intersection points of the line feature and the tile;
[0032] Step 2: If the starting point of the linear feature is inside or on the boundary of the tile, and a subsequent point is outside the tile range, calculate the intersection point M with the tile through this point and the previous point and record it. Write the intersection point M and the previous point into the tile together, and start the next operation with the intersection point M as the starting point; otherwise, the linear feature is entirely inside the tile;
[0033] Step 3: If the starting point of the linear feature is outside or on the boundary of the tile, and a subsequent point is inside the tile, calculate the intersection point N with the tile through this point and the previous point and record it. Then, start from point N and go back to Step 2 to continue execution;
[0034] Repeat the above two operations of Step 2 and Step 3 to achieve the clipping of the linear feature. Some points that do not exist in the original linear feature are generated during the clipping process. These points have a marking and distinguishing effect in the subsequent tile loading and merging process, and these points are selected to be retained when writing into the tile;
[0035] 3) Polygon feature clipping: The relative relationship between the polygon feature and the tile area is basically divided into four types: the polygon feature is outside the tile, the polygon feature is inside the tile, and the polygon feature intersects with the tile. Among them, the intersection of the polygon feature and the tile is much more complex than that of the linear feature and the tile. The number of intersection boundaries between the polygon feature and the tile area is divided into four cases: intersecting one boundary, two boundaries, three boundaries, and four boundaries. The polygon feature covers the entire tile, and the tile comes from a multi-resolution pyramid model divided by a quadtree. When performing clipping, it is also clipped according to the quadtree. Now the polygon feature covers the entire tile. When the level is higher, this feature still continues to cover its sub-tiles. Make a record when covering for the first time, and there is no need to clip this polygon feature at subsequent levels to improve the clipping efficiency.
[0036] Compare the Bbox (Xmin, Ymin, Xmax, Ymax) of the areal feature with the TBbox (TXmin, TYmin, TXmax, TYmax) of the tile area range to preliminarily distinguish the relative positions of the areal feature and the tile area. Perform point-by-point operations on the clipping of the areal feature, and then determine whether the resulting ordered point set is closed. If it is not closed, perform a closing operation and reconstruct it into an areal feature to be written into the tile. The specific steps are as follows:
[0037] Step 1: Compare the Bbox of the areal feature with the tile area range. If TXmin < Xmin, TYmin < Ymin, Xmax < TXmax, and Ymax < TYmax are satisfied, it means the areal feature is inside the tile, and directly add the vector feature to the tile; if Xmax < TXmin or Ymax < TYmin or TXmax < Xin or TYmax < Ymin is satisfied, it means the areal feature is outside the tile and does not need to be added;
[0038] Step 2: If a point P(i) of the areal feature is inside the tile area while P(i + 1) is outside the tile area, calculate the intersection point M of the two points and the tile boundary, which is recorded as the exit point. Record point P(i), point M, and the boundary where point M is located, and then proceed to the next step;
[0039] Step 3: If a point P(i) of the areal feature is outside the tile area while P(i + 1) is inside the tile area, calculate the intersection point N of the two points and the tile boundary, which is recorded as the entry point. Record point N and its boundary. Both point M and point N are new points, and then proceed to the next step;
[0040] Step 4: If both point P(i) and point P(i + 1) are outside the tile area, assign point P(i + 1) to point P(i), and continue to loop and execute Step 4 until point P(i + 1) is inside the tile area, then execute Step 3;
[0041] Step 5: If both point P(i) and point P(i + 1) are inside the tile area, assign point P(+1) to point P(i), and continue to loop and execute Step 5 until point P(i + 1) is outside the tile area, then execute Step 2;
[0042] Step 6: After all the ordered point sets of the areal features are calculated, construct a new areal feature object based on the closed ordered point set to complete the clipping work. If during the above operations, if the points of the areal feature are outside the tile, or there are only intersections with the tile but no points inside the tile, this indicates that the areal feature covers the tile area. Record this areal feature, and no further clipping operations are required at the sub-tile level of this feature;
[0043] For the reserved intersection points, when the front end of the linear feature is drawn, it is covered by the drawn linear feature itself and is invisible to the user, which has no impact on the user experience. However, for the polygon feature, additional processing is performed on these newly added points during the front-end loading and drawing.
[0044] Preferably, generate vector tiles: Use the multi-resolution tile pyramid model to cut and clip the vector geographic data, organize the vector data of the clipped tiles according to the vector tile model, and then encode and serialize it into the.mvt format. The specific steps are as follows:
[0045] Step 1: Preprocess the vector geographic data, including format conversion and coordinate conversion, to generate GeoJSON format vectors. First, calculate the Manhattan distance dist and area of each feature, and then calculate the z value using the optimized global constraint method.
[0046] Step 2: Perform conversion processing on each feature object to generate a new feature, including feature id, type, tags, max and min, and geometry.
[0047] Step 3: According to the vector geographic feature range Bbox[south, west, north, east] and the map level zoom (min, max), perform all subsequent operations from the minimum level to the maximum level of the map.
[0048] Step 4: According to the current map level zoom, calculate the tile range [TXmin, TYmin, TXmax, TYmax] of the geographic feature range and the critical value of the current level.
[0049] Step 5: First, remove vector features smaller than the critical value from the perspectives of dist and area according to the threshold value at the current level, and then remove the simplified points in the features according to the z value to obtain the simplified features.
[0050] Step 6: Extract the vector data within the tile range, use the tile to clip the vector features, and write the clipped data into the tile in the vector tile structure.
[0051] Step 7: Perform geometric encoding processing on each tile and save it to the database or transfer it to the client according to the path rule of z / x / y.mvt.
[0052] Preferably, organize and manage vector tiles: Use a quadtree index to store and manage vector tile files to achieve fast indexing from geographical locations to tile files.
[0053] The continuous recursive partitioning of the geospatial space forms a tree structure with multiple levels. Each branch node has at most four nodes. Vector tiles are hierarchically partitioned according to different resolutions, forming a multi-resolution tile pyramid structure from top to bottom. Tiles are encoded uniquely based on the pyramid level and row and column numbers. By converting the geographic coordinates into this encoding, the storage location of the tile can be retrieved. After the vector data tiles are constructed, they are stored in the MongoDB database. The tile data is requested in the form of "URI / z / x / y.mvt", where z represents the level of the tile, x represents the column number of the tile, y represents the row number of the tile, and.mvt is the encoded vector tile. When constructing the data pyramid, not all global vector data needs to be constructed, only the required part of the data needs to be constructed. If there is no data for the vector tiles in a certain area, no index is generated for this location.
[0054] Preferably, the vector tile map caching strategy:
[0055] Step a: Create an empty HashTable and a queue List. The key in the HashTable stores the ID of the tile, the value stores the index index of the tile in the cache, the queue List stores the ID of the tile, and the maximum number of tiles in the cache is denoted as Max;
[0056] Step b: When the client retrieves a tile, search for it in the HashTable by the tile ID. If it can be found, directly retrieve the tile in the cache according to the index value of the value, and then put the tile number at the end of the List. If it cannot be found, first check whether the tiles in the current cache are full, that is, judge whether List.length >= Max; if the number of tiles in the cache is full, then tiles need to be removed and go to step c, otherwise directly go to step d;
[0057] Step c: Obtain the ID of the tile at the head of the queue List, delete the tile at the head of the queue and in the cache, and then delete the corresponding record in the HashTable according to the tile ID;
[0058] Step d: Assign the tile ID not found in the HashTable and the index value in the cache to the key and value of the HashTable respectively, and store the tile ID at the end of the queue List;
[0059] Step e: Continue to retrieve new tiles and execute step b until there are no new tiles to retrieve;
[0060] When browsing a map, panning and zooming operations are always performed. The client calculates the map tile IDs that cover the range of the screen viewport, and preferentially retrieves them from the cache to check if the tile exists in the cache. If the tile exists, it is directly extracted from the cache and rendered. If not, the client sends a request to the remote server to obtain the tile, then renders it, adds it to the cache, and removes the tiles in the cache according to the cache mechanism. When frequently panning or zooming in a certain area, the tiles are directly extracted from the cache to improve the rendering efficiency.
[0061] Preferably, for the update of vector tile map data: it is set as static vector tile update and dynamic vector tile update in terms of update frequency and method;
[0062] 1 - Vector static slicing: The static slicing of vector geographic features is for geographical entities where the geographical features within a large range do not change significantly over a long period. Vector static slicing is more suitable as the base map of the tile map. The static vector slices slice the vector geographic features into tiles at different levels as needed, store them in the database, and create an index to achieve efficient scheduling of the tiles. After receiving the client's request, the server directly searches for the corresponding slice file according to the index and returns it to the client.
[0063] 2 - Vector dynamic slicing: The map server accesses the updated vector geographic features in the database according to the user's request parameters, performs real - time slicing processing on the vector geographic features, and returns the generated tile data to the client;
[0064] When the vector geographic data in the layer changes, calculate the corresponding tiles according to the changed area, and update the data within the tiles without updating the entire vector tile pyramid. The specific steps are as follows:
[0065] Step a: Calculate the geographical space range Bbox, that is, [south, west, north, east], according to the data to be updated, and mark the status of the data to be updated: new, modified, deleted;
[0066] Step b: Obtain the number of layers of the tile pyramid constructed for the data to be updated;
[0067] Step c: Calculate the tile ranges covered by the data to be updated in each layer of the tile pyramid respectively, traverse the data within the tiles, and update the data within the tile ranges according to the marked status of the data to be updated above.
[0068] Preferably, for the publication of vector tile map services: If the vector tiles are to be published in the form of WMS or WMTS services, WM(T)S needs to be extended so that it can support vector tile formats, including MVT, GeoJSON, TopoJSON;
[0069] 1 - Vector tile WMS: The vector tile WMS service returns corresponding vector tiles according to the user's request. The vector tile WMS redefines the GetMap operation, retrieves on the server side according to the request parameters sent by the client, and the server returns a vector tile, whose geospatial parameters and size parameters are clearly defined. The format of the returned vector tile is MVT, GeoJSON, TopoJSON;
[0070] 2 - Vector tile WMTS: A new format is extended based on the OGC's WMTS service specification. The vector tile WMTS service returns corresponding vector tiles according to the user's request;
[0071] The vector tile WMTS redefines the GetTile operation, retrieves on the server side according to the request parameters sent by the client, and the server returns the corresponding vector tile, whose geospatial parameters and size parameters are clearly defined. The format of the returned vector tile is MVT, GeoJSON, TopoJSON;
[0072] The WM(T)S service in OGC returns directly visualizable data, while the vector tile returns encoded data and does not directly perform visual display. A client that supports vector tile decoding and rendering needs to perform relevant decoding operations and rendering before it can be displayed;
[0073] 3 - Vector tile drawing: Each feature of the vector tile has a unique ID. The linear features are spliced according to the uniqueness of the feature ID. If the IDs of the features are the same and there are common points directly between the two features, the two features are directly connected, the common points are removed, and the type in the geometry is set to LineString. If the IDs of the two features are the same but there are no common points between the two features, the type in the geometry of the feature is modified to MultiLineString;
[0074] The merging of polygon features also involves the filling of polygon features, that is, judging whether the linear features are merged, and the polygon features are merged according to the uniqueness of the polygon feature ID. For the common points on the tile boundary, if the type of the polygon feature is Polygon, the same processing method as the linear feature is used to remove the boundary line. If the type of the polygon feature is MultiPolygon, the boundary line is retained.
[0075] Compared with the prior art, the innovation points and advantages of this application are:
[0076] (1) This application first simplifies vector features from the data source, and then uses the tile pyramid for slicing and re - encoding to solve the problem of the transmission pressure of large - volume vector data in vector feature services, designs a vector tile service map and implements it. First, based on the tile pyramid model, a vector tile model is established according to the Mapbox vector tile standard. Second, the disadvantages of the global constraint algorithm with many nested levels are optimized, and area and Manhattan distance are added as screening factors. Third, a clipping method for point, line, and polygon features in vector features is constructed. Using the tile pyramid model, the slicing and re - encoding of vector features are realized and stored in the MongoDB database, and scheduling management is carried out through the created quadtree index. Fourth, a caching strategy for the vector tile map client and the vector tile map style are designed. The geographical vector features are updated from the perspectives of vector static slices and dynamic slices, and the OGC's WMS and WMTS services are extended to realize the publication of the vector tile map service. Fifth, the overall structure of the system is established from three levels: hierarchical design, technical system, and architecture, and a prototype system is implemented to meet the demand for quickly and efficiently providing geographical information services by the emergency GIS map under a large amount of low - quality data.
[0077] (2) Aiming at the problems existing in the display of vector data in traditional emergency GIS, this application is based on the tile pyramid model in the raster tile map. At each level, the original vector data is thinned and simplified using the optimized global constraint algorithm, and the thinned and simplified vector data is clipped and sliced using the tile pyramid model. According to the vector tile standard proposed by Mapbox, each tile is implemented. Through the organization and management of vector tiles, it is published in the form of a service. In addition, the style of the tile is designed. When the client requests a tile, the style will be specified, and the requested vector tile will be rendered and visualized according to the specified style. A vector tile model is designed according to the vector tile standard proposed by Mapbox, and the global constraint algorithm is optimized. According to the tile pyramid model, a clipping idea is designed to clip the point, line, and polygon elements in the vector data. The quadtree index is used to organize and store and manage the generated tiles. The caching strategy for the client is designed, the existing WMS and WMTS service standards are extended, and the vector tile map style is designed, and the vector tiles are published in the form of a service. The relevant technologies of vector tiles are implemented, a prototype system is created, the static and dynamic slice services of the vector map are realized, and are loaded and rendered on the client, and the stability is higher. Especially when the quantity of emergency safety management is huge and the quality is poor, the advantages of map accuracy and efficiency are obvious.
[0078] (3)In this application, when dealing with a large amount of vector geographic data in traditional emergency management GIS, the vector geographic data is first rasterized, then sliced, and published in the form of a service, which destroys the integrity, flexibility, real-time nature, etc. of the vector geographic data. By adopting the tile pyramid model, at each level, the vector geographic features are screened respectively using the Manhattan distance and area, and then thinned and simplified using the optimized global constraint algorithm. The vector data is extracted according to the tiles, cropped and encoded, and then stored in the MongoDB database. And it is scheduled and managed through the created quadtree index. In this way, it not only inherits the characteristics of vector data but also retains the integrity of vector geographic features. Moreover, compared with the original vector data, the vector tiles are smaller in volume due to re-encoding, and the data information is nearly lossless. For the map style, the user can customize the design, and the vector tiles are rendered according to the specified style on the server side or the client side, realizing the rapid switching of different styles, which is more flexible and convenient. When the spatial data in the database changes, the client requests rendering again and gets the latest data, meeting the requirement of the emergency management GIS for rapid data update. Facing emergency safety management, the map generation speed is fast and the accuracy is relatively high. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1 FIG. is a schematic flow chart of the combination of the optimized global constraint method and the stack data structure.
[0080] Figure 2 FIG. is a schematic diagram of the three-view matching element.
[0081] Figure 3 FIG. is a schematic diagram of the polygon feature clipping.
[0082] Figure 4 FIG. is a flow chart of the vector tile map caching strategy.
[0083] Figure 5 FIG. is a UML sequence diagram of the extended vector tile WMS interaction process.
[0084] Figure 6 FIG. is a structural diagram of the technical system adopted by the entire emergency management GIS platform.
[0085] Figure 7 FIG. is a schematic diagram of the client modifying and replacing the style of the vector tile layer.
[0086] Figure 8 FIG. is a schematic diagram of the client clipping the vector tiles. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0087] The following further describes the technical solution of the emergency safety management GIS big data vector tile service map provided by this application with reference to the accompanying drawings, so that those skilled in the art can better understand this application and be able to implement it.
[0088] In recent years, with the rapid development of network technology and the explosive growth of information, the role played by GIS in emergency safety management has become increasingly important. The realization of network map services is a prerequisite for data visualization and spatial query analysis of emergency management GIS. When facing a large amount of vector data, traditional emergency management GIS mostly loads based on raster tile services. Traditional emergency management GIS will pre-render vector feature data into raster maps according to the specified map style, and then use the tile pyramid model to slice the raster data to generate raster data tiles with multiple resolutions, and publish them in the form of services.
[0089] Although this relieves the pressure on the server side and optimizes data transmission, it is not flexible enough because the map style cannot be changed after rendering. And the rendering and slicing process destroys the data integrity of the original vector features. Especially when the ground features change, it is necessary to re-render and slice the data, and the timely update of the ground features cannot be achieved. This cannot truly meet the high requirements of emergency management GIS for data timeliness, flexibility, and integrity. To address this issue, this application first simplifies the vector features at the data source, and then uses the tile pyramid for slicing and re-encoding to solve the problem of the transmission pressure of a large amount of vector data in the vector feature service, designs a vector tile service map and implements it;
[0090] This application is based on the tile pyramid model and establishes a vector tile model according to the Mapbox vector tile standard; secondly, it optimizes the shortcomings of the global constraint algorithm with a large number of nestings and adds area and Manhattan distance as screening factors; thirdly, it constructs a clipping method for point, line, and polygon features in vector features, uses the tile pyramid model to realize the slicing and re-encoding of vector features, and stores them in the MongoDB database, and performs scheduling management through the created quadtree index; fourthly, it designs the cache strategy of the vector tile map client and the vector tile map style, updates the geographic vector features from the perspectives of vector static slicing and dynamic slicing, and expands the OGC's WMS and WMTS services to realize the publication of the vector tile map service; fifthly, it establishes the overall structure of the system from three levels: hierarchical design, technical system, and architecture, and implements a prototype system.
[0091] I. Multi-resolution large data vector tile model
[0092] Design a vector tile model based on the Mapbox vector tile standard, establish the basic structure of vector tiles, and use Google Protocol Buffers to define the encoding rules for the features in the tiles. Use the improved global constraint method to simplify and thin the vector geographic data from the data source, and additionally add two factors, Manhattan distance and area, to the vector features to prepare for further screening when adding features to the tiles.
[0093] (1) Design of Vector Tile Model
[0094] Vector tiles are re-encoded and serialized using Google Protocol Buffers to relieve the data transmission pressure of vector tiles. When using, only need to define the data format structure once, and then automatically generate specific source code according to the encoder, which is convenient and effective for reading or writing formatted data across platforms. The serialization result is the connection of byte to byte, omitting the field names, and it is also smaller in storage than other methods, saving more space. However, this makes the data less readable and increases the difficulty of debugging.
[0095] Vector tiles are a collection of layers. Each layer consists of geometric features and metadata describing the basic information of the layer. The geometric features contain the geometric information and attribute information of the features. Each vector tile contains at least one layer, and each layer contains at least one feature. The layer contains a total of six fields: version, name, keys, values, extent, and features. Each features contains four fields: geometry, type, tags, and id.
[0096] The layer contains a version field, which represents the version number followed by the layer and is the first field of the layer. When the decoder of the client decodes the vector tile, it will first parse the version field to determine whether it can parse the layer. When encountering an unknown version layer, the decoder tries to parse it, skips the layer, and then continues to parse the next layer. The name field in the layer represents the layer name, and the name value in each vector tile is uniquely determined. When adding a new layer to the tile, it is necessary to check the existing layers to see if there is a layer with the same name. The metadata in each layer feature contains one or more key-values, and then corresponding index lists (keys, values) are established for all the key and value values for common use by the features in the layer. Each element of the keys field of the layer is of string type, and the keys list is a non-repeating set of the attribute names of the layer features. Each element of the values field of the layer is one of various types of values (integer type, string type, boolean type, floating-point type), and the values in the values list are unique. The key or value in the layer can be directly queried and retrieved according to its index number in the keys or values;
[0097] Each feature contains a geometry field, which represents a sequence of 32-bit unsigned integers after the geometry is encoded. The type field of the feature represents the type of the geometric feature. The tags in the feature represent the key-value in the keys-values, the index in the list of attribute names and attribute values. The tags appear in pairs. The first tags represents the index value of the key, and the second tags represents the index value of the value. In addition, each feature has a unique id field for marking and distinguishing.
[0098] (2) Vector feature thinning and simplification
[0099] The simplification of linear features satisfies maintaining the accuracy of the bending inflection points, maintaining the overall similarity of the feature graph, and the consistency of the bending degree in different regions. On the basis of meeting the above conditions, as many redundant or secondary nodes on the linear feature as possible are removed to reduce the data volume of the linear feature. This application improves the global constraint method: connect the endpoints of the linear feature into a straight line, find the point with the maximum distance to the straight line among the remaining points, and record the maximum distance as dmax. Compare dmax with the critical value D. If dmax < D, all intermediate points are removed. If dmax > D, the point corresponding to dMax is retained, and the linear feature is divided into two parts, and the previous method is repeated for each part.
[0100] In order to minimize the recursive levels in the global constraint method and improve the loop efficiency, this application combines the implementation of the global constraint method with the stack data structure. The specific implementation steps are as follows, and the algorithm flow is asFigure 1 shown.
[0101] Step 1: The endpoints A and B of the curve have index values indexA and indexB respectively, and the Z value of A and B is set to 1. The Z value of the other points is set to 0. The Z value is used to store the distance from the point to the line, and a stack is generated.
[0102] Step 2: Connect A and B, find the point C with the maximum distance to the straight line AB among the remaining points, and record dmax and index value indexC;
[0103] Step 3: Compare dmax with the critical value. If dmax is greater than the critical value, set the Z value of point C to dmax, push the index values of A and C into the stack, and assign C to A. If dmax is less than the critical value, pop the stack twice and assign them to indexB and indexA respectively. Find the corresponding points according to the index values and assign them to B and A respectively. When the default stack is empty, the value popped is null.
[0104] Step 4: Determine whether indexB is empty. If it is not empty, repeat the above steps 1 to 3. If it is empty, a new ordered point set consisting of points whose Z values are not 0 is the compressed linear feature.
[0105] The simplification of various vector geographic data mentioned above is based on each vector element as a unit. The nodes inside the vector elements are eliminated on the basis of ensuring the overall similarity before and after the simplification of the elements as much as possible. When the tile level is high, the resolution is large, and some elements with small area or short length are ignored. As the map level increases and the resolution decreases, these tiny elements are gradually visible and presented in the tiles. Before the global constraint method is used, two additional screening factors are added to each element: Manhattan distance and area. When performing the slicing operation, the Manhattan distance and area are compared with the critical value respectively. When it is greater than the critical value, the element is added to the tile, otherwise it is not added.
[0106] 2. Organization and management of vector tile emergency maps
[0107] The key to the application of vector slicing technology is to cut and clip vector elements according to the tile pyramid model, so as to add vector elements to each tile. For the generated vector tiles, it is necessary not only to organize and manage them from the storage perspective, but also to consider how to schedule the tiles when subsequent services are released. This application designs a vector tile clipping strategy and the storage organization and management of clipped tiles.
[0108] (I) Coordinate transformation
[0109] The generation from vector geographic data to vector tiles involves not only geographic coordinate systems and projection coordinate systems, but also tile coordinate systems. The tile encoding is essentially the coordinates of the tile in the tile coordinate system.
[0110] The resolution is different at different map levels. Each level of the map has a corresponding tile coordinate system. Each tile coordinate takes the upper left corner of the map as the origin, with the positive direction to the right on the horizontal axis and the positive direction downward on the vertical axis.
[0111] (2) Clipping of vector data elements
[0112] Compared with the clipping of raster tile data, the clipping of vector geographic data is much more complex. The clipping of raster images is essentially to cut the raster data according to the specified area, while the clipping of vector data is different. Since vector geographic data describes a geographic entity, which not only has geometric coordinate information but also has attribute information describing the geographic entity, the inheritance relationship of the attribute information of vector data has to be considered during clipping. Therefore, vector data clipping is to clip the geometric information of point, line, and polygon elements of vector features according to the tile range.
[0113] The core of the clipping of polygon and line elements is to clip the line elements. And a line element is composed of an ordered set of points. When clipping a line element, the actual operation object is each geometric point. The clipping of vector features is to extract the part belonging to the tile range according to the tile range and add it to the tile. All clippings are performed based on a copy of the original data. If vector features are clipped within a certain tile area, the vector data within the tile should be removed from the copy data, and the newly generated intersection points should be used as the new boundaries of the features to continue the subsequent clipping, which is convenient for improving the clipping efficiency.
[0114] 1. Clipping of point features
[0115] It is only necessary to compare the point with the tile range TBbox (TXmin, TYmin, TXmax, TYmax). If the point is within the range, the point feature is directly added to the tile. For those special points that fall on the tile boundary, it is set that the tile only saves the points on the left boundary and the upper boundary, so as to ensure that these points will only be stored once and will not be stored repeatedly.
[0116] 2. Clipping of line features
[0117] The relationship between line features and tile areas can be summarized into three cases: the line feature is entirely inside the tile, the line feature is entirely outside the tile, and the line feature and the vector tile have intersection points. Among them, there are multiple cases of intersection points, that is, there is one intersection point, two intersection points, and multiple intersection points, as Figure 2 shown.
[0118] When determining the relative position between a vector feature and a tile area, calculate the Bbox (Xmin, Ymin, Xmax, Ymax) of the feature, and compare the Bbox of the linear feature with the TBbox (TXmin, TYmin, TXmax, TYmax) of the tile area to determine the relative position between the linear feature and the tile. The determination method is as follows:
[0119] Step 1: Comparing the Bbox of the linear feature with the tile area results in three cases: the linear feature is entirely inside the tile (TXmin < Xmin, TYmin < Ymin, Xmax < TXmax, Ymax < TYmax), the linear feature is entirely outside the tile (Xmax < TXmin or Ymax < TYmin or TXmax < Xin or TYmax < Ymin), and the linear feature and the tile have an intersection. Only in the third case does a clipping operation need to be performed on the vector feature. The linear feature is composed of an ordered point set, and the subsequent operation is to find the intersection points of the line feature and the tile;
[0120] Step 2: If the starting point of the linear feature is inside or on the boundary of the tile, and a subsequent point is outside the tile range, calculate the intersection point M with the tile through this point and the previous point and record it. Write the intersection point M and the previous point into the tile together, and start the next operation with the intersection point M as the starting point; otherwise, the linear feature is entirely inside the tile;
[0121] Step 3: If the starting point of the linear feature is outside or on the boundary of the tile, and a subsequent point is inside the tile, calculate the intersection point N with the tile through this point and the previous point and record it. Then, start from point N and go back to Step 2 to continue execution;
[0122] Repeat the above two operations of Step 2 and Step 3 to achieve the clipping of the linear feature. During the clipping process, some points that do not exist in the original linear feature are generated. These points have a marking and distinguishing effect in the subsequent tile loading and merging process, and these points are selected to be retained when writing into the tile.
[0123] 3. Polygon Feature Clipping
[0124] The relative relationship between a polygon feature and a tile area is basically divided into four types: the polygon feature is outside the tile, the polygon feature is inside the tile, the polygon feature and the tile intersect. Among them, the intersection of the polygon feature and the tile is much more complex than that of the linear feature and the tile. The number of intersection boundaries between the polygon feature and the tile area is divided into four cases: intersecting one boundary, two boundaries, three boundaries, and four boundaries. The case where the polygon feature covers the entire tile (i.e., the tile is inside the polygon feature) needs to be recorded, as Figure 3The tiles are derived from a multi - resolution pyramid model divided by a quadtree. When performing cropping, it is also cropped according to the quadtree. Now, the areal feature covers the entire tile. When the level is higher, the feature continues to cover its sub - tiles. A record is made during the first coverage, and there is no need to crop the areal feature at subsequent levels, which improves the cropping efficiency.
[0125] Compare the Bbox (Xmin, Ymin, Xmax, Ymax) of the areal feature with the TBbox (TXmin, TYmin, TXmax, TYmax) of the tile area range to preliminarily distinguish the relative positions of the areal feature and the tile area. Perform point - by - point operations on the cropping of the areal feature, and then determine whether the ordered point set after processing is closed. If it is not closed, it needs to be closed and reconstructed into an areal feature to be written into the tile. The specific steps are as follows:
[0126] Step 1: Compare the Bbox of the areal feature with the tile area range. If TXmin < Xmin, TYmin < Ymin, Xmax < TXmax, and Ymax < TYmax are satisfied, it means the areal feature is inside the tile, and directly add the vector feature to the tile; if Xmax < TXmin or Ymax < TYmin or TXmax < Xin or TYmax < Ymin are satisfied, it means the areal feature is outside the tile and does not need to be added.
[0127] Step 2: If a point P(i) of the areal feature is inside the tile area while P(i + 1) is outside the tile area, calculate the intersection point M of the two points and the tile boundary, record the point P(i), the point M, and the boundary where the point M is located, and perform the next step.
[0128] Step 3: If a point P(i) of the areal feature is outside the tile area while P(i + 1) is inside the tile area, calculate the intersection point N of the two points and the tile boundary, record the point N and its boundary. Both the point M and the point N are new points, and perform the next step.
[0129] Step 4: If both the point P(i) and the point P(i + 1) are outside the tile area, assign the point P(i + 1) to the point P(i), and continue to loop and execute Step 4 until the point P(i + 1) is inside the tile area, then execute Step 3.
[0130] Step 5: If both the point P(i) and the point P(i + 1) are inside the tile area, assign the point P(+1) to the point P(i), and continue to loop and execute Step 5 until the point P(i + 1) is outside the tile area, then execute Step 2.
[0131] Step 6: After the ordered point sets of all planar features are calculated, construct new planar feature objects based on the closed ordered point sets to complete the clipping work. If, in the above operations, the points of a planar feature are outside the tile, or there are only intersections with the tile but no points inside the tile, it indicates that the planar feature covers the tile area. Record this planar feature, and there is no need to perform further clipping operations at the sub-tile level of this feature.
[0132] For the remaining intersection points, the front end of the line feature is covered by the drawn line feature itself and is invisible to the user, which has no impact on the user experience. However, for planar features, these newly added points are processed additionally during the front-end loading and drawing.
[0133] (3) Generate vector tiles
[0134] Use the multi-resolution tile pyramid model to cut and clip the vector geographic data, organize the vector data of the clipped tiles according to the vector tile model, and then encode and serialize it into the.mvt format. The specific steps are as follows:
[0135] Step 1: Preprocess the vector geographic data, including format conversion and coordinate conversion, to generate vector in GeoJSON format. First, calculate the Manhattan distance dist and area of each feature, and then calculate the z value using the optimized global constraint method.
[0136] Step 2: Perform conversion processing on each feature object to generate a new feature, including feature id, type (geometry type), tags (attribute information), max and min (the Bbox of the feature), and geometry (including area, dist, and coordinate array [x, y, z]).
[0137] Step 3: Based on the Bbox [south, west, north, east] of the vector geographic feature range and the map level zoom (min, max), perform all subsequent operations from the minimum level to the maximum level of the map in a loop.
[0138] Step 4: According to the current map level zoom, calculate the tile range [TXmin, TYmin, TXmax, TYmax] of the geographic feature range and the critical value at the current level.
[0139] Step 5: First, eliminate vector features smaller than the critical value from the perspectives of dist and area according to the threshold at the current level, and then eliminate the simplified points in the feature according to the z value to obtain the simplified feature.
[0140] Step 6: Extract the vector data within the tile range, clip the vector features using the tile, and write the clipped data into the tile in the vector tile structure;
[0141] Step 7: Perform geometric graphic encoding processing on each tile and save it to the database or transfer it to the client according to the path rule of z / x / y.mvt.
[0142] (4) Vector Tile Organization and Management
[0143] The vector tile files are stored and managed using a quadtree index to achieve fast indexing from geographical locations to tile files;
[0144] The geographical space is continuously recursively divided into a tree structure with multiple levels. Each branch node has at most four nodes. The vector tiles are divided into layers according to different resolutions, forming a multi-resolution tile pyramid structure from top to bottom. The tiles are uniquely encoded according to the pyramid level and row and column numbers. By converting the geographical coordinates into this encoding, the storage location of the tile can be retrieved. After the vector data tiles are constructed, they are stored in the MongoDB database. The tile data is requested in the form of "URI / z / x / y.mvt", where z represents the level of the tile, x represents the column number of the tile, y represents the row number of the tile,.mvt is the encoded vector tile. When constructing the data pyramid, not all the vector data of the whole world needs to be constructed, only the required part of the data needs to be constructed. If there is no data for the vector tiles in a certain area, no index for this place is generated.
[0145] III. Vector Tile Emergency Map Service Publishing
[0146] The vector geographic feature slicing service map is divided into dynamic slices and static slices from the perspective of update frequency. Among them, static slices are for those vector geographic features that do not change repeatedly or are in a large range, while dynamic vector slices are applicable to data updates with a fast update frequency and in a small local area. Both publish the vector tiles in the form of services. The client first decodes the requested vector tiles, processes the newly added points during the clipping process, and then renders and visualizes them according to the specified map style.
[0147] Based on the OGC standard features of geospatial information services, this application designs a front-end caching mechanism for vector tile maps. The LRU algorithm and hash table are combined to implement tile caching on the client side. Then, Mapbox Studio is used to design the style of the vector tile map, and the designed map style conforms to the map style specifications of Mapbox. Next, vector geographic features are updated in two ways: vector static slicing and dynamic slicing. The WM(T)S service of the OGC standard is extended to support the vector tile data format, and the vector tiles are published in the form of a service. Finally, the vector tiles requested by the client are decoded, and the newly added points during the process of merging, removing, and clipping the tiles are removed to achieve the drawing of vector tiles.
[0148] (1) Vector Tile Map Caching Strategy
[0149] The processing flow is as Figure 4 :
[0150] Step a: Create an empty HashTable and a queue List. The key in the HashTable stores the ID (or number) of the tile, the value stores the index index of the tile in the cache, the queue List stores the ID (or number) of the tile, and the maximum number of tiles in the cache is denoted as Max;
[0151] Step b: When the client retrieves a tile, it searches in the HashTable by the ID (or number) of the tile. If it can be found, the tile in the cache is directly retrieved according to the index value of the value, and then the tile number is placed at the end of the List. If not found, it is first necessary to check whether the tiles in the current cache are full, that is, to judge whether List.length >= Max; if the number of tiles in the cache is full, then tiles need to be removed and go to Step c, otherwise directly go to Step d;
[0152] Step c: Obtain the ID of the tile at the head of the queue List, delete the tile at the head of the queue and in the cache, and then delete the corresponding record in the HashTable according to the tile ID;
[0153] Step d: Assign the tile ID (or number) not found in the HashTable and the index value in the cache to the key and value of the HashTable respectively, and store the tile ID (or number) at the end of the queue List;
[0154] Step e: Continue to retrieve new tiles and execute Step b until there are no new tiles to retrieve;
[0155] When browsing a map, panning and zooming operations are always performed. The client calculates the map tile IDs covering the range according to the screen viewport range, and preferentially retrieves them from the cache to check if the tile exists in the cache. If the tile exists, it is directly extracted from the cache and rendered. If not, the client sends a request to the remote server to obtain the tile, then renders it, adds it to the cache, and removes the tiles in the cache according to the cache mechanism. When frequently panning or zooming in a certain area, the tiles are directly extracted from the cache, greatly improving the rendering efficiency.
[0156] (2) Vector tile map style design
[0157] The style of the vector tile map is implemented by encoding, but this is only suitable for use with small amounts of data or certain features and is not suitable for map cartography. Commonly used style design tools are adopted, including TileMill, MapboxStudio, and MapboxStudioClassic;
[0158] TileMill uses geographic coordinate vectors and raster data to create raster backgrounds and interactive web maps. It uses CartoCSS to design map styles, which are constructed by applying style rule modules to object groups. Style blocks are represented by curly braces and contain various style attributes and values. Filters are used to modify selections, and the filters reduce the number of objects to which the style is applied according to specific conditions;
[0159] (3) Vector tile map data update
[0160] Geographic entities in the real world are constantly changing, especially in emergency management GIS. When emergencies occur, geographic features always change, and the map needs to be updated immediately. The update of vector geographic features is set as static vector tile update and dynamic vector tile update in terms of update frequency and method.
[0161] 1. Vector static slices
[0162] The static slices of vector geographic features are for geographic entities where the geographic features do not change significantly over a long period in a large area. Vector static slices are more suitable as the base map of the tile map. The static vector slices slice the vector geographic features into tiles at different levels as needed, store them in the database, and create an index to achieve efficient scheduling of the tiles. After receiving the client's request, the server directly looks up the corresponding slice file according to the index and returns it to the client.
[0163] 2. Vector dynamic slices
[0164] After statically slicing the vector geographic features in the global area, the problem of updating the vector geographic features also needs to be solved, and the updated data are all in local areas. The map server accesses the updated vector geographic features in the database according to the request parameters of the user, performs real-time slicing processing on the vector geographic features, and returns the generated tile data to the client.
[0165] When the vector geographic data in the layer changes, calculate the corresponding tiles according to the changed area, and update the data in the tiles without updating the entire vector tile pyramid. The specific steps are as follows:
[0166] Step a: Calculate the geospatial range Bbox, i.e., [south, west, north, east], according to the data to be updated, and mark the status of the data to be updated: new, modified, deleted;
[0167] Step b: Obtain the number of layers of the tile pyramid already constructed for the data to be updated;
[0168] Step c: Calculate the tile ranges covered by the data to be updated in each layer of the tile pyramid respectively, traverse the data in the tiles, and perform update operations on the data within the tile ranges according to the marked status of the data to be updated above.
[0169] (4) Publication of vector tile map service
[0170] Since the data formats supported in the OGC standard WMS and WMTS services do not include the vector tile data format, if you want to publish vector tiles in the form of WMS or WMTS services, you need to expand WM(T)S so that it can support vector tile formats, including MVT, GeoJSON, and TopoJSON.
[0171] 1. Vector sliced WMS
[0172] The vector sliced WMS service is a new format extended based on the OGC's WMS service specification. The vector sliced WMS service returns corresponding vector tiles (including MVT, GeoJSON, TopoJSON) according to the user's request. The vector sliced WMS redefines the GetMap operation, retrieves on the server side according to the request parameters sent by the client, and the server returns a vector tile, whose geospatial parameters and size parameters are clearly defined, and the returned vector tile format is MVT, GeoJSON, TopoJSON. Figure 5 It is the UML sequence description of the interaction process between the extended vector sliced WMS client and the server.
[0173] 2. Vector sliced WMTS
[0174] Vector tile WMTS is a new format extended based on the OGC's WMTS service specification. The vector tile WMTS service returns corresponding vector tiles (including MVT, GeoJSON, TopoJSON) according to the user's request.
[0175] Vector tile WMTS redefines the GetTile operation, retrieves on the server side according to the request parameters sent by the client, and the server returns the corresponding vector tiles. Its geospatial parameters and size parameters have been clearly defined, and the returned vector tile format is MVT, GeoJSON, TopoJSON.
[0176] The WM(T)S service in OGC returns directly visualizable data, while vector tiles return encoded data and are not directly visually displayed. A client that supports vector tile decoding and rendering needs to perform relevant decoding operations and rendering before it can be displayed.
[0177] 3. Vector tile drawing
[0178] Since the vector tiles requested by the client are data encoded by Google Protocol Buffers, the vector tiles need to be decoded before being drawn on the client. And the decoded tiles are data obtained after cropping. When cropping the vector geographic data, several new nodes and tile boundary lines are added, and these nodes and boundary lines need to be merged with the tiles before drawing.
[0179] Each feature of the vector tile has a unique ID. The linear features are spliced according to the uniqueness of the feature ID. If the IDs of the features are the same and there are common points directly between the two features, the two features are directly connected, the common points are removed, and the type in the geometry is set to LineString. If the IDs of the two features are the same but there are no common points between the two features, the type in the geometry of the feature is modified to MultiLineString.
[0180] The merging of polygon features also involves the filling of polygon features, that is, judging whether the linear features are merged, and the polygon features are merged according to the uniqueness of the polygon feature ID. For the common points on the tile boundary, if the type of the polygon feature is Polygon, the same processing method as the linear feature is used to remove the boundary line. If the type of the polygon feature is MultiPolygon, the boundary line is retained.
[0181] IV. Emergency map system architecture
[0182] The emergency management GIS platform adopts a layered design with clear division of labor to ensure the clarity of basic operations during the development process. This not only reduces the coupling of the system and the mutual dependence between layers but also facilitates standardization and the reuse of layer logics, making it convenient for system maintenance and expansion in the later stage.
[0183] (I) Layered Design
[0184] The B / S three-layer architecture is the architectural style of the entire emergency management GIS platform, consisting of a presentation layer, a service layer, and a data layer. The presentation layer is responsible for the display and interaction of specific functions, the service layer is responsible for specific business logics and function implementation, and the service layer is further divided into a business control layer, a business logic layer, and a data access layer. The business control layer is used to receive client requests and forward them to the logic layer for processing, while the data access layer provides the specific implementation of the server-side operations of adding, deleting, modifying, and querying database objects. The data layer is responsible for the storage, management, and access of spatial data.
[0185] (II) Technical System
[0186] The technical system structure adopted by the entire emergency management GIS platform is as Figure 6 shown.
[0187] Specific technical descriptions are as follows:
[0188] HTML5 / CSS is used for Web page development;
[0189] Bootstrap is used to organize Web page styles, themes, and layout development;
[0190] RequireJS is needed because the front-end development code of fat client applications is large in volume, so
[0191] RequireJS is used to organize and manage each module in the code;
[0192] AngularJS MVC is a Web front-end development mode and framework that provides mechanisms such as an MVC framework, dependency injection, data binding, internationalization processing, service access specifications, and security;
[0193] GISClientInfrastructure is the infrastructure of the emergency management GIS platform client, which defines the data formats and operation types related to client GIS, shields third-party libraries, and avoids the impact caused by the update or replacement of third-party libraries in the later stage of the 2D GIS platform;
[0194] OpenLayers is an open-source front-end map technology used for map representation, operation, interaction, and accessing GIS functions such as OGC standard services;
[0195] JDBC provides the SQL execution statements for operating the database, which are fundamental for the emergency management GIS platform;
[0196] Spring MVC is the development framework adopted by the server side, providing basic functions such as request acceptance and service access for the server side;
[0197] WebSocket provides two-way real-time communication technology;
[0198] GeoTools provides the technologies for spatial relationship operations, spatial topology representation, and calculation required by the emergency management GIS platform;
[0199] GIS Server Infrastructure is the infrastructure of the server side of the emergency management GIS platform. It defines the operations and formats of GIS-related data on the server side, corresponding to those defined by the client side, and at the same time shields the dependencies on third-party libraries on the server side;
[0200] GeoServer provides basic services for the entire map, including OGC standard WMS, WFS, WCS, and WMTS services;
[0201] SpringData provides an entity-based mapping mode for the entire emergency management GIS platform to achieve access to data-related attribute data;
[0202] GDAL / OGR provides the technology for spatial data format conversion and storage into the database;
[0203] MongoDB provides the technology for storing and accessing vector geographic feature tiles.
[0204] (3) System Architecture
[0205] The server side not only provides a map server, but also provides a spatial server, map measurement, and data clipping, realizing the application expansion of rendering and visualizing vector tiles. The platform adopts a thick client structure, placing the entire process of rendering and drawing vector geographic feature tiles on the client side, reducing the pressure on the server side for rendering and handling concurrent requests. The server side only needs to be responsible for scheduling and transmitting vector tiles. In addition, the rendering and drawing of vector tiles are based on HTML5, enabling cross-platform use of the system and compatibility with different devices.
[0206] (4) System Modules
[0207] The entire emergency management GIS platform is divided into two parts: the server side and the client side. The server side is responsible for the organization, management, and service publication of various data, while the client side is responsible for data display and the implementation of a series of operations.
[0208] 1. Server Side
[0209] The server is responsible for the slicing process of vector features, the scheduling, storage management of tiles, and the publishing of services. It is divided into three modules: the general management module, the layer service module, and the data management module. In the general management, a dedicated workspace is created to manage different tasks using the workspace. The slicing settings module sets specific implementation parameters for the slicing process and performs preliminary preprocessing on geographical data.
[0210] In the layer service, different service types are set. According to the update needs of map data, WMS or WMTS services are selectively published. When operating, select the service type, then find the source data to be published, configure all metadata for service publishing, and click publish to publish the data in the form of a service for the client to call. The data management module realizes the import and removal operations of geographical data to ensure the orderly management of geographical data.
[0211] 2. Client
[0212] The client of the emergency management GIS platform is implemented based on the OpenLayers two-dimensional open-source library. The geographical data is loaded, rendered, and visualized in the main window. On the right side of the main window, users can perform various interactive operations and access various extended functions.
[0213] Two-dimensional data display: Users can move the layer level, control the removal or display of layers, and adjust the transparency of layers as needed. And modify and replace the styles of vector slice layers on the client, such as Figure 7 , and the client can render and visualize vector tiles according to the map style specified by the user. Since the vector tiles contain the attribute information of vector geographical features, when users perform basic interactive operations on the client, the attribute information of vector features is directly displayed in the form of an attribute box without requesting attribute information from the background.
[0214] Spatial analysis: In addition to providing the visualization function of geographical data, the platform also supports basic spatial analysis, including buffer analysis, shortest path analysis, nearest facility analysis, and service area analysis.
[0215] Two-dimensional extension: The emergency management GIS platform also extends basic functions, including basic map measurement and map clipping. Map measurement includes distance measurement, area measurement, and coordinate measurement. Map clipping includes vector clipping and raster clipping ( Figure 8 ).
[0216] The emergency management GIS platform realizes the tiling and re - encoding processing of vector geographic data on the server side, avoids the rasterization process of vector data, and retains the integrity of vector data. The server side also supports the dynamic slicing processing of vector geographic features, dynamically slices the vector data according to the slice range parameters sent by the browser side to meet the timeliness requirements of the emergency management GIS for vector data updates, changes the vector data style as needed on the client side, and flexibly re - renders the vector data on the client side. This platform has been applied in the Zhongshan emergency platform project.
Claims
1. Emergency safety management GIS big data vector slice service map, characterized by: Simplify the vector features from the data source, and then use the tile pyramid to slice and re-encode them, solve the pressure of large-scale vector data transmission in vector feature services, design and implement vector tile service maps; First, it is based on the tile pyramid model and establishes a vector tile model according to the Mapbox vector tile standard. Second, it optimizes the disadvantage of the global constraint algorithm that it is too nested. The improved global constraint method simplifies and thins the vector geographic data from the data source, and adds area and Manhattan distance as screening factors. The third is to construct a method for clipping points, lines, and surface elements in vector elements, use the tile pyramid model to recode the slices of vector elements, and store them in the MongoDB database, and schedule and manage them through the created quadtree index; the fourth is to design the cache strategy and vector tile map style of the vector tile map client, update the geographic vector elements from the perspective of vector static slicing and dynamic slicing, and expand the OGC WMS and WMTS services to realize the release of vector tile map services; the fifth is to establish the overall structure of the system from three levels: layered design, technical system, and architecture, and realize the prototype system; 1) Based on the vector .mvt data format, the Mapbox vector tile standard is adopted and the vector tile model is implemented; 2) At each level of the tile pyramid model, Manhattan distance and area are used to perform screening and thinning in units of vector elements, and then the screened vector geographic elements are subjected to secondary thinning using an optimized global constraint algorithm to remove redundant points inside the vector geographic elements; 3) Construct two data update methods, vector static slicing and vector dynamic slicing, for the update of vector geographic features, and provide a method for efficient and rapid data update in emergency management GIS for global and local area data updates.
2. According to claim 1, the emergency safety management GIS big data vector slice service map is characterized in that: Vector tile model design: Vector tiles use Google Protocol Buffers to re-encode and serialize tiles to ease the data transmission pressure of vector tiles. The data format structure is defined once when used, and then specific source code is automatically generated according to the encoder to facilitate the effective cross-platform reading or writing of formatted data. The serialization result is a byte-to-byte connection, omitting the field name; Vector tiles are a collection of layers. Each layer consists of geometric features and metadata describing the basic information of the layer. The geometric features contain the geometric information and attribute information of the features. Each vector tile contains at least one layer, and each layer contains at least one feature. The layer contains six fields: version, name, keys, values, extent, and features. Each feature contains four fields: geometry, type, tags, and id. The layer contains a version field, which indicates the version number followed by the layer, and is the first field of the layer. When the client decoder decodes the vector tile, it will first parse the version field to determine whether it can parse the layer. When encountering an unknown version layer, the decoder attempts to parse it, skips the layer, and then continues to parse the next layer. The name field in the layer indicates the layer name. The name value in each vector tile is unique. When adding a new layer to the tile, the existing layers must be checked to see if there is a layer with the same name. The metadata in each layer feature contains one or more key-values, and then a corresponding index list (keys, valus) is established for all key and value values for common use by the features in the layer. Each element of the layer keys field is a string type, and the keys list is a non-repeating set of attribute names of the layer features. Each element of the layer values field is one of multiple types of values (integer, string type, Boolean, floating point type), and the values in the values list are unique. The key or value in the layer is directly queried and retrieved according to its index number in the keys or values.
3. According to claim 1, the emergency safety management GIS big data vector slice service map is characterized in that: Vector feature thinning and simplification: Improve the global constraint method: connect the endpoints of the linear feature into a straight line, find the point with the largest distance to the straight line among the remaining points, and record the maximum distance as dmax, compare dmax with the critical value D, if dmax < D, then remove all the middle points, if dmax > D, keep the point corresponding to dMax, and divide the linear feature into two parts; When the global constraint method is implemented, it is combined with the stack data structure. The specific implementation steps are as follows: Step 1: The endpoints A and B of the curve have index values indexA and indexB respectively, and the Z value of A and B is set to 1. The Z value of the other points is set to 0. The Z value is used to store the distance from the point to the line, and a stack is generated. Step 2: Connect A and B, find the point C with the maximum distance to the straight line AB among the remaining points, and record dmax and index value indexC; Step 3: Compare dmax with the critical value. If dmax is greater than the critical value, set the Z value of point C to dmax, push the index values of A and C into the stack, and assign C to A. If dmax is less than the critical value, pop the stack twice and assign them to indexB and indexA respectively. Find the corresponding points according to the index values and assign them to B and A respectively. When the default stack is empty, the value popped is null. Step 4: Determine whether indexB is empty. If it is not empty, repeat the above steps 1 to 3. If it is empty, a new ordered point set consisting of points whose Z values are not 0 is the compressed linear feature. Before applying the global constraint method, two additional screening factors are added to each feature: Manhattan distance and area. When performing the slicing operation, the Manhattan distance and area are compared with the critical value respectively. When it is greater than the critical value, the feature is added to the tile, otherwise it is not added.
4. According to claim 1, the emergency safety management GIS big data vector slice service map is characterized in that: Vector data element clipping: When clipping, the inheritance relationship of the attribute information of the vector data is considered, and the geometric information of the point, line, and surface elements of the vector elements is clipped according to the range of the tile; The core of clipping of area elements and linear elements is to clip linear elements, and the ordered set of points constitutes linear elements. When clipping linear elements, the actual operation object is each geometric point. The clipping of vector elements is to extract the part within the tile range according to the tile range and add it to the tile. All clipping is based on the copy of the original data. If the vector element is clipped in a tile area, the copy data should exclude the vector data in the tile, and use the newly generated intersection as the new boundary of the element to continue the subsequent clipping, so as to improve the clipping efficiency; 1) Point feature clipping: Just compare the point with the tile range TBbox (TXmin, TYmin, TXmax, TYmax). If the point is within the range, add the point feature to the tile directly. For special points that fall on the tile boundary, set the tile to only save the points on the left and upper boundaries, so as to ensure that these points are only stored once and not repeatedly. 2) Line feature clipping: The relationship between linear features and tile areas can be summarized into three situations: all linear features are inside the tile, all linear features are outside the tile, and there are intersections between linear features and vector tiles. There are multiple situations where there are intersections, including one intersection, two intersections, and multiple intersections. When judging the relative position between the vector element and the tile area, calculate the Bbox (Xmin, Ymin, Xmax, Ymax) of the element, compare the Bbox of the linear element with the TBbox (TXmin, TYmin, TXmax, TYmax) of the tile area, and judge the relative position of the linear element and the tile. The judgment method is as follows: Step 1: Compare the Bbox of the linear feature with the tile area to get three situations: all the linear features are inside the tile (TXmin<Xmin, TYmin<Ymin, Xmax<TXmax, Ymax<TYmax), all the linear features are outside the tile (Xmax<TXmin or Ymax<TYmin or TXmax<Xin or TYmax<Ymin), the linear features and the tile have intersections, only the third situation requires the clipping operation of the vector features, the linear features are composed of an ordered set of points, and the subsequent operation is to find the intersection of the linear features and the tile; Step 2: If the starting point of the linear feature is inside or on the boundary of the tile, and a subsequent point is outside the tile range, calculate the intersection point M with the tile through this point and the previous point and record it, write the intersection point M and the previous point into the tile together, and proceed to the next step with the intersection point M as the starting point; otherwise, all linear features are inside the tile; Step 3: If the starting point of the linear feature is outside or on the boundary of the tile, and a subsequent point is inside the tile, calculate the intersection point N with the tile through this point and the previous point and record it, then proceed to step 2 with point N as the starting point; Repeat the above steps 2 and 3 to clip the linear features. In the clipping process, some points that do not exist in the original linear features are generated. These points have a marking function in the subsequent tile loading and merging process. When writing to the tile, choose to keep these points; 3) Face element clipping: The relative relationship between face elements and tile areas can be divided into four basic types: face elements outside tiles, face elements inside tiles, and face elements and tiles intersecting. The intersection of face elements and tiles is much more complex than the intersection of linear elements and tiles. The number of intersection boundaries between face elements and tile areas is divided into four cases: one boundary, two boundaries, three boundaries, and four boundaries. Face elements cover the entire tile. Tiles come from the multi-resolution pyramid model divided by quadtrees. When clipping, they are also clipped according to quadtrees. Now face elements cover the entire tile. When the level is higher, the element continues to cover its sub-tiles. Records are made during the first coverage, and there is no need to clip the face elements at subsequent levels, which improves clipping efficiency. Compare the Bbox (Xmin, Ymin, Xmax, Ymax) of the surface element with the TBbox (TXmin, TYmin, TXmax, TYmax) of the tile area range to preliminarily distinguish the relative position of the surface element and the tile area, perform point-by-point operations on the clipping of the surface element, and then determine whether the ordered point set after processing is closed. If it is not closed, it needs to be closed and reconstructed into a surface element to be written into the tile. The specific steps are as follows: Step 1: Compare the Bbox of the surface element with the tile area range. If TXmin<Xmin, TYmin<Ymin, Xmax<TXmax, Ymax<TYmax, it means that the surface element is inside the tile and the vector element is directly added to the tile. If Xmax<TXmin or Ymax<TYmin or TXmax<Xin or TYmax<Ymin, it means that the surface element is outside the tile and does not need to be added. Step 2: If a point P(i) of the surface element is inside the tile area, but P(i+1) is outside the tile area, calculate the intersection point M of the two points and the tile boundary as the exit point, record the point P(i), point M, and the boundary where point M is located, and proceed to the next step; Step 3: If a point P(i) of the surface element is outside the tile area, and P(i+1) is assigned to the tile area, calculate the intersection point N of the two points and the tile boundary and record it as the entry point. Record point N and its boundary. Points M and N are both newly added points, and proceed to the next step. Step 4: If point P(i) and point P(i+1) are both outside the tile area, assign point P(i+1) to point P(i), and continue to loop through step 4 until point P(i+1) is inside the tile area, then execute step 3; Step 5: If point P(i) and point P(i+1) are both inside the tile area, assign point P(+1) to point P(i), and continue to loop through step 5 until point P(i+1) is outside the tile area, then execute step 2; Step 6: After all ordered point sets of all planar elements are calculated, a new planar element object is constructed based on the closed ordered point set to complete the clipping. If, in the above operation, the points of the planar element are outside the tile, or only have intersections with the tile, but no points are inside the tile, it means that the planar element covers the tile area. The planar element is recorded, and no clipping operation is required at the sub-tile level of the element. For the retained intersection points, they are covered by the linear elements themselves when the front end of the linear elements is drawn. They are invisible to the user and do not affect the user experience. However, for the surface elements, these newly added points are additionally processed when the front end is loaded and drawn.
5. According to claim 1, the emergency safety management GIS big data vector slice service map is characterized in that: Generate vector tiles: Use the multi-resolution tile pyramid model to cut and crop the vector geographic data, organize the vector data of the cropped tiles according to the vector tile model, and then encode and serialize them into .mvt format. The specific steps are as follows: Step 1: Preprocess the vector geographic data, including format conversion and coordinate conversion, to generate GeoJSON format vectors. First, calculate the Manhattan distance dist and area of each feature, and then use the optimized global constraint method to calculate the z value. Step 2: Convert each feature object to generate a new feature, including feature id, type, tags, max and min, and geometry; Step 3: According to the vector geographic feature range Bbox[south, west, north, east] and the map level zoom(min, max), loop from the minimum level of the map to the highest level to perform all subsequent operations; Step 4: According to the current zoom level of the map, calculate the tile range [TXmin, TYmin, TXmax, TYmax] of the geographic element range and the critical value of the current level; Step 5: According to the threshold at the current level, first remove the vector elements that are less than the critical value from the two perspectives of dist and area, and then remove the simplified points in the elements according to the z value to obtain the simplified elements; Step 6: Extract the vector data within the tile range, use the tile to clip the vector elements, and write the clipped data into the tile in a vector tile structure; Step 7: Perform geometry encoding on each tile and save it to the database or transmit it to the client according to the path rule of z / x / y.mvt.
6. According to claim 1, the emergency safety management GIS big data vector slice service map is characterized in that: Vector tile organization and management: Use quadtree index to store and manage vector tile files, and achieve fast indexing of geographic locations to tile files; The geographic space is continuously recursively divided into a multi-level tree structure, with each branch having a maximum of four nodes. Vector tiles are hierarchically divided according to different resolutions, forming a multi-resolution tile pyramid structure from top to bottom. Tiles form a unique code based on the pyramid level and row and column numbers. By converting the geographic coordinates into the code, the storage location of the tile can be retrieved. After the vector data tile is built, it is stored in the MongoDB database. Tile data is requested in the form of "URI / z / x / y.mvt", where z represents the level of the tile, x represents the number of columns where the tile is located, and y represents the number of rows where the tile is located. .mvt is the vector tile after encoding. When building the data pyramid, the global vector data is not built, only the required data needs to be built. If there is no data for the vector tile in a certain area, the index of this place will not be generated.
7. According to claim 1, the emergency safety management GIS big data vector slice service map is characterized in that: Vector tile map caching strategy: Step a: Create an empty HashTable and queue List. The key in the HashTable stores the tile ID, the value stores the tile index in the cache, the queue List stores the tile ID, and the maximum number of tiles in the cache is recorded as Max; Step b: When the client calls for a tile, it searches the HashTable by the tile ID. If it can be found, it directly calls the tile in the cache according to the index value of value, and then puts the tile number at the end of the List. If it cannot be found, it first checks whether the current cache is full, that is, it determines whether List.length>=Max. If the number of tiles in the cache is full, it needs to remove the tile and go to step c, otherwise it goes directly to step d. Step c: Get the ID of the head tile in the queue List, delete the tile in the queue head and cache, and then delete the corresponding record in the HashTable according to the tile ID; Step d: Assign the tile ID not found in the HashTable and the index value in the cache to the key and value of the HashTable respectively, and store the tile ID at the end of the queue List; Step e: Continue to retrieve new tiles and execute step b until no new tiles are retrieved; When browsing the map, roaming and zooming operations are always performed. The client calculates the map tile ID covering the range based on the range of the screen viewport, and searches the cache first to see if the tile exists in the cache. If the tile exists, it is directly extracted from the cache and rendered. If not, the client sends a request to the remote server to obtain the tile, then renders it into the cache and removes the tile from the cache according to the cache mechanism. When roaming or zooming frequently in a certain area, tiles are directly extracted from the cache to improve rendering efficiency.
8. According to claim 1, the emergency safety management GIS big data vector slice service map is characterized in that: Vector tile map data update: set the update frequency and method to static vector tile update and dynamic vector tile update; 1- Vector static slicing: Static slicing of vector geographic elements is aimed at geographic entities with insignificant changes in geographic elements over a long period of time within a large area. Vector static slicing is more suitable for the base map of tile maps. Static vector slicing processes vector geographic elements into tiles of different levels as needed, stores them in the database and creates indexes to achieve efficient scheduling of tiles. After receiving the client's request, the server directly searches for the corresponding slice file based on the index and returns it to the client; 2-Vector dynamic slicing: The map server accesses the updated vector geographic features in the database according to the user's request parameters, slices the vector geographic features in real time, and returns the generated tile data to the client; When the vector geographic data in the layer changes, the corresponding tiles are calculated according to the changed area, and the data in the tiles are updated without updating the entire vector tile pyramid. The specific steps are as follows: Step a: Calculate the geographic space range Bbox [south, west, north, east] based on the data to be updated, and mark the status of the data to be updated: added, modified, deleted; Step b: Obtain the number of tile pyramid layers constructed for the data to be updated; Step c: respectively calculate the tile range covered by the data to be updated in each layer of the tile pyramid, traverse the data in the tile, and update the data in the tile range according to the state of the marked data to be updated.
9. The emergency safety management GIS big data vector slice service map according to claim 1 is characterized in that: Vector tile map service publishing: If you want to publish vector tiles in the form of WMS or WMTS services, you have to expand WM(T)S so that it can support vector tile formats, including MVT, GeoJSON, and TopoJSON; 1- Vector tile WMS: The vector tile WMS service returns the corresponding vector tile according to the user's request. The vector tile WMS redefines the GetMap operation and retrieves it on the server according to the request parameters issued by the client. The server returns a vector tile whose geospatial parameters and size parameters are clearly defined. The returned vector tile format is MVT, GeoJSON, TopoJSON; 2- Vector tile WMTS: A new format is extended based on the OGC WMTS service specification. The vector tile WMTS service returns the corresponding vector tile according to the user's request; Vector tile WMTS redefines the GetTile operation, which retrieves the vector tile on the server side according to the request parameters sent by the client. The server side returns the corresponding vector tile, whose geospatial parameters and size parameters are clearly defined. The returned vector tile format is MVT, GeoJSON, TopoJSON; The WM(T)S service in OGC returns data that can be directly visualized, while vector tiles return encoded data that cannot be directly visualized. Clients that support vector tile decoding and rendering need to perform relevant decoding operations and render them before they can be displayed. 3- Vector tile drawing: Each feature of a vector tile has a unique ID. Linear features are spliced based on the uniqueness of the feature ID. If the feature IDs are the same and the two features have common points, the two features are directly connected, the common points are removed, and the type in the geometry is set to LineString. If the two feature IDs are the same but the two features have no common points, the type in the feature geometry is changed to MultiLineString. The merging of surface features also involves the filling of surface features, that is, judging whether to merge linear features or not. The surface features are merged based on the uniqueness of the surface feature ID. For common points on the tile boundary, if the surface feature type is Polygon, the boundary line is removed in the same way as the linear feature. If the surface feature type is MultiPolygon, the boundary line is retained.
Citation Information
Cited By
Map data updating method and system and electronic equipment
CN121166958A
Distributed-based pyramid construction method and apparatus
CN122656847A