Method, system and equipment for realizing CAD red graph labeling based on WebGis map and medium

By converting the CAD red line map into a tile map and using WebGis loading technology, the problem of slow loading of geographic information images under traditional methods is solved, achieving efficient loading and dynamic interaction.

CN120086460APending Publication Date: 2025-06-03INSPUR QILU SOFTWARE IND
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510200275.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

When the traditional method directly loads complex geographical information images on the web side, the image size is huge, slow loading, and poor effect. How to improve the image loading efficiency to achieve better display effect.

Method used

By converting the CAD red line map into high-definition png images and dividing them into tile maps, loading the tile map with WebGis maps to achieve dynamic annotation and interaction.

Benefits of technology

It improves the loading speed of the CAD red line chart, realizes the zoom-in and reduction of the graph and point labeling functions, fast loading speed, fast zooming, good dynamic interaction effect, and wide application range.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120086460A_ABST
    Figure CN120086460A_ABST
Patent Text Reader

Abstract

The invention discloses a method, a system, equipment and a medium for realizing CAD (Computer Aided Design) red graph labeling based on a WebGis map, belongs to the technical field of computer mapping, and aims to solve the technical problem of how to effectively improve picture loading efficiency, replace a traditional direct picture loading form and achieve a better display effect. According to the technical scheme, the method comprises the steps that an original CAD red line graph is uploaded, specifically, basic information of the red line graph is filled in on a system web end page, and a dwg file of the original CAD graph is uploaded to a server; converting the dwg file into a png picture: calling a corresponding dependency library through Java or python to convert the dwg file into a high-definition png picture; segmenting the png picture into tile maps: carrying out picture size calculation, blank supplement and segmentation on the png picture according to a zooming level, and storing the png picture as an XYZ tile map according to a zooming rule; loading red map tiles on the WebGis map: loading the map tiles on a system web end page by using the WebGis map; positioning and marking the tile map; and displaying and dynamically interacting the tile map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer graphics, and in particular to a method, system, device and medium for implementing CAD redline annotation based on a WebGis map. Background Art

[0002] With the rapid development and widespread use of the Internet, people's demand for geographic information systems is increasing. The Internet has become a new trend in GIS operating platforms.

[0003] In Web systems, it is often necessary to display and preview data with certain location information and geographic information, and to dynamically annotate the location data, such as indoor planning, garden distribution, etc. Traditionally, images are loaded directly on the Web end for display, but the more complex the details of the image, the larger the size, which will bring great pressure to the browser, slow loading, and poor effect.

[0004] Therefore, how to effectively improve the efficiency of image loading and replace the traditional form of directly loading images to achieve better display effects is a technical problem that needs to be solved urgently. Summary of the invention

[0005] The technical task of the present invention is to provide a method, system, device and medium for implementing CAD red line annotation based on WebGis map to solve the problem of how to effectively improve the efficiency of image loading, replace the traditional form of directly loading images, and achieve better display effects.

[0006] The technical task of the present invention is achieved in the following way: a method for implementing CAD redline annotation based on WebGis map, the method is as follows:

[0007] Upload the original CAD red line drawing: On the system web page, fill in the basic information of the red line drawing and upload the original CAD drawing dwg file to the server;

[0008] Convert dwg files into png images: After receiving the dwg file, the server calls the corresponding dependent library through Java or python to convert the dwg file into a high-definition png image;

[0009] Divide PNG images into tile maps: Calculate the image size, fill in blanks, and divide the PNG images according to the zoom level, and save them as XYZ tile maps according to the zoom rules;

[0010] WebGis map loads red line map tiles: On the system web page, use WebGis map to load map tiles;

[0011] Location Marking of Tile Map: After loading and displaying the tile map through WebGis, points, lines, surfaces, texts, bubble windows, and small icons are added to the tile map for location and marking of places;

[0012] Display and Dynamic Interaction of Tile Map: Through the loading display and dynamic interaction of the tile map, the viewing of basic information and dynamic interaction are realized.

[0013] Preferably, the png image is sliced into a tile map as follows:

