Web-oriented two-dimensional and three-dimensional map exporting method and device and electronic equipment

By dividing the Web map into equal parts and rendering it on the Web, a high-resolution map effect image is generated, which solves the problems of insufficient resolution, size limitations and user experience in Web map printing, and achieves efficient and clear map printing. .

CN119313550AActive Publication Date: 2025-01-14WUHAN KEXIN YUNTU INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411279275.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2025-01-14
Estimated Expiration
2044-09-12

AI Technical Summary

Technical Problem

Currently, web map printing has problems such as insufficient resolution and clarity, limited printing size, difficulty in adjusting map elements, poor print format compatibility and poor user experience.

Method used

By obtaining the electronic planning map to be printed, perform equal segmentation processing, obtain multiple segmented maps, and then overlay and render the background map data and map element objects on the Web side to generate a high-precision map, and output it through Canvas technology as High-resolution tiled map rendering pictures, processing each tiled map image in sequence, and finally splicing different tiled images into a complete map effect picture.

Benefits of technology

It improves the resolution and clarity of the map, breaks through the limitations of the map format, solves the problems of printing size restrictions and difficulty in adjusting map elements, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119313550A_ABST
    Figure CN119313550A_ABST
Patent Text Reader

Abstract

The invention provides a Web-oriented two-dimensional and three-dimensional map exporting method and device and electronic equipment, and belongs to the technical field of image processing.The method comprises the steps that a to-be-printed electronic planning map is obtained, the electronic planning map is equally divided into frames, and a plurality of frames of maps are obtained; background map data and map element objects in the multiple framing maps are obtained, the background map data and the map element objects are superposed and rendered at a Web end to obtain a framing high-precision map, each framing map rendering picture is processed, and different block pictures are obtained; and splicing different block pictures according to respective coordinates to obtain a complete map effect picture. According to the method, the background map data and the map element objects in the framing map are superposed and then rendered through the Web end, and finally the pictures are spliced, so that the problems of insufficient resolution and definition, limited printing size, difficulty in map element adjustment, poor printing format compatibility and poor user experience existing in current Web map printing are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method, device and electronic device for exporting two or three dimensional maps for a Web. Background Art

[0002] Maps play an important role in modern society. They not only provide visual references for navigation and route planning, facilitating people's travel and exploration, but also play a role in professional fields such as emergency response and event security. For example, people can plan emergency or security plans in advance through map business systems, and then print electronic planning maps through maps, or hang them in the command room as command maps or distribute them to relevant participants as action guides to improve the efficiency of handling situations when they occur. It can be seen that maps are a necessity in work or life, and it is particularly important to efficiently produce high-precision, high-quality, complete maps with specified areas, scales, and superimposed map elements to meet the needs of actual business operations.

[0003] There are some challenges and problems in current web map printing, including insufficient resolution and clarity, print size limitations, difficulty in adjusting map elements, print format compatibility, and poor user experience. Summary of the invention

[0004] In view of this, it is necessary to provide a Web-oriented two-dimensional and three-dimensional map export method, device and electronic device to solve the technical problems of current Web map printing, such as insufficient resolution and clarity, printing size limitation, difficulty in adjusting map elements, printing format compatibility and poor user experience.

[0005] In order to solve the above problems, on the one hand, the present invention provides a method for exporting two-dimensional and three-dimensional maps for the Web, comprising: Acquire an electronic planning map to be printed, and divide the electronic planning map into equal pieces to obtain a plurality of pieces of divided maps; Obtaining background map data and map element objects in the multiple tiled maps, and overlaying and rendering the background map data and the map element objects on the Web side according to set parameters to obtain a high-precision map of the tiled maps, and obtaining multiple high-resolution tiled map rendering images based on the high-precision maps, and processing each tiled map rendering image in turn to obtain different block images; The different block images are spliced ​​according to their respective coordinates to obtain a complete map effect image.

[0006] In a possible implementation, the electronic planning map is divided into equal parts to obtain a plurality of divided maps, including: The electronic planning map is equally divided into sections according to the set printing parameters to obtain a plurality of high-precision section maps; The printing parameters include at least one of a coordinate system, a scale, a three-dimensional viewing angle and a spatial area.

