Orthophoto and cad drawing superimposed display method, device and medium

By determining the location of feature points of images and CAD drawings on a webpage and calculating the scale, the complexity of overlaying orthophotos and CAD drawings in existing technologies is solved, enabling fast and accurate overlay display.

CN116756260BActive Publication Date: 2026-11-06HEFEI SUNGROW RENEWABLE ENERGY SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310775960.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-27
Publication Date
2026-11-06
Estimated Expiration
2043-06-27

AI Technical Summary

Technical Problem

Existing technologies cannot easily and efficiently overlay orthophotos and CAD drawings. They often require the installation of specialized software and cumbersome coordinate system conversions and manual operations, resulting in low efficiency and large errors.

Method used

By determining the location of feature points in images and CAD drawings on a webpage, calculating the scale based on the feature points and adjusting the size, an overlay display can be achieved without complex coordinate system transformations.

Benefits of technology

It enables fast, accurate, and easy overlay of orthophotos and CAD drawings on a web-based platform, reducing the need for users' professional knowledge and improving operational efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116756260B_ABST
    Figure CN116756260B_ABST
Patent Text Reader

Abstract

This application discloses a method, device, and medium for overlaying and displaying orthophotos and CAD drawings, belonging to the technical field of photovoltaic power generation. In this application, firstly, a first and second feature point in the orthophoto in the image coordinate system, and a third and fourth feature point in the CAD drawing in the CAD coordinate system are determined on a webpage. Then, the overlay display ratio of the orthophoto and the CAD drawing is determined based on the feature points. Finally, the size of the orthophoto or the CAD drawing is adjusted based on the overlay display ratio, and the orthophoto and the CAD drawing, with the same size, are overlaid and displayed on the webpage. By combining image raster loading and two-point coordinate positioning, the overlay display of orthophotos and CAD drawings can be achieved quickly, accurately, and with low barriers to entry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of photovoltaic power generation, and in particular to a method for overlaying and displaying orthophotos and CAD drawings, an equipment for overlaying and displaying orthophotos and CAD drawings, and a computer-readable storage medium. Background Technology

[0002] Currently, whether in distributed photovoltaic power stations, large-scale power plants, or other national economic construction projects, it is necessary to perform offset-free overlay verification of CAD drawings and orthophotos. This is because orthophotos contain richer geographic information, such as obstacle information and surrounding environment details, and are easy to read. By overlaying the two images to verify the CAD drawings, the accuracy of distances and the feasibility of the proposed solutions can be confirmed, thus improving the accuracy of decision-making support.

[0003] However, since CAD drawings and orthophotos have their own coordinate systems, they cannot be directly and simply overlaid. To solve the problem of merging these two types of data, there are currently two solutions. One is to utilize several professional GIS (Geographic Information System) software programs on the market, such as ArcGIS, ENVI, LSV, and Cass, to import CAD drawings and automatically transform the CAD coordinate system into a standard geographic coordinate system through projection and by combining 4 parameters (2 translation parameters to the east and north, 1 rotation parameter, and 1 scale factor) or 7 parameters (3 translation parameters, 3 rotation parameters, and 1 scale factor), achieving the overlay effect. The disadvantage of this method is that it requires the CAD drawings to contain geographic coordinate information. If geographic coordinate information is missing, complex file conversion to KML (Keyhole Markup Language) is required, and the user needs to manually set the 4 and 7 parameters, which is not only cumbersome but also requires a high level of professional expertise from the user.

[0004] Another approach in distributed photovoltaic power station design involves using AutoCAD with relevant plugins. Drone imagery is imported into AutoCAD as the background of the drawings, and the overlay effect is manually achieved by dragging and scaling the CAD drawing using the mouse. This method, compared to the previous one, does not involve GIS coordinate transformation, but manual operation is less efficient and can introduce overlay errors.

[0005] In summary, both solutions require the installation of corresponding software. Non-open-source software requires payment or cracking, and software installation also has certain requirements regarding the user's computer's basic configuration. When the image resolution or area is large, the size of the image TIF file can reach several gigabytes, and the software is prone to lag, significantly impacting operational performance. Summary of the Invention

[0006] The main purpose of this application is to provide a method for overlaying and displaying orthophotos and CAD drawings, an overlaying and displaying device for orthophotos and CAD drawings, and a computer-readable storage medium, in order to solve the technical problem of the difficulty in simply overlaying and displaying orthophotos and CAD drawings.

[0007] To achieve the above objectives, this application provides a method for overlaying and displaying orthophotos and CAD drawings, the method comprising:

[0008] Obtain the orthophoto image and CAD drawing of the target object, and place the orthophoto image and CAD drawing on the web page;

[0009] Select the first and second features of the target object;

[0010] On the webpage, the position of the first feature in the image coordinate system of the orthophoto map is determined as the first feature point, and the position of the second feature in the image coordinate system of the orthophoto map is determined as the second feature point.

[0011] On the webpage, the position of the first feature in the CAD coordinate system of the CAD drawing is determined as the third feature point, and the position of the second feature in the CAD coordinate system of the CAD drawing is determined as the fourth feature point.

[0012] The ratio of the orthophoto image to the CAD drawing is determined based on the first feature point, the second feature point, the third feature point, and the fourth feature point;

[0013] Adjust the size of the orthophoto and / or the size of the CAD drawing based on the ratio, so that the size of the orthophoto is the same as the size of the CAD drawing;

[0014] The orthophoto and the CAD drawing, both of the same size, are overlaid on the webpage.

[0015] For example, the step of determining the ratio of the orthophoto image to the CAD drawing based on the first feature point, the second feature point, the third feature point, and the fourth feature point includes:

[0016] In the image coordinate system, the distance between the first feature point and the second feature point in the orthophoto image is determined as the first distance, and in the CAD coordinate system, the distance between the third feature point and the fourth feature point in the CAD drawing is determined as the second distance;

[0017] The scale of the orthophoto image and the CAD drawing is determined based on the first distance and the second distance.

[0018] For example, the step of determining the first distance between the first feature point and the second feature point in the orthophoto image in the image coordinate system includes:

[0019] Obtain the screen mouse coordinates of the first feature point and the second feature point in the orthophoto image, and convert the screen mouse coordinates to canvas coordinates;

[0020] The image coordinates of the canvas coordinates in the image coordinate system are determined based on the canvas coordinate range and the image coordinate range, and the first distance between the first feature point and the second feature point in the orthophoto image is determined based on the image coordinates.

[0021] For example, before the step of obtaining the screen mouse coordinates of the first feature point and the second feature point in the orthophoto image and converting the screen mouse coordinates to canvas coordinates, the method includes:

[0022] Obtain the TFW coordinate parameters of the orthophoto image, and establish an image coordinate system based on the TFW coordinate parameters.

[0023] For example, the TFW coordinate parameters include the coordinates of the top left corner of the orthophoto image, rotation parameters in the horizontal and vertical directions, and scaling parameters. The image coordinate system is an image coordinate range. The step of establishing the image coordinate system based on the TFW coordinate parameters includes:

[0024] Based on the coordinates of the upper left corner of the orthophoto and the rotation and scaling parameters in the horizontal and vertical directions, the coordinates of the lower right corner of the orthophoto are determined.

[0025] The image coordinate range is determined based on the coordinates of the upper left and lower right corners of the orthophoto.

[0026] For example, the step of determining the second distance between the first feature point and the second feature point in the CAD drawing in the CAD coordinate system includes:

[0027] The CAD coordinates of the first feature point and the second feature point in the CAD drawing are determined based on a preset interface, and the second distance between the first feature point and the second feature point in the CAD drawing is determined based on the CAD coordinates.

[0028] For example, before the step of determining the CAD coordinates of the first feature point and the second feature point in the CAD drawing in the CAD coordinate system based on a preset interface, the method includes:

[0029] The CAD coordinate range is determined based on the coordinates of the top left and bottom right corners of the CAD drawing, and the CAD coordinate system is determined based on the CAD coordinate range.

[0030] For example, the step of acquiring the orthophoto image and CAD drawing of the target object includes:

[0031] The original image is acquired, and the original image is rasterized and loaded to obtain an orthophoto map;

[0032] Obtain the original drawing and perform raster conversion on the original drawing to obtain a CAD drawing in raster data format.

[0033] For example, the step of placing the orthophoto and CAD drawing on a webpage includes:

[0034] The image coordinate system and the CAD coordinate system are unified on the web page so that the canvas coordinates of the web page correspond to the image coordinate system and the CAD coordinate system respectively, so as to place the orthophoto and CAD drawing on the web page.

[0035] For example, the step of overlaying and displaying the orthophoto and the CAD drawing of the same size on the webpage includes:

[0036] The first feature point in the orthophoto image is aligned with the third feature point in the CAD drawing, and the second feature point in the orthophoto image is aligned with the fourth feature point in the CAD drawing, so that the orthophoto image and the CAD drawing, which have the same size, are superimposed and displayed on the webpage.

[0037] This application also provides a device for overlaying and displaying orthophotos and CAD drawings, the device comprising:

[0038] The acquisition module is used to acquire orthophotos and CAD drawings of the target object and place the orthophotos and CAD drawings on a web page;

[0039] The selection module is used to select the first and second features of the target object;

[0040] The image feature point determination module is used to determine the position of the first feature object in the image coordinate system of the orthophoto map as the first feature point on the webpage, and to determine the position of the second feature object in the image coordinate system of the orthophoto map as the second feature point on the webpage.

[0041] The CAD feature point determination module is used to determine the position of the first feature object in the CAD coordinate system of the CAD drawing as the third feature point on the webpage, and to determine the position of the second feature object in the CAD coordinate system of the CAD drawing as the fourth feature point on the webpage.

[0042] The scale determination module is used to determine the scale between the orthophoto image and the CAD drawing based on the first feature point, the second feature point, the third feature point, and the fourth feature point;

[0043] An adjustment module is used to adjust the size of the orthophoto image and / or the size of the CAD drawing based on the ratio, so that the size of the orthophoto image is the same as the size of the CAD drawing.

[0044] An overlay display module is used to overlay and display the orthophoto image and the CAD drawing, both of the same size, on the webpage.

[0045] This application also provides a device for overlaying orthophotos and CAD drawings. The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the overlaying orthophoto and CAD drawing method described above.

[0046] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for overlaying and displaying orthophotos and CAD drawings.

[0047] This application provides a method, device, and computer-readable storage medium for overlaying and displaying orthophotos and CAD drawings. The method involves acquiring an orthophoto of a target object and its CAD drawing, placing the orthophoto and CAD drawing on a webpage; selecting a first feature and a second feature of the target object; determining the position of the first feature in the image coordinate system of the orthophoto as a first feature point, and the position of the second feature in the image coordinate system of the orthophoto as a second feature point; determining the position of the first feature in the CAD coordinate system of the CAD drawing as a third feature point, and the position of the second feature in the CAD coordinate system of the CAD drawing as a fourth feature point; determining the ratio between the orthophoto and the CAD drawing based on the first, second, third, and fourth feature points; adjusting the size of the orthophoto and / or the CAD drawing based on the ratio to make the size of the orthophoto and the CAD drawing the same; and overlaying and displaying the orthophoto and the CAD drawing of the same size on the webpage.