[0014] The original image P is processed by image filling to obtain image P1: The XYZ tile data structure is an image pyramid. As the zoom (scaling ratio) increases, the number of sliced tiles increases exponentially. For example, when zoom = 0, there is 1 tile; when zoom = 1, there are 4 tiles; when zoom = 2, there are 16 tiles, and so on. Since the tile map slices are all 256 * 256, regardless of how the tile map is scaled, the original image of the tile map should be a square, but the actual original image P is not necessarily a square. Therefore, the original image P needs to be filled and processed; and the height and width difference of the original image P are calculated to determine the number of pixels to be filled, and then the np.pad() function is used to fill the original image P with transparent pixels around it to process the original image P into a square image P1. Among them, when filling and processing the original image, if it is in Python, the Numpy library is used to fill and process the original image P;

[0015] Calculate the image size according to the scaling ratio and process the square image P1 into P2: The size of each tile is default 256 * 256, and the number of tiles changes with different scaling ratios. Therefore, the original image P1 needs to be processed into P2 according to different scaling ratios. For example, when zoom = 0, P2 should be 256 * 256; when zoom = 1, P2 should be 512 * 512, and so on;

[0016] Slice the processed P2 with the appropriate size: Save the sliced P2 image. If it is in Python, use the OpenCV and NumPy libraries to perform the slicing process, slice it into images with a size of 256 * 256, and name and save them according to the XYZ tile rules, which is convenient for the subsequent Web side to load the tile map according to the XYZ tile rules;

[0017] Traverse a group of P2 images with different scaling ratios and perform the slicing process in sequence to obtain the required complete tile map;

[0018] Deploy the obtained complete tile map to the server.

[0019] Preferably, the XYZ tile rule is specifically as follows: When the full - screen display picture of the map starts from the upper - left corner, it is cut downwards and to the right. The default size of the cut is 256 * 256 pixels. The grid row number in the upper - left corner is 0, the column number is 0, and they increase sequentially downwards and to the right.

[0020] Preferably, the specific process of loading the red - line map tiles of the WebGis map is as follows:

[0021] The loading and display of map tiles are realized through the OpenLayers library, the Leaflet lightweight WebGIS front - end library, and the Cesium front - end 3D GIS library components.

[0022] Preferably, the loading and display of the tile map are specifically as follows: The Web - end page of the system, through WebGis (such as leaflet), according to the current zoom level and the geographical range displayed on the screen, loads the corresponding XYZ tiles from the server - side;

[0023] The longitude and latitude are calculated with the XYZ row and column numbers to make the tile map correspond to the longitude and latitude. The formula is as follows:

[0024]

[0025] Preferably, the dynamic interaction is specifically as follows:

[0026] Associate the tile map with device information and geographical information;

[0027] Arbitrarily mark and perform show - hide operations on the location, dynamic route, and dynamic range on the tile map;

[0028] The tile map has a pre - processing mechanism for loading data. The tile map has been cropped to form a cached picture set, which is faster than generating pictures in real - time during loading, meets the requirements of quickly generating maps under the basic network environment configuration, and is suitable for applications with few map change requirements.

[0029] A CAD red - line icon annotation system based on the WebGis map, the system includes:

[0030] An upload module, used to fill in the basic information of the red - line map on the system web - end page and upload the CAD original dwg file to the server;

[0031] A conversion module, used to, after the server receives the dwg file, call the corresponding dependency libraries through Java or python to convert the dwg file into a high - definition png picture;

[0032] A splitting module, used to calculate the picture size, supplement blanks, and split the png picture according to the zoom level, and save it as an XYZ tile map according to the zoom rule;

[0033] A loading module, used to load map tiles using a WebGis map on the system web - side page;

[0034] A marking module, used to add points, lines, surfaces, texts, bubble windows, and small icons on the tile map for location and marking of places after loading and displaying the tile map through WebGis;

[0035] A display and dynamic interaction module, used to achieve viewing of basic information and dynamic interaction through the loading display and dynamic interaction of the tile map.

[0036] Preferably, the splitting module includes:

[0037] A splitting sub - module, used to hierarchically split a high - definition png image according to the map tile pyramid model after obtaining the high - definition png image;

[0038] A cutting sub - module, used to process the png image according to the tile level and respectively cut it into several small images of 256 * 256;