[0007] In a possible implementation, the electronic planning map is equally divided into sections according to set printing parameters to obtain a plurality of high-precision section maps, including: Based on the WebGL protocol and in accordance with the set printing parameters, the electronic planning map is equally divided into sections to obtain a plurality of high-precision section maps.

[0008] In a possible implementation, the background map data and the map element objects are overlaid and rendered on the Web side according to the set parameters to obtain a high-precision map of the tiles, and a plurality of high-resolution tile map rendering images are obtained based on the high-precision map, and each tile map rendering image is processed in turn to obtain different tile images, including: The background map data and the map element objects are overlaid and rendered on the Web side according to the set parameters to obtain a high-precision map of each tile, and the high-precision map is output as a high-resolution tile map rendering image through Canvas technology; Construct a mask layer in the target area of ​​the tiled map rendering image; Traversing each pixel of the tiled map rendering image, when it is determined based on the mask layer that there are pixels in the tiled map rendering image that need to be covered or excluded, the pixels that need to be covered or excluded are filled with white to obtain a tiled image that meets the set parameters; Process each map rendering image in turn to obtain different block images.

[0009] In a possible implementation, the mask layer is a grid having binary pixels; Determining, based on the mask layer, whether there are pixels in the tiled map rendering image that need to be covered or excluded includes: When the pixel value of the corresponding mask layer of the pixel of the image rendered based on each sectional map is 0, the pixel at the corresponding position is determined to be the pixel that needs to be covered or excluded.

[0010] In a possible implementation, the electronic planning map is a two-dimensional map or a three-dimensional map; The two-dimensional map includes a raster tile map or a vector slice map, and the three-dimensional map is produced based on oblique photography data collected by a drone.

[0011] In a possible implementation, different block images are spliced ​​according to their respective coordinates to obtain a complete map effect image, including: Based on the canvas tag on the Web side, different block images are spliced ​​according to their respective coordinates to obtain a complete map effect image.

[0012] On the other hand, the present invention also provides a two-dimensional and three-dimensional map exporting device for Web, comprising: A framing module is used to obtain an electronic planning map to be printed, and to divide the electronic planning map into equal pieces to obtain a plurality of framing maps; A rendering module is used to obtain background map data and map element objects in the multiple segmented maps, and to overlay and render the background map data and the map element objects on the Web side according to set parameters to obtain segmented high-precision maps, and to obtain multiple high-resolution segmented map rendering images based on the high-precision maps, and to process the segmented map rendering images in turn to obtain different segmented images; The stitching module is used to stitch different block images according to their respective coordinates to obtain a complete map effect image.

[0013] On the other hand, the present invention also provides an electronic device, including a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps of the Web-oriented two-dimensional and three-dimensional map export method as described in any one of the above.

[0014] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the Web-oriented two-dimensional and three-dimensional map export method as described in any one of the above items.

[0015] The beneficial effects of adopting the above implementation mode are as follows: the two-dimensional and three-dimensional map export method, device and electronic device for the Web provided by the present invention divide the electronic planning map to be printed into equal parts to obtain multiple divided maps, superimpose the background map data and map element objects in the divided maps, render them through the Web end to obtain a high-precision map, output them as high-resolution divided map rendering pictures through canvas technology, process the rendered pictures in sequence through mask technology to obtain different block pictures, finally splice the obtained different block pictures, and finally splice the rendered pictures to obtain a complete map effect picture. The present invention provides The method extracts the background map data and map element objects of multiple map tiles and then overlays and renders them on the Web according to the set parameters (such as coordinate system, scale or three-dimensional perspective, etc.) to obtain a high-precision map of the tiles. The local area can be enlarged and displayed clearly, and the resolution and clarity of the map can be improved. Then, multiple rendered images are spliced ​​to display the complete map effect image, so that the complete map image can be printed out. It also breaks through the limitation of map format, thereby solving the technical problems of insufficient resolution and clarity, printing size limitation, difficulty in adjusting map elements, printing format compatibility and poor user experience in the current Web map printing. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 A flowchart of an embodiment of a method for exporting two or three dimensional maps to the Web provided by the present invention; Figure 2 A principle block diagram of an embodiment of a two-dimensional and three-dimensional map exporting device for the Web provided by the present invention; Figure 3 A schematic diagram of the electronic planning map provided by the present invention after being divided into sections; Figure 4 A schematic structural diagram of an embodiment of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0019] In the description of the embodiments of the present application, unless otherwise specified, “plurality” means two or more than two.