[0048] In this application, to address the time-consuming and labor-intensive operations such as software installation, cumbersome parameter configuration, manual operation errors, and KML file conversion when overlaying orthophotos and CAD drawings, as well as the high requirements for users' professional knowledge, a web-based method for overlaying and displaying orthophotos and CAD drawings without the need for complex parameter conversions such as coordinate systems is proposed.

[0049] First, the first and second feature points in the orthophoto in the image coordinate system, and the third and fourth feature points in the CAD drawing in the CAD coordinate system are determined on the webpage. Then, the overlay ratio of the orthophoto and the CAD drawing is determined based on these feature points. Finally, the size of the orthophoto or the CAD drawing is adjusted based on the overlay ratio, and the orthophoto and the CAD drawing, both of the same size, are overlaid and displayed on the webpage. This method, combining image raster loading and two-point coordinate positioning, enables a fast, accurate, and easy-to-use overlay display of orthophotos and CAD drawings. Attached Figure Description

[0050] Figure 1 This is a schematic diagram of the structure of the operating device of the hardware operating environment involved in the embodiments of this application;

[0051] Figure 2 This is a schematic diagram of an orthophoto;

[0052] Figure 3 This is a schematic diagram from a CAD drawing;

[0053] Figure 4 This is a schematic diagram of the web page layout design of an embodiment of the method for overlaying and displaying orthophotos and CAD drawings involved in the embodiments of this application;

[0054] Figure 5 This is a schematic diagram of feature positioning points in an embodiment of the method for overlaying and displaying orthophotos and CAD drawings involved in the embodiments of this application;

[0055] Figure 6 This is an error diagram illustrating an embodiment of the method for overlaying and displaying orthophotos and CAD drawings involved in the present application.

[0056] Figure 7 This is a schematic diagram illustrating the correct overlay effect of an embodiment of the method for overlaying and displaying orthophotos and CAD drawings involved in the present application.

[0057] Figure 8 This is a schematic diagram illustrating an embodiment of the method for overlaying and displaying orthophotos and CAD drawings involved in the present application.

[0058] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0059] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0060] Reference Figure 1 , Figure 1 This is a schematic diagram of the hardware operating environment structure involved in the embodiments of this application.

[0061] like Figure 1 As shown, the operating device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.

[0062] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the operating equipment and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0063] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a data storage module, a network communication module, a user interface module, and computer programs.

[0064] exist Figure 1 In the illustrated operating device, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and memory 1005 in the operating device of this application can be disposed in the operating device, and the operating device calls the computer program stored in the memory 1005 through the processor 1001 and performs the following operations:

[0065] Obtain the orthophoto image and CAD drawing of the target object, and place the orthophoto image and CAD drawing on the web page;

[0066] Select the first and second features of the target object;

[0067] On the webpage, the position of the first feature in the image coordinate system of the orthophoto map is determined as the first feature point, and the position of the second feature in the image coordinate system of the orthophoto map is determined as the second feature point.

[0068] On the webpage, the position of the first feature in the CAD coordinate system of the CAD drawing is determined as the third feature point, and the position of the second feature in the CAD coordinate system of the CAD drawing is determined as the fourth feature point.

[0069] The ratio of the orthophoto image to the CAD drawing is determined based on the first feature point, the second feature point, the third feature point, and the fourth feature point;

[0070] Adjust the size of the orthophoto and / or the size of the CAD drawing based on the ratio, so that the size of the orthophoto is the same as the size of the CAD drawing;

[0071] The orthophoto and the CAD drawing, both of the same size, are overlaid on the webpage.

[0072] In one embodiment, the processor 1001 may invoke a computer program stored in the memory 1005 and further perform the following operations:

[0073] The step of determining the ratio of the orthophoto image to the CAD drawing based on the first feature point, the second feature point, the third feature point, and the fourth feature point includes:

[0074] In the image coordinate system, the distance between the first feature point and the second feature point in the orthophoto image is determined as the first distance, and in the CAD coordinate system, the distance between the third feature point and the fourth feature point in the CAD drawing is determined as the second distance;

[0075] The scale of the orthophoto image and the CAD drawing is determined based on the first distance and the second distance.

[0076] In one embodiment, the processor 1001 may invoke a computer program stored in the memory 1005 and further perform the following operations:

[0077] The step of determining the first distance between the first feature point and the second feature point in the orthophoto image in the image coordinate system includes:

[0078] Obtain the screen mouse coordinates of the first feature point and the second feature point in the orthophoto image, and convert the screen mouse coordinates to canvas coordinates;

[0079] The image coordinates of the canvas coordinates in the image coordinate system are determined based on the canvas coordinate range and the image coordinate range, and the first distance between the first feature point and the second feature point in the orthophoto image is determined based on the image coordinates.

[0080] In one embodiment, the processor 1001 may invoke a computer program stored in the memory 1005 and further perform the following operations:

[0081] Before the step of obtaining the screen mouse coordinates of the first feature point and the second feature point in the orthophoto image and converting the screen mouse coordinates to canvas coordinates, the following steps are included:

[0082] Obtain the TFW coordinate parameters of the orthophoto image, and establish an image coordinate system based on the TFW coordinate parameters.

[0083] In one embodiment, the processor 1001 may invoke a computer program stored in the memory 1005 and further perform the following operations:

[0084] The TFW coordinate parameters include the coordinates of the top left corner of the orthophoto image, rotation parameters in the horizontal and vertical directions, and scaling parameters. The image coordinate system is an image coordinate range. The step of establishing the image coordinate system based on the TFW coordinate parameters includes:

[0085] Based on the coordinates of the upper left corner of the orthophoto and the rotation and scaling parameters in the horizontal and vertical directions, the coordinates of the lower right corner of the orthophoto are determined.

[0086] The image coordinate range is determined based on the coordinates of the upper left and lower right corners of the orthophoto.