[0039] A naming sub - module, used to name and store the images using the ZXY specification; where the ZXY specification refers to the tile level, tile X coordinate, and tile Y coordinate.

[0040] An electronic device, including: a memory and at least one processor;

[0041] Wherein, a computer program is stored on the memory;

[0042] The at least one processor executes the computer program stored in the memory, so that the at least one processor executes the method for realizing CAD red - line icon marking based on the WebGis map as described above.

[0043] A computer - readable storage medium, in which a computer program is stored, and the computer program can be executed by a processor to realize the method for realizing CAD red - line icon marking based on the WebGis map as described above.

[0044] The method, system, device, and medium for realizing CAD red - line icon marking based on the WebGis map of the present invention have the following advantages:

[0045] (1) By performing tile slicing on the CAD red - line drawing and converting it into map tiles, the present invention realizes the display and marking of the CAD red - line drawing through the WebGis map, improves the loading speed of the CAD red - line drawing, and realizes the functions of zooming in and out of the red - line drawing and point marking;

[0046] (2) Compared with the technology of directly loading and displaying pictures on traditional Web, WebGIS loading map tiles has the following advantages:

[0047] ① Fast loading speed: The tile cutting and grading technology cuts a large picture into small pictures of 256*256. When the page is loaded, only the corresponding XYZ tiles (usually PNG pictures) need to be loaded from the server according to the current zoom level and the geographical range displayed on the screen, effectively improving the loading speed.

[0048] ② Quick and convenient zooming: The slices process pictures with different resolutions according to the zoom level. When zooming at different ratios, the cut tiles at different resolutions are loaded and displayed, ensuring both smooth size scaling and clear and undistorted details of the large picture.

[0049] ③ Good dynamic interaction effect: WebGis has open-source and mature component products, such as Leaflet, OpenLayers, etc. These component products have their own set of suitable and mature plugins, covering map control and interaction, etc. At the same time, it is very convenient to implement custom controls, with good scalability, and can realize most functions of developing online maps, such as location of places, display of routes, etc.

[0050] ④ Wide application range: The WebGis map display and loading tile system can be applied to various occasions, such as indoor and outdoor dynamic positioning of personnel, vehicle display, large-screen dynamic interactive display, etc.

[0051] ⑤ Good repeatability: Since the WebGis map display and loading tile system has a wide range of applications and is not limited to the display of CAD red line drawings described in this article, this technology can be used to display large-size pictures and pictures that require positioning and marking.

[0052] (3) The present invention supports domestic CPUs and operating systems, does not require calling browser plugins, and realizes convenient and fast viewing of CAD red line drawings, while having good dynamic interaction for CAD red line drawings.

[0053] (4) For real-time data processing, analysis, etc. requirements on the Web side, most WebGIS platforms have been optimized in vector map loading, and also provide a load balancing mechanism, with relatively fast loading speed, capable of supporting the release of massive data, and having a wide range of applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The present invention will be further described below with reference to the drawings.

[0055] Appendix Figure 1 is a flow block diagram of a method for implementing CAD red line annotation based on a WebGis map;

[0056] Appendix Figure 2Schematic diagram of the coordinates of ZXY standard tiles;

[0057] Appendix Figure 3 Schematic diagram of the tile pyramid model. Detailed implementation manners

[0058] With reference to the accompanying drawings of the specification and specific embodiments, the method, system, device and medium for realizing CAD red line icon annotation based on WebGis map of the present invention are described in detail as follows.

[0059] Embodiment 1:

[0060] As shown in the appendix Figure 1 This embodiment provides a method for realizing CAD red line icon annotation based on WebGis map, and the method is as follows:

[0061] S1. Upload the original CAD red line drawing: On the web page of the system, fill in the basic information of the red line drawing and upload the original CAD dwg file to the server;

[0062] S2. Convert the dwg file into a png image: After the server receives the dwg file, call the corresponding dependency library through Java or python to convert the dwg file into a high-definition png image;

[0063] S3. Split the png image into a tile map: Calculate the image size, supplement the blank, and split the png image according to the zoom level, and save it as an XYZ tile map according to the zoom rule;

[0064] S4. Load the red line drawing map tiles in the WebGis map: On the web page of the system, use the WebGis map to load the map tiles;