[0020] The terms "including" and "having" and any variations thereof in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product or equipment comprising a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules not clearly listed or inherent to these processes, methods, products or equipment.

[0021] The naming or numbering of the steps in the embodiments of the present invention does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The execution order of the named or numbered process steps can be changed according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.

[0022] Reference to an "embodiment" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiment may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0023] The present invention provides a method, device and electronic device for exporting two or three dimensional maps for Web, which are respectively described below.

[0024] like Figure 1 As shown, the present invention provides a two-dimensional and three-dimensional map export method for Web, comprising: S101, obtaining an electronic planning map to be printed, and dividing the electronic planning map into equal pieces to obtain a plurality of pieces of divided maps; S102, obtaining background map data and map element objects in the plurality of tiled maps, and overlaying and rendering the background map data and the map element objects on a Web terminal according to set parameters to obtain a tiled high-precision map, and obtaining a plurality of high-resolution tiled map rendering images based on the high-precision map, and processing each tiled map rendering image in turn to obtain different tiled images; S103, splicing different block images according to their respective coordinates to obtain a complete map effect image.

[0025] It can be understood that the Web is the global wide area network, and the electronic planning status involved in the method provided by the present invention is a background map, which can be a two-dimensional or three-dimensional map data.

[0026] The method provided by the present invention supports the printing of map element objects required for superimposition on the background map according to actual business needs. The element objects can be summarized into multiple types: text annotation element class, picture annotation element class, dovetail arrow element class, assembly area class, three-dimensional model element, etc.

[0027] Load the background map in the Web browser, and at the same time, you can overlay the required map element annotation objects according to the specific actual business needs, generate map effect pictures that meet the needs of business actual planning, assist the command decision-making of actual work, and improve the efficiency of actual work. For example, in large-scale sports events attended by important figures, or security activities of star concerts, there are a large number of people involved. In order to ensure safety, security work must be done well. Generally, large venues will build 3D models and supporting 3D security systems. The system will use the 3D model as the background map, highly simulate the real venue, and then overlay the planned 3D model of the security gate, the 3D model of the comprehensive service desk, the 3D model of the security personnel, the entry route, the exit route, the 3D model of the toilet, the seating area and text annotations at the real location to form a 3D electronic map carrying security planning information as an action planning guide map, using scientific means to improve security efficiency and ensure the safety and order of the activities.

[0028] For the electronic planning map to be printed, first set the relevant printing parameters, such as coordinate system, scale, 3D viewing angle, spatial area (the area can be a custom coordinate point string or specified according to administrative divisions), etc.

[0029] After specifying the parameters and analyzing the related parameters, the electronic planning map to be printed is divided into equal parts according to the analysis results of the set parameters (the maximum pixel width of the partition is Wmax=5120, and the maximum height is Hmax=3840). Different partitioned maps are assigned numbers according to T (row, column) and the spatial range of the partitions E(p1, p2) is recorded.

[0030] According to the tiling information, WebGL technology is used to obtain the background map data in the tiled map according to the specified coordinate system, specified scale and tiled spatial range, and the map element objects in the tiled map are superimposed and displayed. The high-precision tiled map is rendered on the front end according to the set parameters, and the high-resolution tiled map rendering image is output through canvas technology. The image in the specified area is then extracted through mask technology to obtain a block image that meets the set parameters.

[0031] Then, the canvas technology is used to splice the different block images according to T (row, column) to generate a complete map effect image. The generated complete image is exported for preview, download and printing.

[0032] In some embodiments, the electronic planning map is divided into equal parts to obtain a plurality of divided maps, including: The electronic planning map is equally divided into sections according to the set printing parameters to obtain a plurality of high-precision section maps; The printing parameters include at least one of a coordinate system, a scale, a three-dimensional viewing angle and a spatial area.

[0033] In some embodiments, the electronic planning map is equally divided into sections according to the set printing parameters to obtain a plurality of high-precision section maps, including: Based on the WebGL protocol and in accordance with the set printing parameters, the electronic planning map is equally divided into sections to obtain a plurality of high-precision section maps.