[0087] In one embodiment, the processor 1001 may invoke a computer program stored in the memory 1005 and further perform the following operations:

[0088] The step of determining the second distance between the first feature point and the second feature point in the CAD drawing in the CAD coordinate system includes:

[0089] The CAD coordinates of the first feature point and the second feature point in the CAD drawing are determined based on a preset interface, and the second distance between the first feature point and the second feature point in the CAD drawing is determined based on the CAD coordinates.

[0090] In one embodiment, the processor 1001 may invoke a computer program stored in the memory 1005 and further perform the following operations:

[0091] Before the step of determining the CAD coordinates of the first feature point and the second feature point in the CAD drawing based on a preset interface, the following steps are included:

[0092] The CAD coordinate range is determined based on the coordinates of the top left and bottom right corners of the CAD drawing, and the CAD coordinate system is determined based on the CAD coordinate range.

[0093] In one embodiment, the processor 1001 may invoke a computer program stored in the memory 1005 and further perform the following operations:

[0094] The steps of acquiring the orthophoto image and CAD drawing of the target object include:

[0095] The original image is acquired, and the original image is rasterized and loaded to obtain an orthophoto map;

[0096] Obtain the original drawing and perform raster conversion on the original drawing to obtain a CAD drawing in raster data format.

[0097] In one embodiment, the processor 1001 may invoke a computer program stored in the memory 1005 and further perform the following operations:

[0098] The step of placing the orthophoto and CAD drawing on a webpage includes:

[0099] The image coordinate system and the CAD coordinate system are unified on the web page so that the canvas coordinates of the web page correspond to the image coordinate system and the CAD coordinate system respectively, so as to place the orthophoto and CAD drawing on the web page.

[0100] In one embodiment, the processor 1001 may invoke a computer program stored in the memory 1005 and further perform the following operations:

[0101] The step of overlaying and displaying the orthophoto image and the CAD drawing of the same size on the webpage includes:

[0102] The first feature point in the orthophoto image is aligned with the third feature point in the CAD drawing, and the second feature point in the orthophoto image is aligned with the fourth feature point in the CAD drawing, so that the orthophoto image and the CAD drawing, which have the same size, are superimposed and displayed on the webpage.

[0103] This application provides a method for overlaying and displaying orthophotos and CAD drawings. In one embodiment of the method, the method includes:

[0104] Step S10: Obtain the orthophoto image and CAD drawing of the target object, and place the orthophoto image and CAD drawing on the web page;

[0105] An orthophoto is a remote sensing image that has orthophoto projection properties. In one embodiment, an orthophoto is like... Figure 2 As shown, the CAD drawing is as follows Figure 3 As shown. In one embodiment, two feature points are pre-set in the CAD drawing, and the user manually selects two feature points in the orthophoto that correspond to the two feature points pre-set in the CAD drawing.

[0106] For example, the step of acquiring the orthophoto image and CAD drawing of the target object includes:

[0107] The original image is acquired, and the original image is rasterized and loaded to obtain an orthophoto map;

[0108] Obtain the original drawing and perform raster conversion on the original drawing to obtain a CAD drawing in raster data format.

[0109] Original image Figure 1 The images are typically huge, reaching several gigabytes or even more. Directly loading the original images can cause the page to crash. Therefore, in one embodiment, Geoserver (system software for rapidly sharing spatial geographic information) is used to configure WMS (Web Map Service), and openlayer (a JavaScript library package specifically designed for Web GIS client development) is used to load the WMS service. This enables the raster tiling and loading processing of the original images captured by the drone, thereby eliminating the impact of large-volume original images on page performance.

[0110] The CAD drawing information (original drawing) is converted into raster data drawing (CAD drawing in raster data format) using the vjmap framework, and then combined with canvas (the canvas element is used to draw graphics on a webpage) technology to realize CAD display, without any coordinate system requirements.

[0111] Therefore, by relying on web-based web pages, the limitations of software installation are eliminated, the user threshold is lowered, the ease of use is improved, and it is conducive to promotion.

[0112] For example, the step of placing the orthophoto and CAD drawing on a webpage includes:

[0113] The image coordinate system and the CAD coordinate system are unified on the web page so that the canvas coordinates of the web page correspond to the image coordinate system and the CAD coordinate system respectively, so as to place the orthophoto and CAD drawing on the web page.

[0114] Traditional positioning logic operations typically involve repeatedly using the scroll wheel to zoom and drag the drawing position with the mouse to achieve overlay, which involves a large amount of manual work, resulting in low efficiency and high error.

[0115] Using the orthophoto as a reference, drag the positioning points of the CAD drawing and the orthophoto to the same position. Because single-point positioning will introduce rotation and scaling errors, for example, overlapping positioning points A and A1 will result in errors such as... Figure 6 The situation is shown below.

[0116] Therefore, in this embodiment, after determining the coordinate systems of the orthophoto and the CAD drawing on the webpage, the underlying foundation for overlaying is to unify the coordinate systems of the two layers, ensuring that the coordinates of the computer screen canvas correspond to the TFW relative coordinate system of the orthophoto, and then to the coordinate system of the CAD drawing. Next, a two-point positioning approach is used to determine the scaling ratio of the drawing. Based on aligning two feature positioning points, orthophotos and CAD drawings of the same size are displayed on the webpage. In one embodiment, a two-point overlay method corresponding to AA1 and BB1 is used. When B and B1 are overlaid, the rotation angle of the CAD drawing can only coincide with the line AB, eliminating rotation and scaling errors, resulting in a correct overlay effect. Figure 7 As shown.

[0117] Therefore, by using two-point positioning to determine the alignment of two planes, the traditional drag-and-drop and scaling of CAD drawings is broken, reducing operational errors and improving the efficiency of overlay processing.