[0065] S5. Positioning and annotation of the tile map: After the tile map is loaded and displayed through WebGis, add points, lines, surfaces, texts, bubble windows and small icons to the tile map for location and annotation of locations;

[0066] S6. Display and dynamic interaction of the tile map: Through the loading display and dynamic interaction of the tile map, realize the viewing of basic information and dynamic interaction.

[0067] The splitting of the png image into a tile map in step S3 of this embodiment is specifically as follows:

[0068] S301. Process the original image P through image padding to obtain image P1: The XYZ tile data structure is an image pyramid. As the zoom (scaling ratio) increases, the number of sliced tiles increases exponentially. For example, when zoom = 0, there is 1 tile; when zoom = 1, there are 4 tiles; when zoom = 2, there are 16 tiles, and so on. Since the tile map slices are all 256 * 256, regardless of how the tile map is scaled, the original graph of the tile map should be square. However, the actual original image P may not be square, so the original image P needs to be filled and processed. Calculate the height and width difference of the original image P to determine the number of pixels to be filled, and then use the np.pad() function to fill the original image P with transparent pixels around it to process the original image P into a square image P1. When filling and processing the original image, if it is in Python, use the Numpy library to fill and process the original image P.

[0069] S302. Calculate the image size according to the scaling ratio and process the square image P1 into P2: The size of each tile is defaulted to 256 * 256. Since the number of tiles changes with different scaling ratios, it is necessary to process the original image P1 into P2 according to different scaling ratios. For example, when zoom = 0, P2 should be 256 * 256; when zoom = 1, P2 should be 512 * 512, and so on.

[0070] S303. Slice the processed P2: Save the sliced P2 image. If it is in Python, use the OpenCV and NumPy libraries to perform the slicing process, slice it into images with a size of 256 * 256, and name and save them according to the XYZ tile rule, which is convenient for the subsequent Web side to load the tile map according to the XYZ tile rule.

[0071] S304. Traverse a group of P2 images with different scaling ratios and perform the slicing process in sequence to obtain the required complete tile map.

[0072] S305. Deploy the obtained complete tile map to the server.

[0073] The specific XYZ tile rule in step S303 of this embodiment is as follows: Start from the upper left corner of the image when the map is fully displayed, cut down and to the right. The default size of the cut is 256 * 256 pixels. The grid row number in the upper left corner is 0, and the column number is 0, and they increase sequentially downwards and to the right, as shown in the appendix Figure 2 as shown.

[0074] The specific process of the WebGis map loading the red line map tiles in step S4 of this embodiment is as follows:

[0075] The loading and display of map tiles are realized through the OpenLayers library, the Leaflet lightweight WebGIS front-end library, and the Cesium front-end 3D GIS library components.

[0076] In this embodiment, for the Web-side loading and display of the sliced map in step S4, the rendering and loading of the tile map are mainly achieved through WebGis, such as the Leaflet lightweight WebGIS front-end library. Leaflet is designed with the concept of simplicity, high performance, and good usability. It works efficiently on all major desktop and mobile platforms, utilizes HTML5 and CSS3 in modern browsers, and also supports access to older browsers. It supports plugin extensions and provides user-friendly API documentation and simple and easy-to-read source code.

[0077] In this embodiment, the loading and display of the tile map in step S6 are specifically as follows: The Web-side page of the system, through WebGis (such as Leaflet), loads the corresponding XYZ tiles from the server according to the current zoom level and the geographical range displayed on the screen.

[0078] The calculation of longitude and latitude with the XYZ row and column numbers is used to make the tile map correspond to the longitude and latitude. The formula is as follows:

[0079]

[0080] The dynamic interaction in step S6 of this embodiment is specifically as follows:

[0081] S601: Associate the tile map with device information and geographical information;

[0082] S602: Arbitrarily perform annotation and display / hide operations on the location, dynamic route, and dynamic range on the tile map;

[0083] S603: The tile map is loaded with a data preprocessing mechanism. The tile map has been cropped to form a cache image set, which is faster to load than generating images in real time, meeting the requirements of fast map output under the basic network environment configuration and being suitable for applications with few map change requirements.

[0084] Embodiment 2:

[0085] This embodiment provides a CAD red line icon annotation system based on a WebGis map. The system includes:

[0086] An upload module for filling in the basic information of the red line map on the system web-side page and uploading the CAD original dwg file to the server.

[0087] A conversion module, which is used to convert the dwg file into a high-definition png image by calling the corresponding dependent libraries through Java or Python after the server receives the dwg file;

[0088] A segmentation module, which is used to calculate the image size, supplement the blank, and segment the png image according to the zoom level, and save it as an XYZ tile map according to the zoom rule;

[0089] A loading module, which is used to load map tiles using a WebGis map on the system web page;

[0090] A marking module, which is used to add points, lines, surfaces, texts, bubble windows, and small icons to the tile map for location and marking of locations after loading and displaying the tile map through WebGis;

[0091] A display and dynamic interaction module, which is used to view basic information and perform dynamic interaction through the loading display and dynamic interaction of the tile map.

[0092] The segmentation module in this embodiment includes:

[0093] A splitting sub-module, which is used to hierarchically split the high-definition png image according to the map tile pyramid model after obtaining the high-definition png image;

[0094] A cutting sub-module, which is used to process the png image at the corresponding level according to the tile level and cut it into several small images of 256*256 respectively;

[0095] A naming sub-module, which is used to name and store the images according to the ZXY specification; where the ZXY specification refers to the tile level, tile X coordinate, and tile Y coordinate.

[0096] As shown in the appendix Figure 3 The tile map pyramid model is a multi-resolution hierarchical model. From the bottom layer to the top layer of the tile pyramid, the resolution becomes lower, but the represented geographical range remains unchanged.

[0097] The working process of this system is as follows:

[0098] (1) Upload of the original CAD drawing: Just export the completed CAD drawing as a dwg format file, then upload it on the system Wed end and fill in its basic information;

[0099] (2) Segmentation of the original CAD drawing into a tile map: It is divided into two steps. The first step is to convert the dwg format file into a png format image, and the second step is to segment the png image into a tile map;

[0100] In the stage of converting a DWG format file into a PNG format image, it mainly processes the DWG format file by calling the corresponding dependent libraries through Java or Python. Taking Java as an example, the third-party library Aspose.CAD can be used to directly save the image as a PNG format image by calling the image.save method;

[0101] In the stage of slicing the PNG image into a tile map, it mainly performs processing such as hierarchical scaling ratio calculation and XYZ slicing. The following are the key steps and detailed explanations that may be included in this stage:

[0102] (1) Perform image filling on the original image P to obtain P1:

[0103] The XYZ tile data structure is an image pyramid. As the zoom (scaling ratio) increases, the number of sliced tiles increases exponentially. For example, when zoom = 0, there is 1 tile, when zoom = 1, there are 4 tiles, when zoom = 2, there are 16 tiles, and so on. Since the tile map slices are all 256 * 256, regardless of how the tile map is scaled, the original image of the tile map should be a square, but the actual original image P is not necessarily a square. Therefore, it is necessary to perform filling processing on the original image. Taking Python as an example, the Numpy library can be used;

[0104] Calculate the difference between the height and width of the image to determine the number of pixels to be filled, and then use the np.pad() function to fill the transparent pixels around the image to process the original image P into a square image P1;

[0105] (2) Calculate the image size according to the scaling ratio and process P1 into P2:

[0106] The size of each tile is generally defaulted to 256 * 256. As the scaling ratio is different, the number of tiles changes as mentioned above. Therefore, it is necessary to process the original image P1 into P2 according to different scaling ratios. For example, when zoom = 0, P2 should be 256 * 256, when zoom = 1, P2 should be 512 * 512, and so on;

[0107] (3) Perform slicing processing on the processed P2 with the adjusted size:

[0108] Save the sliced P2 image. Taking Python as an example, the OpenCV and NumPy libraries can be used for slicing processing, slicing it into images with a size of 256 * 256, and naming and saving them according to the XYZ tile rules, which is convenient for the subsequent Web side to load the tile map according to the XYZ rules. The map tile rules of the ZXY specification are as follows: Starting from the upper left corner of the image when the map is fully displayed, cut it down and to the right. The cutting size is generally defaulted to 256 * 256 pixels. The grid row number in the upper left corner is 0, the column number is 0, and they increase sequentially downwards and to the right, as shown in the appendixFigure 2 as shown;