[0034] It is understandable that WebGL (Web Graphics Library) is a 3D drawing protocol. For the electronic planning map to be printed, first set the relevant printing parameters, such as specifying the coordinate system, specifying the scale, and specifying the area (the area can be a custom coordinate point string or specified according to administrative divisions).

[0035] After specifying the parameters and analyzing the related parameters, the electronic planning map to be printed is divided into equal parts according to the analysis results of the set parameters (the maximum pixel width of the partition is Wmax=5120, and the maximum height is Hmax=3840). Different partitioned maps are assigned numbers according to T (row, column) and the spatial range of the partitions E(p1, p2) is recorded.

[0036] According to the tiling information, WebGL technology is used to obtain the background map data in the tiled map according to the specified coordinate system, specified scale and tiled spatial range, and the map element objects in the tiled map are superimposed and displayed. The high-precision tiled map is rendered on the front end according to the set parameters, and the high-resolution tiled map rendering image is output through canvas technology. The image in the specified area is then extracted through mask technology to obtain a block image that meets the set parameters.

[0037] In some embodiments, the background map data and the map element objects are overlaid and rendered on the Web side according to the set parameters to obtain a high-precision map of the tiles, and a plurality of high-resolution tiled map rendering images are obtained based on the high-precision map, and each tiled map rendering image is processed in turn to obtain different tiled images, including: The background map data and the map element objects are overlaid and rendered on the Web side according to the set parameters to obtain a high-precision map of each tile, and the high-precision map is output as a high-resolution tile map rendering image through Canvas technology; Construct a mask layer in the target area of ​​the tiled map rendering image; Traversing each pixel of the tiled map rendering image, when it is determined based on the mask layer that there are pixels in the tiled map rendering image that need to be covered or excluded, the pixels that need to be covered or excluded are filled with white to obtain a tiled image that meets the set parameters; The rendered images of each map are processed in turn to obtain different block images, and the pixels inside the block images are processed to make them meet the set spatial area.

[0038] In some embodiments, the mask layer is a grid having binary pixels; Determining, based on the mask layer, whether there are pixels in the tiled map rendering image that need to be covered or excluded includes: When the pixel value of the corresponding mask layer of the pixel of the image rendered based on each sectional map is 0, the pixel at the corresponding position is determined to be the pixel that needs to be covered or excluded.

[0039] It can be understood that the administrative divisions or custom spatial areas are used to construct a mask layer, which is a raster with binary (0 and 1) pixels, where 1 represents the area that needs to be retained or displayed, and 0 represents the area that needs to be covered or excluded.

[0040] Traverse each pixel of the tiled map image, and decide whether to retain the pixel based on the pixel value (0 or 1) of the corresponding position in the mask layer. Specifically, if the pixel value of a certain position in the mask layer is 1, the pixel at the corresponding position in the complete map effect image is retained; if the pixel value of a certain position in the mask layer is 0, the pixel at the corresponding position in the tiled map image is filled with white.

[0041] After processing all the image pixels in sequence, the framed map image within the set area parameters can be extracted.

[0042] At the same time, the mask parameters (such as transparency, color, etc.) can be adjusted according to the actual effect to make the image extracted by the mask technology better.

[0043] In some embodiments, the electronic planning map is a two-dimensional map or a three-dimensional map; The two-dimensional map includes a raster tile map or a vector slice map, and the three-dimensional map is produced based on oblique photography data collected by a drone.

[0044] It can be understood that two-dimensional maps can be further divided into raster tile maps and vector slice maps. Raster tile maps are a mature and conventional way of providing maps. A background map is formed by organizing and splicing map images one by one through a pyramid structure. Vector slice maps are a new way of providing maps. Vector data is rendered in real time through a certain hierarchical structure. Three-dimensional maps are made by using relevant tools to collect oblique photography data from drones. Three-dimensional maps can simulate the real world more realistically.

[0045] In some embodiments, different block images are spliced ​​according to their respective coordinates to obtain a complete map effect image, including: Based on the canvas tag on the Web side, different block images are spliced ​​according to their respective coordinates to obtain a complete map effect image.