[0118] Step S20: Select the first feature and the second feature of the target object;

[0119] In this embodiment, the selection criteria for the target object and its features are not limited. The target object can be a building or a photovoltaic module, and the features on the target object can be objects or components that are easy to identify and have specific shapes or features.

[0120] Step S30: On the webpage, determine the position of the first feature in the image coordinate system of the orthophoto as the first feature point, and on the webpage, determine the position of the second feature in the image coordinate system of the orthophoto as the second feature point;

[0121] After selecting the first feature and the second feature of the target object, the position of the first feature in the image coordinate system of the orthophoto map can be determined on the webpage as the first feature point, and the position of the second feature in the image coordinate system of the orthophoto map as the second feature point.

[0122] Step S40: On the webpage, determine the position of the first feature in the CAD coordinate system of the CAD drawing as the third feature point, and on the webpage, determine the position of the second feature in the CAD coordinate system of the CAD drawing as the fourth feature point;

[0123] Similarly, after selecting the first and second features of the target object, the position of the first feature in the CAD coordinate system of the CAD drawing can be determined on the webpage as the third feature point, and the position of the second feature in the CAD coordinate system of the CAD drawing can be determined as the fourth feature point.

[0124] Step S50: Determine the ratio of the orthophoto image to the CAD drawing based on the first feature point, the second feature point, the third feature point, and the fourth feature point;

[0125] Then, the ratio between the orthophoto and the CAD drawing is determined based on each feature point. This ratio is the scaling ratio of the orthophoto or the CAD drawing, and is used to scale the orthophoto or the CAD drawing.

[0126] For example, the step of determining the ratio of the orthophoto image to the CAD drawing based on the first feature point, the second feature point, the third feature point, and the fourth feature point includes:

[0127] In the image coordinate system, the distance between the first feature point and the second feature point in the orthophoto image is determined as the first distance, and in the CAD coordinate system, the distance between the third feature point and the fourth feature point in the CAD drawing is determined as the second distance;

[0128] The scale of the orthophoto image and the CAD drawing is determined based on the first distance and the second distance.

[0129] Reference Figure 4 The method involves determining a first distance between two feature positioning points in an orthophoto image within the image coordinate system, and a second distance between two identical feature positioning points in a CAD drawing within the CAD coordinate system. The feature positioning points in the orthophoto image and the CAD drawing share the same positional characteristics, such as the upper left and lower left points in the orthophoto image, and the upper left and lower left points in the CAD drawing. Feature positioning points can be manually set, determined through image recognition, or randomly selected from one image and then used to find corresponding positioning points in another image. In this embodiment, the method for determining feature positioning points is not limited. Furthermore, the number of feature positioning points is at least two to meet the requirements for subsequent positioning.

[0130] In one embodiment, reference is made to Figure 5In the image coordinate system, two feature points in the orthophoto are identified as points A and B, with a first distance of AB. In the CAD coordinate system, two feature points in the CAD drawing are identified as points A1 and B1, with a second distance of A1B1. The overlay display ratio of the orthophoto and the CAD drawing is determined as scale = AB / A1B1 or scale = A1B1 / AB, depending on whether the CAD drawing is overlaid on the orthophoto or vice versa.

[0131] Step S60: Adjust the size of the orthophoto and / or the size of the CAD drawing based on the ratio, so that the size of the orthophoto is the same as the size of the CAD drawing;

[0132] Once the scaling factor for scaling the orthophoto or CAD drawing is obtained, the size of the orthophoto and / or the CAD drawing can be adjusted according to the scaling factor so that the size of the orthophoto is the same as the size of the CAD drawing.

[0133] Step S70: Display the orthophoto and the CAD drawing, both of the same size, overlaid on the webpage.

[0134] Finally, by overlaying orthophotos and CAD drawings of the same size on a webpage, a simple and efficient overlay display between orthophotos and CAD drawings is achieved.

[0135] For example, the step of overlaying and displaying the orthophoto and the CAD drawing of the same size on the webpage includes:

[0136] The first feature point in the orthophoto image is aligned with the third feature point in the CAD drawing, and the second feature point in the orthophoto image is aligned with the fourth feature point in the CAD drawing, so that the orthophoto image and the CAD drawing, which have the same size, are superimposed and displayed on the webpage.

[0137] After determining the overlay display ratio, the size of the orthophoto or CAD drawing is adjusted based on the ratio, either by enlarging or reducing the orthophoto or CAD drawing, thereby overlaying and displaying orthophotos and CAD drawings of the same size on the webpage. Specifically, this is achieved by matching feature points one-to-one. In one embodiment, the first feature point in the orthophoto coincides with the third feature point in the CAD drawing, and the second feature point in the orthophoto coincides with the fourth feature point in the CAD drawing, thus overlaying and displaying orthophotos and CAD drawings of the same size on the webpage.

[0138] In this embodiment, to address the time-consuming and labor-intensive operations such as software installation, cumbersome parameter configuration, manual operation errors, and KML file conversion when overlaying orthophotos and CAD drawings, as well as the high requirements for users' professional knowledge, a web-based method for overlaying and displaying orthophotos and CAD drawings without the need for complex parameter conversions such as coordinate systems is proposed.

[0139] First, the first and second feature points in the orthophoto in the image coordinate system, and the third and fourth feature points in the CAD drawing in the CAD coordinate system are determined on the webpage. Then, the overlay ratio of the orthophoto and the CAD drawing is determined based on these feature points. Finally, the size of the orthophoto or the CAD drawing is adjusted based on the overlay ratio, and the orthophoto and the CAD drawing, both of the same size, are overlaid and displayed on the webpage. This method, combining image raster loading and two-point coordinate positioning, enables a fast, accurate, and easy-to-use overlay display of orthophotos and CAD drawings.