[0109] (4) According to the actual situation, in step (2), a set of images P2 with different zoom ratios is obtained, and the set P2 is traversed, and step (3) is executed in sequence to obtain the required complete tile map.

[0110] (5) Deploy the complete tile map obtained in step (4) to the server.

[0111] (III) Display and dynamic interaction of the tile map: mainly including two stages: loading display and dynamic interaction of the tile map;

[0112] For the stage of loading and displaying the tile map, it is that the Web side, through WebGis (such as leaflet), loads the corresponding XYZ tiles from the server according to the current zoom level and the geographical range displayed on the screen. If you want to correspond the tile map with the longitude and latitude, then the longitude and latitude need to be calculated with the XYZ row and column numbers, and the formula is as follows:

[0113]

[0114] For the stage of dynamic interaction, it is necessary to associate with other data information, such as device information, geographical information, etc. You can arbitrarily mark and perform operations such as showing and hiding on the tile map for location, dynamic route, dynamic range, etc.

[0115] The tile map has a data preprocessing mechanism for loading. The tile map has been cropped and processed to form a cache image set, which is faster than generating images in real time during loading, achieving twice the result with half the effort, and can meet the requirements of quickly generating maps under basic network environment configurations, and is suitable for applications with few map change requirements.

[0116] For real-time data processing, analysis, etc. requirements on the Web side, most WebGIS platforms have been optimized in the loading of vector maps, and also provide a load balancing mechanism, with a faster loading speed, which can support the release of massive data and has a wide range of applications.

[0117] Embodiment 3:

[0118] This embodiment also provides an electronic device, including: a memory and a processor;

[0119] Wherein, the memory stores computer execution instructions;

[0120] The processor executes the computer execution instructions stored in the memory, so that the processor executes the method for implementing CAD red line icon annotation based on the WebGis map in any embodiment of the present invention.

[0121] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0122] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and by calling the data stored in the memory. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function, etc.; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory can also include high-speed random access memory, and can also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash memory card, at least one magnetic disk storage period, flash memory device, or other volatile solid-state storage devices.

[0123] Embodiment 4:

[0124] This embodiment also provides a computer-readable storage medium, which stores multiple instructions. The instructions are loaded by the processor to cause the processor to execute the method for implementing CAD red line icon annotation based on a WebGis map in any embodiment of the present invention. Specifically, a system or device equipped with a storage medium can be provided. Software program codes for implementing the functions in any one of the above embodiments are stored on the storage medium, and the computer (or CPU or MPU) of the system or device reads and executes the program codes stored in the storage medium.

[0125] In this case, the program code read from the storage medium itself can implement the functions in any one of the above embodiments. Therefore, the program code and the storage medium storing the program code constitute a part of the present invention.

[0126] Embodiments of the storage medium for providing program codes include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Optionally, the program code can be downloaded from a server computer via a communication network.

[0127] In addition, it should be clear that not only can part or all of the actual operations be completed by executing the program code read by a computer, but also by the operating system operating on the computer and the like based on the instructions of the program code, thereby implementing the functions of any one of the above embodiments.

[0128] In addition, it can be understood that the program code read from the storage medium is written into the memory provided in the expansion board inserted into the computer or into the memory provided in the expansion unit connected to the computer, and then based on the instructions of the program code, the CPU and the like installed on the expansion board or the expansion unit execute part or all of the actual operations, thereby implementing the functions of any one of the above embodiments.