[0046] It can be understood that according to the tiling information, the background map data in the tiled map is obtained through WebGL technology according to the specified coordinate system, specified scale and tiled spatial range, and the map element objects in the tiled map are superimposed and displayed. Different tiled high-precision maps are rendered on the front end, and output as high-resolution tiled map images through canvas technology, and images in the specified area are extracted based on the tiled map images.

[0047] Then, the canvas technology is used to splice the generated different block images according to T (row, column) to generate a complete map effect image.

[0048] In some embodiments, in response to problems in the process of generating and printing Web map effect pictures, the present invention proposes a method for efficiently, accurately and high-quality generating a complete map effect picture of a specified area, scale and map element objects, specifically: 1. The electronic planning map involved in the method provided by the present invention is a background map, which can be a two-dimensional or three-dimensional map data. The two-dimensional map can be further divided into raster tile map and vector slice map. The raster tile map is a mature and conventional map provision method, which forms a background map by splicing map pictures one by one through a pyramid structure. The vector slice map is a new type of map provision method, which is obtained by real-time rendering of vector data through a certain hierarchical structure; the three-dimensional map is obtained by using relevant tools to produce oblique photography data collected by drones, and the three-dimensional map can simulate the real world more realistically; 2. The method provided by the present invention supports printing of map element objects required for overlaying on the background map according to actual business needs. The element objects can be classified into multiple types: text annotation element class, picture annotation element class, dovetail arrow element class, assembly area class, three-dimensional model element, etc.; 3. With the help of WebGL technology, the background map can be loaded in the browser. At the same time, the required map element annotation objects can be superimposed according to the specific actual business needs, and the map effect pictures that meet the needs of business actual combat planning can be generated to assist the command decision-making of actual combat work and improve the efficiency of actual combat work. For example, in large-scale sports events attended by important figures, or security activities of celebrity concerts, there are a large number of people involved. In order to ensure safety, security work must be done well. Generally, large venues will build three-dimensional models and supporting three-dimensional security systems. The system will use the three-dimensional model as the background map, and reproduce the real venue with high simulation. Then, the planned three-dimensional model of the security gate, the three-dimensional model of the comprehensive service desk, the three-dimensional model of the security personnel, the entry route, the exit route, the three-dimensional model of the toilet, the seating area and text annotations are superimposed at the real location to form a three-dimensional electronic map that carries security planning information as an action planning guide map, using scientific means to improve security efficiency and ensure the safety and order of the event; 4. The above-mentioned action planning guide map can only be displayed on the computer side, but not all participants in the event are in front of the computer. Only a few people can see the action planning guide map through the computer. This requires printing the action planning guide map as an action planning guide picture with a complete map effect and distributing it to people or posting it in a conspicuous place, so that the action planning guide map can play its value. Conventional map printing is to print the computer screen display area or to specify the scale and then print it on the server side. For the first case, given the limited size of the computer screen and the limited resolution, when the local level is reduced or the three-dimensional perspective is pulled away to show the overall overview, the details cannot be displayed. When the local level is enlarged or the three-dimensional perspective is pulled closer to show the local situation, the whole picture cannot be seen. For the second case, the server reshapes the map according to the scale. Although the electronic map can expand the global clarity, the map element objects superimposed on it only have coordinate point positions, resulting in the printed map element objects being either large or small, and the clarity is abnormal. In response to the above problems, this paper proposes a method for generating complete map effect pictures of specified areas, scales and map element objects with high efficiency, high precision and high quality.