[0140] This application provides a method for overlaying and displaying orthophotos and CAD drawings. In another embodiment of the method, the step of determining the first distance between the first feature point and the second feature point in the orthophoto image in the image coordinate system includes:

[0141] Obtain the screen mouse coordinates of the first feature point and the second feature point in the orthophoto image, and convert the screen mouse coordinates to canvas coordinates;

[0142] The image coordinates of the canvas coordinates in the image coordinate system are determined based on the canvas coordinate range and the image coordinate range, and the first distance between the first feature point and the second feature point in the orthophoto image is determined based on the image coordinates.

[0143] In this embodiment, the relative distance between points A and B in the orthophoto is calculated to obtain the overlay display ratio for adjusting the CAD drawing.

[0144] Obtain the screen mouse coordinates of two feature points in the orthophoto. At this point, the screen mouse coordinates are located on the image. In other embodiments, the screen mouse coordinates can be read from the CAD drawing first, and then the feature points on the orthophoto can be derived. These coordinates are then converted to canvas coordinates (C_x, C_y) using the `canvas.getBoundingClientRect()` interface function. The canvas coordinates are then converted to image coordinates (T_x, T_y) using the image coordinate system. For example, consider the coordinates of point A:

[0145] AT_x = AC_x * (canvas area / image coordinate range)

[0146] AT_y = AC_y * (canvas area / image coordinate range)

[0147] In other words, when displaying orthophotos and CAD drawings on a browser using a canvas, only the screen mouse coordinates at the time of selection are available when feature points are selected. The canvas API functions are needed to convert these screen mouse coordinates to corresponding canvas coordinates. Since there is a scaling relationship between the orthophoto and the canvas, but no scaling relationship between the CAD drawing and the canvas, the image coordinates (T_x, T_y) of the canvas coordinates in the image coordinate system are determined based on the canvas coordinate range and the image coordinate range. Finally, the relative distance between points A and B is calculated, which yields the first distance between the two feature points in the orthophoto, as shown in the following formula: Where (BT_x, BT_y) are the image coordinates of point B in the image coordinate system after transformation.

[0148] For example, before the step of obtaining the screen mouse coordinates of the first feature point and the second feature point in the orthophoto image and converting the screen mouse coordinates to canvas coordinates, the method includes:

[0149] Obtain the TFW coordinate parameters of the orthophoto image, and establish an image coordinate system based on the TFW coordinate parameters.

[0150] Before obtaining the screen mouse coordinates of two feature points in the orthophoto and converting them to canvas coordinates, it is necessary to establish an image coordinate system based on the tfw coordinate parameters of the orthophoto.

[0151] For example, the TFW coordinate parameters include the coordinates of the top left corner of the orthophoto image, rotation parameters in the horizontal and vertical directions, and scaling parameters. The image coordinate system is an image coordinate range. The step of establishing the image coordinate system based on the TFW coordinate parameters includes:

[0152] Based on the coordinates of the upper left corner of the orthophoto and the rotation and scaling parameters in the horizontal and vertical directions, the coordinates of the lower right corner of the orthophoto are determined.

[0153] The image coordinate range is determined based on the coordinates of the upper left and lower right corners of the orthophoto.

[0154] Obtain the six coordinate parameters of the orthophoto's TFW (TIFF World File, a text file containing TIFF image coordinate information), including the top-left corner coordinates (X, Y), rotation parameters (rotation coefficients), and scaling parameters (pixel resolution). Based on the rotation parameters and the original pixel coordinates of the image, calculate the bottom-right corner coordinates (X1, Y1) using the orthophoto's TFW six coordinate parameters to establish the image layer's relative coordinate system. In other words, by calculating the bottom-right corner coordinates, the image's coordinate range is established. The formulas for calculating the bottom-right corner coordinates (X1, Y1) are as follows:

[0155] x' = Ax + By + C;

[0156] y' = Dx + Ey + F;

[0157] in:

[0158] x' = the geographic X coordinate (distance or longitude) corresponding to the pixel;

[0159] y' = the geographic Y coordinate (distance or latitude) corresponding to the pixel;

[0160] x = pixel coordinate [column number];

[0161] y = pixel coordinate [row number];

[0162] A = pixel resolution in the X direction;

[0163] D = rotation coefficient in the X direction;

[0164] B = rotation coefficient in the Y direction;

[0165] E = pixel resolution in the Y direction;

[0166] C = X coordinate (distance or longitude) of the center pixel at the top left corner of the raster map;

[0167] F = Y-coordinate (distance or latitude) of the center pixel of the top left corner of the raster map.

[0168] This application provides a method for overlaying orthophotos and CAD drawings. The step of determining the second distance between the first feature point and the second feature point in the CAD drawing in the CAD coordinate system includes:

[0169] The CAD coordinates of the first feature point and the second feature point in the CAD drawing are determined based on a preset interface, and the second distance between the first feature point and the second feature point in the CAD drawing is determined based on the CAD coordinates.

[0170] The system obtains points A1 and B1 on the CAD drawing through the preset interface vjmapAP I. The CAD coordinates are defined as A1 (A1_x, A1_y) and B1 (B1_x, B1_y), and the relative distance between A1 and B1 is calculated, which is the second distance between the two feature positioning points in the CAD drawing.

[0171] For example, before the step of determining the CAD coordinates of the first feature point and the second feature point in the CAD drawing in the CAD coordinate system based on a preset interface, the method includes:

[0172] The CAD coordinate range is determined based on the coordinates of the top left and bottom right corners of the CAD drawing, and the CAD coordinate system is determined based on the CAD coordinate range.

[0173] In this application, establishing a coordinate system (for orthophotos and CAD drawings) involves determining the coordinate range based on the coordinates of the upper left and lower right corners, and then determining the coordinate system based on the coordinate range.