[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for implementing CAD redline annotation based on WebGis map, characterized in that: The method is as follows: Upload the original CAD red line drawing: On the system web page, fill in the basic information of the red line drawing and upload the original CAD drawing dwg file to the server; Convert dwg files into png images: After receiving the dwg file, the server calls the corresponding dependent library through Java or python to convert the dwg file into a high-definition png image; Divide PNG images into tile maps: Calculate the image size, fill in blanks, and divide the PNG images according to the zoom level, and save them as XYZ tile maps according to the zoom rules; WebGis map loads red line map tiles: On the system web page, use WebGis map to load map tiles; Positioning and marking of tile maps: After loading and displaying tile maps through WebGis, add points, lines, surfaces, text, bubble windows and small icons on the tile maps to locate and mark locations; Display and dynamic interaction of tile maps: Through the loading, display and dynamic interaction of tile maps, basic information can be viewed and dynamically interacted.

2. The method for implementing CAD redline annotation based on WebGis map according to claim 1, characterized in that: png image is divided into tile maps as follows: Fill the original image P into image P1: Calculate the height and width difference of the original image P, determine the number of pixels to be filled, and then use np. pad() function to fill transparent pixels around the original image P, and process the original image P into a square image P1; when filling the original image, if it is python, use Numpy library to fill the original image P; Calculate the image size according to the scaling ratio, and process the square image P1 into P2: Process the original image P1 into P2 according to different scaling ratios; Slice the resized P2: Slice and save the P2 image. If it is Python, use OpenCV and NumPy libraries to slice it into 256*256 size images, and name and save them according to the XYZ tile rule, so that the subsequent Web end can load the tile map according to the XYZ tile rule; A set of images P2 with different zoom ratios is obtained, and the set P2 is traversed and sliced ​​sequentially to obtain the required complete tile map; Just deploy the obtained complete tile map to the server.

3. The method for implementing CAD redline annotation based on WebGis map according to claim 2 is characterized in that: The specific XYZ tile rule is: when the map is displayed in full, the image is cut from the upper left corner downward and to the right. The default size of the cut is 256*256 pixels. The grid row number in the upper left corner is 0, and the column number is 0, and it increases downward and to the right.

4. The method for implementing CAD redline annotation based on WebGis map according to claim 3 is characterized in that: The WebGis map loads the red line map tile as follows: The loading and display of map tiles are achieved through the OpenLayers class library, Leaflet lightweight WebGIS front-end class library and Cesium front-end 3DGIS class library component products.

5. The method for implementing CAD redline annotation based on WebGis map according to claim 4 is characterized in that: The loading and display of tile maps is as follows: the system web page uses WebGis to load the corresponding XYZ tile from the server according to the current zoom level and the geographical range displayed on the screen; Calculate the longitude and latitude and the XYZ row and column numbers to make the tile map correspond to the longitude and latitude. The formula is as follows:

6. The method for implementing CAD redline annotation based on WebGis map according to claim 5, characterized in that: The dynamic interactions are as follows: Associating tile maps with device information and regional information; Arbitrarily mark and show / hide locations, dynamic routes, and dynamic ranges on tile maps; Tile map loading has a data preprocessing mechanism. Tile maps are cropped to form a cached image set, which is faster than real-time image generation when loading.

7. A CAD redline annotation system based on WebGis map, characterized in that: The system includes: The upload module is used to fill in the basic information of the red line diagram on the system web page and upload the original CAD drawing dwg file to the server; The conversion module is used to convert the dwg file into a high-definition png image by calling the corresponding dependent library through Java or Python after the server receives the dwg file; The segmentation module is used to calculate the image size, fill in blanks and segment the PNG image according to the zoom level, and save it as an XYZ tile map according to the zoom rules; Loading module, used to load map tiles using WebGis map on the system web page; The annotation module is used to add points, lines, surfaces, text, bubble windows and small icons on the tile map to locate and mark the location after loading and displaying the tile map through WebGis; The display and dynamic interaction module is used to realize the viewing of basic information and dynamic interaction through the loading display and dynamic interaction of tile maps.

8. The system for implementing CAD redline annotation based on WebGis map according to claim 7, characterized in that: The segmentation module includes: The segmentation submodule is used to obtain the high-definition PNG image and then segment the high-definition PNG image into layers according to the map tile pyramid model; The cutting submodule is used to process the PNG images at the corresponding level according to the tile level, and cut them into several small images of 256*256; The naming submodule is used to name and store images using the ZXY specification; the ZXY specification refers to the tile level, tile X coordinate, and tile Y coordinate.

9. An electronic device, characterized in that: include: memory and at least one processor; Wherein, the memory stores a computer program; The at least one processor executes the computer program stored in the memory, so that the at least one processor executes the method for implementing CAD redline annotation based on WebGis map as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which can be executed by a processor to implement the method for annotating a CAD redline map based on a WebGis map as claimed in any one of claims 1 to 6.