[0049] 5. The method provided by the present invention is a printing method based on Web front-end technology, and the core steps include: ① For the electronic planning map to be printed, first set the relevant printing parameters, such as specifying the coordinate system, specifying the scale, specifying the area (the area can be a custom coordinate point string or specified according to administrative divisions), etc.; ② After specifying the parameters and analyzing the relevant parameters, the electronic planning map to be printed is divided into equal parts according to the analysis results of the set parameters (the maximum pixel width of the partition is Wmax=5120, and the maximum height is Hmax=3840). Different partition maps are assigned numbers according to T (row, column) and the spatial range of the partition is recorded E(p1, p2); ③According to the tile information, the background map data in the tile map is obtained through WebGL technology according to the specified coordinate system, specified scale and tile spatial range, and the map element objects in the tile map are superimposed and displayed. Different tile maps are rendered on the front end, and the tile map is output as a tile map rendering image through canvas technology. The tile map rendering image extracts the image in the specified area through step 6; ④ Then, the canvas technology is used to splice the generated different block images according to T (row, column) to generate a complete map effect image; 6. Extract the image in the specified area through mask technology: ① Construct a mask layer for administrative divisions or custom spatial areas. The mask layer is a raster with binary (0 and 1) pixels, where 1 represents the area to be retained or displayed, and 0 represents the area to be covered or excluded; ② Traverse each pixel of the tiled map image, and decide whether to retain the pixel according to the pixel value (0 or 1) of the corresponding position in the mask layer. Specifically, if the pixel value of a certain position in the mask layer is 1, the pixel at the corresponding position in the complete map effect image is retained; if the pixel value of a certain position in the mask layer is 0, the pixel at the corresponding position in the tiled map image is filled with white; ③ After processing all the image pixels in sequence, the frame map image within the area can be extracted.

[0050] At the same time, the mask parameters (such as transparency, color, etc.) can be adjusted according to the actual effect to make the image extracted by the mask technology better.

[0051] 7. Export the complete image generated in step 5 for preview and download and print; 8. One of the application scenarios of the present invention: For example, when a person comes to a certain place to inspect work, the security command group will plan in advance based on the business system the information about the hotel where he will stay, the inspection unit, the inspection route, the bus route, the boarding and alighting points, the police force security along the route, etc. However, for the security plan information of this plan, it is not intuitive if it is just a simple text description. If it is based on a map with spatial position as a link, whether it is a two-dimensional map or a three-dimensional map, the planning scheme information can be displayed more intuitively. Of course, if it is a three-dimensional map, since the three-dimensional map simulates the real world, the display effect is better. Through the method provided by the present invention, the electronic planning map formed by the security planning scheme can be printed out in the form of a complete map effect picture and hung in the security command room, which is equivalent to a command and operation map for fighting. The security command decision maker can fully grasp the planning and deployment situation in the command room, which is convenient for real-time dispatch of emergencies during the inspection process; and for ordinary security personnel in security activities, they can quickly understand their own positions and the duty positions of their teammates through the planning map, which is convenient for the linkage processing of emergencies, etc.; if it is based on a three-dimensional map, a corresponding number of three-dimensional police models, three-dimensional police car models, security gate models, etc. can be more accurately superimposed at the security point to realistically reproduce the real police force deployment situation; at the same time, based on the three-dimensional map, a variety of analyses can be performed, such as analyzing blocking points, or conducting early inspections, eliminating safety hazards, or deploying snipers for necessary guarantees, etc.

[0052] In summary, the present invention provides a two-dimensional and three-dimensional map export method for the Web, comprising: obtaining an electronic planning map to be printed, and dividing the electronic planning map into equal parts to obtain a plurality of divided maps; obtaining background map data and map element objects in the plurality of divided maps, and superimposing the background map data and the map element objects and rendering them on a Web side to obtain different divided map images, and processing them into different divided images that meet set parameters through masking technology; splicing the different divided images according to their respective coordinates to obtain a complete map effect image.

[0053] The method for exporting two or three-dimensional maps for the Web provided by the present invention divides the electronic planning map to be printed into equal parts to obtain a plurality of map segments, superimposes the background map data and map element objects in the map segments, and then performs superimposition rendering on the Web side according to set parameters (such as coordinate system, scale or three-dimensional viewing angle, etc.) to obtain a high-precision map segment, and then outputs it as a high-resolution map segment rendering picture through canvas technology, sequentially processes each map segment picture to obtain different block pictures, and finally splices the different block pictures to obtain a complete map effect picture. The method provided by the present invention extracts the background map data and map element objects of the plurality of map segments and then renders them again on the Web side, so that the local area can be enlarged and clearly displayed, and the resolution and clarity of the map can be improved. The map segment map is then output as a map rendering picture, processed into different block pictures through mask technology, and the different block pictures are connected to display a complete map picture, so that the complete map can be printed out, and the limitation of the map format is also broken, thereby solving the technical problems of insufficient resolution and clarity, printing size limitation, difficulty in adjusting map elements, printing format compatibility and poor user experience in current Web map printing.