[0174] Reference Figure 8 In one application scenario of the method for overlaying and displaying orthophotos and CAD drawings, this application eliminates the software dependency on AutoCAD and proposes a method of overlaying corresponding to two positioning points, thus optimizing the manual operation processing method.

[0175] Step 1: Orthophoto slicing and loading, loading CAD drawings;

[0176] Step 2: Establish the image coordinate system and the CAD coordinate system;

[0177] Step 3: Locate the corresponding points in the image and the CAD drawing;

[0178] Step 4: Generate the overlay image.

[0179] To enable rapid and convenient overlay verification of CAD drawings and orthophotos in distributed photovoltaic design, this application proposes a web-based method that integrates orthophoto rasterization loading and CAD two-point coordinate positioning, eliminating the need for complex parameter conversions such as coordinate system changes, reducing manual operations, and providing a simple and fast method for overlaying CAD drawings and images. Compared with existing image overlay methods, this significantly reduces the requirements for user expertise and equipment, minimizes manual operation errors, and improves overlay efficiency.

[0180] Furthermore, this application embodiment also provides a device for overlaying and displaying orthophotos and CAD drawings, the device comprising:

[0181] The acquisition module is used to acquire orthophotos and CAD drawings of the target object and place the orthophotos and CAD drawings on a web page;

[0182] The selection module is used to select the first and second features of the target object;

[0183] The image feature point determination module is used to determine the position of the first feature object in the image coordinate system of the orthophoto map as the first feature point on the webpage, and to determine the position of the second feature object in the image coordinate system of the orthophoto map as the second feature point on the webpage.

[0184] The CAD feature point determination module is used to determine the position of the first feature object in the CAD coordinate system of the CAD drawing as the third feature point on the webpage, and to determine the position of the second feature object in the CAD coordinate system of the CAD drawing as the fourth feature point on the webpage.

[0185] The scale determination module is used to determine the scale between the orthophoto image and the CAD drawing based on the first feature point, the second feature point, the third feature point, and the fourth feature point;

[0186] An adjustment module is used to adjust the size of the orthophoto image and / or the size of the CAD drawing based on the ratio, so that the size of the orthophoto image is the same as the size of the CAD drawing.

[0187] An overlay display module is used to overlay and display the orthophoto image and the CAD drawing, both of the same size, on the webpage.

[0188] For example, the ratio determination module is further configured to:

[0189] In the image coordinate system, the distance between the first feature point and the second feature point in the orthophoto image is determined as the first distance, and in the CAD coordinate system, the distance between the third feature point and the fourth feature point in the CAD drawing is determined as the second distance;

[0190] The scale of the orthophoto image and the CAD drawing is determined based on the first distance and the second distance.

[0191] For example, the ratio determination module is further configured to:

[0192] Obtain the screen mouse coordinates of the first feature point and the second feature point in the orthophoto image, and convert the screen mouse coordinates to canvas coordinates;

[0193] The image coordinates of the canvas coordinates in the image coordinate system are determined based on the canvas coordinate range and the image coordinate range, and the first distance between the first feature point and the second feature point in the orthophoto image is determined based on the image coordinates.

[0194] For example, the ratio determination module is further configured to:

[0195] Before the step of obtaining the screen mouse coordinates of the first feature point and the second feature point in the orthophoto image and converting the screen mouse coordinates to canvas coordinates:

[0196] Obtain the TFW coordinate parameters of the orthophoto image, and establish an image coordinate system based on the TFW coordinate parameters.

[0197] For example, the TFW coordinate parameters include the coordinates of the top left corner of the orthophoto image, rotation parameters in the horizontal and vertical directions, and scaling parameters. The scale determination module is also used for:

[0198] Based on the coordinates of the upper left corner of the orthophoto and the rotation and scaling parameters in the horizontal and vertical directions, the coordinates of the lower right corner of the orthophoto are determined.

[0199] The image coordinate range is determined based on the coordinates of the upper left and lower right corners of the orthophoto.

[0200] For example, the ratio determination module is further configured to:

[0201] The CAD coordinates of the first feature point and the second feature point in the CAD drawing are determined based on a preset interface, and the second distance between the first feature point and the second feature point in the CAD drawing is determined based on the CAD coordinates.

[0202] For example, the ratio determination module is further configured to:

[0203] Before the step of determining the CAD coordinates of the first feature point and the second feature point in the CAD drawing based on the preset interface:

[0204] The CAD coordinate range is determined based on the coordinates of the top left and bottom right corners of the CAD drawing, and the CAD coordinate system is determined based on the CAD coordinate range.

[0205] For example, the acquisition module is further configured to:

[0206] The original image is acquired, and the original image is rasterized and loaded to obtain an orthophoto map;

[0207] Obtain the original drawing and perform raster conversion on the original drawing to obtain a CAD drawing in raster data format.

[0208] For example, the acquisition module is further configured to:

[0209] The image coordinate system and the CAD coordinate system are unified on the web page so that the canvas coordinates of the web page correspond to the image coordinate system and the CAD coordinate system respectively, so as to place the orthophoto and CAD drawing on the web page.

[0210] For example, the overlay display module is further used for:

[0211] The first feature point in the orthophoto image is aligned with the third feature point in the CAD drawing, and the second feature point in the orthophoto image is aligned with the fourth feature point in the CAD drawing, so that the orthophoto image and the CAD drawing, which have the same size, are superimposed and displayed on the webpage.

[0212] The orthophoto and CAD drawing overlay display device provided in this application adopts the orthophoto and CAD drawing overlay display method in the above embodiments, solving the technical problem of the difficulty in simply overlaying and displaying orthophotos and CAD drawings. Compared with conventional technology, the beneficial effects of the orthophoto and CAD drawing overlay display device provided in this application are the same as the beneficial effects of the orthophoto and CAD drawing overlay display method provided in the above embodiments, and other technical features in the orthophoto and CAD drawing overlay display device are the same as the features disclosed in the above embodiment method, and will not be repeated here.