[0054] like Figure 2 As shown, the present invention also provides a two-dimensional and three-dimensional map exporting device 200 for the Web, comprising: A framing module 201 is used to obtain an electronic planning map to be printed, and divide the electronic planning map into equal pieces to obtain a plurality of framing maps; The rendering module 202 is used to obtain the background map data and map element objects in the multiple segmented maps, and to overlay and render the background map data and the map element objects on the Web side according to the set parameters to obtain segmented high-precision maps, and to obtain multiple high-resolution segmented map rendering images based on the high-precision maps, and to process the segmented map rendering images in turn to obtain different segmented images; The stitching module 203 is used to stitch different block images according to their respective coordinates to obtain a complete map effect image.

[0055] Reference Figure 3 The solution provided by the present invention first divides the original electronic planning map into blocks, and finally displays one of the divided blocks on the entire screen through the display screen, which has higher accuracy.

[0056] The web-oriented two-dimensional and three-dimensional map exporting device provided in the above embodiment can implement the technical solution described in the above embodiment of the web-oriented two-dimensional and three-dimensional map exporting method. The specific implementation principles of the above modules or units can be found in the corresponding contents in the above embodiment of the web-oriented two-dimensional and three-dimensional map exporting method, which will not be repeated here.

[0057] like Figure 4 As shown, the present invention also provides an electronic device 400. The electronic device 400 includes a processor 401, a memory 402 and a display 403. Figure 4 Only some components of the electronic device 400 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0058] In some embodiments, the memory 402 may be an internal storage unit of the electronic device 400, such as a hard disk or memory of the electronic device 400. In other embodiments, the memory 402 may also be an external storage device of the electronic device 400, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the electronic device 400.

[0059] Furthermore, the memory 402 may include both an internal storage unit of the electronic device 400 and an external storage device. The memory 402 is used to store application software installed in the electronic device 400 and various data.

[0060] In some embodiments, the processor 401 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run program codes or process data stored in the memory 402, such as the Web-oriented two-dimensional and three-dimensional map export method of the present invention.

[0061] In some embodiments, the display 403 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 403 is used to display information on the electronic device 400 and to display a visual user interface. The components 401-403 of the electronic device 400 communicate with each other via a system bus.

[0062] In some embodiments of the present invention, when the processor 401 executes the web-oriented 2D and 3D map export program in the memory 402, the following steps may be implemented: Acquire an electronic planning map to be printed, and divide the electronic planning map into equal pieces to obtain a plurality of pieces of divided maps; Obtaining background map data and map element objects in the multiple tiled maps, and overlaying and rendering the background map data and the map element objects on the Web side according to set parameters to obtain a high-precision map of the tiled maps, and obtaining multiple high-resolution tiled map rendering images based on the high-precision maps, and processing each tiled map rendering image in turn to obtain different block images; The different block images are spliced ​​according to their respective coordinates to obtain a complete map effect image.

[0063] It should be understood that: when the processor 401 executes the Web-oriented 2D and 3D map export program in the memory 402, in addition to the above functions, other functions can also be implemented. For details, please refer to the description of the corresponding method embodiment above.

[0064] Furthermore, the embodiment of the present invention does not specifically limit the type of the electronic device 400 mentioned, and the electronic device 400 may be a portable electronic device such as a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop computer, etc. Exemplary embodiments of portable electronic devices include but are not limited to portable electronic devices equipped with IOS, Android, Microsoft or other operating systems. The above-mentioned portable electronic device may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 400 may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0065] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the two-dimensional and three-dimensional map export method for the Web provided by the above methods, the method comprising: Acquire an electronic planning map to be printed, and divide the electronic planning map into equal pieces to obtain a plurality of pieces of divided maps; Obtaining background map data and map element objects in the multiple tiled maps, and overlaying and rendering the background map data and the map element objects on the Web side according to set parameters to obtain a high-precision map of the tiled maps, and obtaining multiple high-resolution tiled map rendering images based on the high-precision maps, and processing each tiled map rendering image in turn to obtain different block images; Different block images are spliced ​​according to their respective coordinates to obtain a complete map effect image. Those skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. Among them, the computer-readable storage medium is a disk, an optical disk, a read-only storage memory or a random access memory, etc.

[0066] The above is a detailed introduction to the Web-oriented two-dimensional and three-dimensional map export method, device and electronic device provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for exporting two or three dimensional maps for the Web, characterized in that: include: Acquire an electronic planning map to be printed, and divide the electronic planning map into equal pieces to obtain a plurality of pieces of divided maps; Obtaining background map data and map element objects in the multiple tiled maps, and overlaying and rendering the background map data and the map element objects on the Web side according to set parameters to obtain a high-precision map of the tiled maps, and obtaining multiple high-resolution tiled map rendering images based on the high-precision maps, and processing each tiled map rendering image in turn to obtain different block images; The different block images are spliced ​​according to their respective coordinates to obtain a complete map effect image.

2. The method for exporting two or three dimensional maps to the Web according to claim 1, characterized in that: The electronic planning map is equally divided into multiple maps, including: The electronic planning map is equally divided into sections according to the set printing parameters to obtain a plurality of high-precision section maps; The printing parameters include at least one of a coordinate system, a scale, a three-dimensional viewing angle and a spatial area.

3. The method for exporting two or three dimensional maps for the Web according to claim 2, characterized in that: The electronic planning map is equally divided into sections according to the set printing parameters to obtain multiple high-precision section maps, including: Based on the WebGL protocol and according to the set printing parameters, the electronic planning map is equally divided into sections to obtain a plurality of high-precision section maps.

4. The method for exporting two or three dimensional maps to the Web according to claim 1, characterized in that: The background map data and the map element objects are overlaid and rendered on the Web side according to the set parameters to obtain a high-precision map of each tile, and a plurality of high-resolution tile map rendering images are obtained based on the high-precision map. Each tile map rendering image is processed in turn to obtain different block images, including: The background map data and the map element objects are overlaid and rendered on the Web side according to the set parameters to obtain a high-precision map of each tile, and the high-precision map is output as a high-resolution tile map rendering image through Canvas technology; Construct a mask layer in the target area of ​​the tiled map rendering image; Traversing each pixel of the tiled map rendering image, when it is determined based on the mask layer that there are pixels in the tiled map rendering image that need to be covered or excluded, the pixels that need to be covered or excluded are filled with white to obtain a tiled image that meets the set parameters; Process each map rendering image in turn to obtain different block images.

5. The method for exporting two or three dimensional maps for the Web according to claim 4, characterized in that: The mask layer is a grid with binary pixels; Determining, based on the mask layer, whether there are pixels in the tiled map rendering image that need to be covered or excluded includes: When the pixel value of the corresponding mask layer of the pixel of the image rendered based on each sectional map is 0, the pixel at the corresponding position is determined to be the pixel that needs to be covered or excluded.

6. The method for exporting two or three dimensional maps to the Web according to claim 1, characterized in that: The electronic planning map is a two-dimensional map or a three-dimensional map; The two-dimensional map includes a raster tile map or a vector slice map, and the three-dimensional map is produced based on oblique photography data collected by a drone.

7. The method for exporting two or three dimensional maps for the Web according to any one of claims 1 to 6, characterized in that: The different block images are stitched together according to their respective coordinates to obtain a complete map effect image, including: Based on the canvas tag on the Web side, different block images are spliced ​​according to their respective coordinates to obtain a complete map effect image.

8. A two-dimensional and three-dimensional map export device for the Web, characterized in that: include: A framing module is used to obtain an electronic planning map to be printed, and to divide the electronic planning map into equal pieces to obtain a plurality of framing maps; A rendering module is used to obtain background map data and map element objects in the multiple segmented maps, and to overlay and render the background map data and the map element objects on the Web side according to set parameters to obtain segmented high-precision maps, and to obtain multiple high-resolution segmented map rendering images based on the high-precision maps, and to process the segmented map rendering images in turn to obtain different segmented images; The stitching module is used to stitch different block images according to their respective coordinates to obtain a complete map effect image.

9. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps of the Web-oriented two-dimensional and three-dimensional map export method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the Web-oriented two-dimensional and three-dimensional map export method as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Map processing method and device and electronic equipment

    CN111290718A

  • Geographic position information design and generation system and method thereof

    CN113420106A

  • Method, system and apparatus for rendering a map according to hybrid map data

    US20130321456A1

  • Efficient graphical element top surface rendering in digital map

    US20230177770A1