[0213] Furthermore, this application embodiment also provides an orthophoto and CAD drawing overlay display device, the orthophoto and CAD drawing overlay display device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being executed by the processor to implement the steps of the orthophoto and CAD drawing overlay display method as described above.

[0214] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for overlaying and displaying orthophotos and CAD drawings.

[0215] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0216] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to conventional technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0217] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for overlaying and displaying orthophotos and CAD drawings, characterized in that, The method includes: Obtain the orthophoto image and CAD drawing of the target object, and place the orthophoto image and CAD drawing on the web page; Select the first and second features of the target object; On the webpage, the position of the first feature in the image coordinate system of the orthophoto map is determined as the first feature point, and the position of the second feature in the image coordinate system of the orthophoto map is determined as the second feature point. On the webpage, the position of the first feature in the CAD coordinate system of the CAD drawing is determined as the third feature point, and the position of the second feature in the CAD coordinate system of the CAD drawing is determined as the fourth feature point. The ratio of the orthophoto image to the CAD drawing is determined based on the first feature point, the second feature point, the third feature point, and the fourth feature point; Adjust the size of the orthophoto and / or the size of the CAD drawing based on the ratio, so that the size of the orthophoto is the same as the size of the CAD drawing; The orthophoto and the CAD drawing, both of the same size, are overlaid on the webpage. The step of determining the ratio of the orthophoto image to the CAD drawing based on the first feature point, the second feature point, the third feature point, and the fourth feature point includes: In the image coordinate system, the distance between the first feature point and the second feature point in the orthophoto image is determined as the first distance, and in the CAD coordinate system, the distance between the third feature point and the fourth feature point in the CAD drawing is determined as the second distance; The scale of the orthophoto image and the CAD drawing is determined based on the first distance and the second distance; The step of determining the first distance between the first feature point and the second feature point in the orthophoto image in the image coordinate system includes: Obtain the screen mouse coordinates of the first feature point and the second feature point in the orthophoto image, and convert the screen mouse coordinates to canvas coordinates; Based on the canvas coordinate range and the image coordinate range, the image coordinates of the canvas coordinates in the image coordinate system are determined, and the first distance between the first feature point and the second feature point in the orthophoto image is determined based on the image coordinates. Before the step of obtaining the screen mouse coordinates of the first feature point and the second feature point in the orthophoto image and converting the screen mouse coordinates to canvas coordinates, the following steps are included: Obtain the TFW coordinate parameters of the orthophoto image, and establish an image coordinate system based on the TFW coordinate parameters.

2. The method for overlaying and displaying orthophotos and CAD drawings as described in claim 1, characterized in that, The TFW coordinate parameters include the coordinates of the top left corner of the orthophoto image, rotation parameters in the horizontal and vertical directions, and scaling parameters. The image coordinate system is an image coordinate range. The step of establishing the image coordinate system based on the TFW coordinate parameters includes: Based on the coordinates of the upper left corner of the orthophoto and the rotation and scaling parameters in the horizontal and vertical directions, the coordinates of the lower right corner of the orthophoto are determined. The image coordinate range is determined based on the coordinates of the upper left and lower right corners of the orthophoto.

3. The method for overlaying and displaying orthophotos and CAD drawings as described in claim 1, characterized in that, The step of determining the second distance between the first feature point and the second feature point in the CAD drawing in the CAD coordinate system includes: The CAD coordinates of the first feature point and the second feature point in the CAD drawing are determined based on a preset interface, and the second distance between the first feature point and the second feature point in the CAD drawing is determined based on the CAD coordinates.

4. The method for overlaying and displaying orthophotos and CAD drawings as described in claim 3, characterized in that, Before the step of determining the CAD coordinates of the first feature point and the second feature point in the CAD drawing based on a preset interface, the following steps are included: The CAD coordinate range is determined based on the coordinates of the top left and bottom right corners of the CAD drawing, and the CAD coordinate system is determined based on the CAD coordinate range.

5. The method for overlaying and displaying orthophotos and CAD drawings as described in claim 1, characterized in that, The steps of acquiring the orthophoto image and CAD drawing of the target object include: The original image is acquired, and the original image is rasterized and loaded to obtain an orthophoto map; Obtain the original drawing and perform raster conversion on the original drawing to obtain a CAD drawing in raster data format.

6. The method for overlaying and displaying orthophotos and CAD drawings as described in claim 1, characterized in that, The step of placing the orthophoto and CAD drawing on a webpage includes: The image coordinate system and the CAD coordinate system are unified on the web page so that the canvas coordinates of the web page correspond to the image coordinate system and the CAD coordinate system respectively, so as to place the orthophoto and CAD drawing on the web page.

7. The method for overlaying and displaying orthophotos and CAD drawings as described in claim 1, characterized in that, The step of overlaying and displaying the orthophoto image and the CAD drawing of the same size on the webpage includes: The first feature point in the orthophoto image is aligned with the third feature point in the CAD drawing, and the second feature point in the orthophoto image is aligned with the fourth feature point in the CAD drawing, so that the orthophoto image and the CAD drawing, which have the same size, are superimposed and displayed on the webpage.

8. A device for overlaying and displaying orthophotos and CAD drawings, characterized in that, The device for overlaying orthophotos and CAD drawings includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the method for overlaying orthophotos and CAD drawings as described in any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method for overlaying orthophotos and CAD drawings as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • CAD construction drawing comparison method and system based on domestic operating system

    CN113420349A

  • Construction area management and control method and device, electronic equipment and readable storage medium

    CN115309303A