Method, device, equipment and storage medium for obtaining layout angle of buildings
By obtaining the building location information and the angle of the plot, the building arrangement angle is dynamically adjusted, which solves the problem of consistent building arrangement angles in the existing technology, improves the adaptability of the building arrangement and the aesthetics of the plot, and increases The number of buildings.
Patent Information
- Application Number
- CN202210078985.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-24
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-01-24
AI Technical Summary
In the existing technology, the automatic acquisition method of building arrangement angle results in the arrangement angle of each building in the entire plot being the same, which cannot meet the actual design needs of the irregular shape of the plot, and the design cycle is long and complicated.
By obtaining the location information of the building and the angle of the plot, combined with the arrangement angle calculation strategy, the arrangement angle of each building is dynamically adjusted to adapt to the shape of the plot, and different arrangement angle strategies are used to improve the arrangement effect. .
The layout of the buildings can be better adapted to the shape of the plot, making the shape of the plot more beautiful, increasing the number of buildings that can be arranged on the plot, and simplifying the design process.
Smart Images

Figure CN114547733B
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent building technology, and in particular to a method, device, equipment and storage medium for acquiring the layout angle of buildings. Background Art
[0002] When developers design the layout of buildings for a plot of land, they usually need to adjust the layout angle of the buildings several times in order to make the layout of the buildings meet the specifications and maximize the benefits. The design cycle of the building layout angle is long and the process is complicated.
[0003] Currently, there are also solutions to automatically obtain the angle of building layout, extracting an angle from the plot as the layout angle of each building in the entire plot, that is, the layout angle of each building in the entire plot is the same angle. However, the shape of the plot is often irregular, and the layout angle of each building in the entire plot is the same, which does not meet the actual design requirements. Summary of the invention
[0004] The present application provides a method, device, equipment and storage medium for obtaining the layout angle of buildings, so as to solve the problem that it is impossible to automatically obtain the layout angle of buildings that meets the actual design requirements.
[0005] In a first aspect, an embodiment of the present application provides a method for obtaining an arrangement angle of a building, comprising:
[0006] Get the plot angle of the plot where the building is located;
[0007] Obtaining location information of the building;
[0008] According to the location information, obtaining a calculation strategy for the layout angle of the building;
[0009] According to the plot angle and the arrangement angle calculation strategy, the target arrangement angle of the building is obtained.
[0010] Optionally, acquiring the arrangement angle calculation strategy of the building according to the location information includes:
[0011] According to the location information, obtaining the building weight of the building;
[0012] Comparing the building weight with a preset building weight value;
[0013] If the building weight is greater than the preset building weight value, the arrangement angle calculation strategy is: obtain the angle of the target contour edge that is closest to the building, select the target plot angle with the smallest difference from the angle of the target contour edge from the plot angles, and use the target plot angle as the target arrangement angle;
[0014] If the building weight is less than or equal to the preset building weight value, the arrangement angle calculation strategy is: obtain the main angle of the plot with the largest angle weight among the plot angles, and use the main angle of the plot as the target arrangement angle.
[0015] Optionally, the location information includes the distance between the building and each contour edge of the plot, and the orientation of the building on the plot.
[0016] Optionally, obtaining the plot angle of the plot where the building is located includes:
[0017] Obtaining the weight of each contour edge in the plot;
[0018] According to the weights of the respective contour edges, obtaining the angle weights of the respective target angles corresponding to the respective contour edges;
[0019] Sort the target angles according to the angle weights from large to small to obtain a sorting result;
[0020] The first N target angles in the sorting result are used as the plot angles, where N is greater than or equal to 1.
[0021] Optionally, acquiring angle weights of target angles corresponding to the contour edges according to the weights of the contour edges includes:
[0022] Calculating the difference between the angles of the contour edges;
[0023] Sum the weights of the contour edges corresponding to the angles whose difference values are less than a threshold value to obtain the angle weight;
[0024] According to the angle where the difference is less than a threshold, obtaining the target angle;
[0025] A mapping relationship between the target angle and the angle weight is established.
[0026] Optionally, the weight of the contour edge is positively correlated with the length of the contour edge, and the weight of the contour edge is negatively correlated with the angle of the contour edge.
[0027] Optionally, the weight of the contour edge is positively correlated with the number of buildings that can be arranged in a preset area of the contour edge.
[0028] Optionally, before obtaining the weight of each contour edge in the plot, the method further includes:
[0029] Obtain the length of each contour edge in the plot;
[0030] Obtaining the angle of each contour edge in the plot;
[0031] The contour edge whose length is greater than the preset length value and whose angle is less than the area restriction angle corresponding to the plot is taken as a valid contour edge;
[0032] The obtaining of the weight of each contour edge in the plot includes:
[0033] Gets the weight of the valid silhouette edge.
[0034] In a second aspect, an embodiment of the present application provides a device for acquiring an arrangement angle of a building, comprising:
[0035] The first acquisition module is used to obtain the plot angle of the plot where the building is located;
[0036] A second acquisition module is used to acquire the location information of the building;
[0037] A first processing module, configured to obtain a calculation strategy for the arrangement angle of the building according to the location information;
[0038] The second processing module is used to obtain the target arrangement angle of the building according to the plot angle and the arrangement angle calculation strategy.
[0039] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory, and a communication bus, wherein the processor and the memory communicate with each other via the communication bus;
[0040] The memory is used to store computer programs;
[0041] The processor is used to execute the program stored in the memory to implement the method for obtaining the arrangement angle of the building described in the first aspect.
[0042] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for obtaining the arrangement angle of buildings described in the first aspect.
[0043] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art: the method provided by the embodiment of the present application obtains the plot angle of the plot where the building is located, obtains the location information of the building, obtains the layout angle calculation strategy of the building according to the location information, and obtains the target layout angle of the building according to the plot angle and the layout angle calculation strategy. Compared with the prior art, when automatically obtaining the layout angle of the building, the layout angle of each building in the entire plot adopts the same angle, which does not meet the actual design requirements. By combining the layout angle calculation strategy of the building with the location information of the building, the buildings at different positions on the plot can adopt different layout angle calculation strategies, and then adopt different layout angles. It can make the layout of the buildings more adapted to the shape of the plot, make the shape of the plot after layout more beautiful, and can make more buildings arranged on the plot. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0046] Figure 1 A schematic diagram of a method flow for obtaining the arrangement angle of buildings in an embodiment of the present application;
[0047] Figure 2 This is a flow chart of a method for obtaining the plot angle of a plot where a building is located in a specific embodiment of the present application;
[0048] Figure 3 A schematic diagram of the angle of the contour edge in a specific embodiment of the present application;
[0049] Figure 4 This is a flow chart of a method for obtaining the angle weights of each target angle in a specific embodiment of the present application;
[0050] Figure 5 A schematic diagram of a method flow for obtaining a calculation strategy for the arrangement angle of a building according to location information in a specific embodiment of the present application;
[0051] Figure 6 This is a schematic diagram of the arrangement angle of buildings in a specific embodiment of the present application;
[0052] Figure 7This is a schematic diagram of the arrangement of various buildings in a plot of land in a specific embodiment of the present application;
[0053] Figure 8 This is a schematic diagram of the arrangement of various buildings in another form of a plot in a specific embodiment of the present application;
[0054] Fig. 9 This is a structural schematic diagram of a device for acquiring the arrangement angle of buildings in an embodiment of the present application;
[0055] Fig.10 Schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0057] In an embodiment of the present application, a method for acquiring the arrangement angle of a building is provided, which can be applied to a server, and of course, can also be applied to other electronic devices, such as terminals (mobile phones, tablet computers, etc.). In an embodiment of the present application, the method is applied to a server as an example for description.
[0058] In the present application embodiment, Figure 1 As shown, the method process for obtaining the arrangement angle of the building mainly includes:
[0059] Step 101, obtaining the plot angle of the plot where the building is located.
[0060] In a specific embodiment, before obtaining the plot angle of the plot where the building is located, the method for obtaining the layout angle of the building also includes: obtaining the area of the site where the building is located; comparing the area of the site with a preset area value; if the area of the site is greater than the preset area value, dividing the site into plots; if the area of the site is less than or equal to the preset area value, treating the site as a plot.
[0061] The preset area value may be an empirical value or a value obtained through multiple tests. If the area of the site is greater than the preset area value, it means that the site is relatively large and it is necessary to divide the large site into multiple small plots, and then perform steps 101 to 104 on the small plots. If the area of the site is less than or equal to the preset area value, it means that the site is relatively small and does not need to be divided. The site can be directly used as a plot to perform steps 101 to 104. This can reduce the amount of calculation required to obtain the target layout angle of each building and improve calculation efficiency.
[0062] In a specific embodiment, Figure 2 As shown, get the plot angle of the plot where the building is located, including:
[0063] Step 201, obtaining the weight of each contour edge in the plot.
[0064] In a specific embodiment, before obtaining the weights of each contour edge in the plot, the method for obtaining the layout angle of the building further includes: obtaining the length of each contour edge in the plot; obtaining the angle of each contour edge in the plot; and taking the contour edge whose length is greater than a preset length value and whose angle is less than the area restriction angle corresponding to the plot as a valid contour edge. Obtaining the weights of each contour edge in the plot includes: obtaining the weights of the valid contour edges.
[0065] The preset length value may be an empirical value or a value obtained through multiple tests. If the length is greater than the preset length value, it indicates that the length of the contour edge is relatively large, and the buildings can be arranged in the preset area near the contour edge. If the length is less than or equal to the preset length value, it indicates that the length of the contour edge is relatively small, and the buildings cannot be arranged in the preset area near the contour edge. There is no need to consider contour edges whose length is less than or equal to the preset length value. Therefore, contour edges whose length is less than or equal to the preset length value are screened out.
[0066] The regional restriction angle is stipulated in each region and is considered from the perspective of sunshine. The regional restriction angles in different regions are different. For example, the regional restriction angle in the south is larger, the regional restriction angle in the north is smaller, and the regional restriction angle in the northeast is 30 degrees. If the layout angle of the building is set according to the angle of the contour edge that is greater than or equal to the regional restriction angle, the building will receive less sunshine, which does not meet the actual design requirements of the building. Therefore, the contour edges with angles greater than or equal to the regional restriction angle corresponding to the plot will be screened out.
[0067] First, the contour edges whose length is greater than the preset length value and whose angle is less than the area restriction angle corresponding to the plot are taken as valid contour edges, and then the weights of the valid contour edges are obtained, instead of directly obtaining the weights of each actual contour edge in the plot. This can reduce the amount of calculation for obtaining the contour edge weights and improve calculation efficiency.
[0068] In a specific embodiment, before obtaining the weights of each contour edge in the plot, the method for obtaining the layout angle of the building further includes: merging contour edges whose lengths are less than a length threshold. For example, there is an arc in the plot, and the arc is composed of 1-meter line segments. Now simplifying the contour edge of the plot and using 2-meter line segments to form this arc can reduce the number of contour edges, reduce the amount of calculations for obtaining contour edge weights, and improve calculation efficiency.
[0069] In a specific embodiment, Figure 3 The figure shows a schematic diagram of the angle of the contour edge. The angle of the contour edge refers to the angle between the direction represented by the contour edge and the nearest positive direction. There are four directions represented by the contour edge, the positive direction of the contour edge, the reverse direction of the contour edge, the positive direction of the perpendicular line of the contour edge, and the negative direction of the perpendicular line of the contour edge. That is, if one end point of the contour edge is taken as the origin and the contour edge is the x-axis, the directions represented by the contour edge are 0°, 90°, 180°, and 270°. The nearest positive direction refers to the positive direction with the smallest angle with the direction represented by the contour edge among the due south, due north, due west, and due east directions. Figure 3 In the figure, the plot is a polygon ABEFG. Take the contour edge AB of the plot as an example to explain the angle of the contour edge AB. Select a point O on the contour edge AB and draw a perpendicular line CD through point O to the line segment AB. Then the contour edge AB represents four directions, which are The directions of these four vectors. In the drawing, determine the positive directions according to the north at the top, the south at the bottom, the west at the left and the east at the right. Figure 3 In the figure, the north, south, west and east directions are shown. The angle of the contour edge AB is The angle between the sun and true north is 15 degrees.
[0070] In a specific embodiment, the weight of the contour edge is positively correlated with the length of the contour edge, and the weight of the contour edge is negatively correlated with the angle of the contour edge. The greater the length of the contour edge and the smaller the angle of the contour edge, the greater the weight of the contour edge. The greater the length of the contour edge, generally, the more buildings can be arranged in the preset area of the contour edge. The smaller the angle of the contour edge, the more sunlight the building receives according to the angle of the contour edge. It tends to obtain contour edges with large lengths and small angles, so the weight of contour edges with large lengths and small angles is increased. For example, the weight of the contour edge = the length of the contour edge * a + (90°-the angle of the contour edge) * b, where a and b are both constants, which can be set to a = 1 and b = 0.2, or a and b can be set to other values. When the length of the contour edge is 10 meters and the angle of the contour edge is 20°, the weight of the contour edge = 10*1+(90-20)*0.2=24. When the length of the contour edge is 10 meters and the angle of the contour edge is 30°, the weight of the contour edge = 10*1+(90-30)*0.2=22. It can be seen that the larger the angle of the contour edge, the smaller the weight of the contour edge. When calculating the weight of the contour edge, the size of the angle is comprehensively considered, balancing the morphological unity of the angle and the sunlight of the building.
[0071] In a specific embodiment, the weight of the contour edge is positively correlated with the number of buildings that can be arranged in the preset area of the contour edge. Since the number of buildings that can be arranged in the preset area of the contour edge is not linearly related to the length of the contour edge, the number of buildings that can be arranged in the preset area of the contour edge is also used as a factor to adjust the weight of the contour edge. If the number of buildings that can be arranged in the preset area of the contour edge is relatively large, the weight of the contour edge is appropriately increased; if the number of buildings that can be arranged in the preset area of the contour edge is relatively small, the weight of the contour edge is appropriately reduced.
[0072] The preset area of the contour edge may be an area whose distance from the contour edge is less than a preset distance value.
[0073] Step 202: Obtain angle weights of target angles corresponding to the contour edges according to the weights of the contour edges.
[0074] In a specific embodiment, Figure 4 As shown, according to the weights of each contour edge, the angle weights of each target angle corresponding to each contour edge are obtained, including:
[0075] Step 401, calculating the difference between the angles of the contour edges.
[0076] Step 402, summing the weights of the contour edges corresponding to the angles whose difference values are less than a threshold value to obtain the angle weight.
[0077] The threshold value may be an empirical value or a value obtained through multiple tests. For example, the threshold value may be 3 degrees.
[0078] For example, a plot of land has five valid contour edges, namely A, B, C, D, and E. The angle of contour edge A is 14 degrees, the angle of contour edge B is 15 degrees, the angle of contour edge C is 16 degrees, the angle of contour edge D is 24 degrees, and the angle of contour edge E is 29 degrees. The threshold is 3 degrees. The angles whose differences are less than the threshold are 14 degrees, 15 degrees, and 16 degrees. The weight of contour edge A is 2, the weight of contour edge B is 3, and the weight of contour edge C is 4. The angle weight = 2+3+4=9.
[0079] Step 403, obtaining a target angle according to the angle whose difference is less than a threshold value.
[0080] There are many ways to obtain the target angle according to the angle whose difference is less than the threshold. The angle whose corresponding contour edge has the largest weight among the angles whose difference is less than the threshold can be used as the target angle. For example, the angle of contour edge A is 14 degrees, the angle of contour edge B is 15 degrees, and the angle of contour edge C is 16 degrees. The weight of contour edge A is 2, the weight of contour edge B is 3, and the weight of contour edge C is 4. The weight of contour edge C is the largest, and the angle of contour edge C, 15 degrees, is used as the target angle. The median of the angles whose difference is less than the threshold can also be used as the target angle, or the average of the angles whose difference is less than the threshold can also be used as the target angle. Of course, there are other ways, which are not listed here one by one.
[0081] Step 404: Establish a mapping relationship between the target angle and the angle weight.
[0082] By integrating the weights of the contour edges corresponding to the angles whose differences are less than the threshold into the angle weights of the target angles, the number of contour edge angles can be reduced to the number of target angles, the number of selected plot angles can be reduced, and the amount of calculations required to obtain the target layout angles of each building can be reduced, thereby improving calculation efficiency.
[0083] Step 203, sorting the target angles from large to small according to the angle weights to obtain a sorting result.
[0084] Step 204: Use the first N target angles in the sorting result as the plot angles, where N is greater than or equal to 1.
[0085] Among them, N can be set according to the number of plot directions required by the user.
[0086] The plot angle with the largest angle weight among the plot angles is used as the plot main angle, and the plot angles other than the plot main angle among the plot angles are used as the plot secondary angles. For example, if there are 5 target angles, the angle weights of the 5 target angles can be sorted, and the first 3 target angles with larger angle weights are taken as the plot angles, the plot angle with the largest angle weight among the plot angles is used as the plot main angle, and the other 2 plot angles other than the plot main angle among the plot angles are used as the plot secondary angles.
[0087] Step 102, obtaining the location information of the building.
[0088] In a specific embodiment, the location information includes the distance between each contour edge of the building and the plot, and the location of the building on the plot.
[0089] For example, the orientation of a building on a plot of land may be that the building is located near the north-south or east-west contour edge of the plot of land.
[0090] From a business perspective, buildings close to the south or north side of the plot tend to be set according to the angle of the target contour edge closest to the building, while buildings in the middle of the plot tend to be consistent with other buildings and set according to the main angle of the plot. Buildings on the south or north side tend to be set according to the angle of the target contour edge closest to the building than those on the east or west side.
[0091] In a specific embodiment, the location information of the building can be obtained by dividing the land into multiple grids, and obtaining the location information of each grid as the location information of the building included in the grid. Each grid may include multiple buildings. The arrangement angle of each grid is obtained, and the arrangement angle of the grid in which the building falls is used as the arrangement angle of the building. Instead of directly calculating the arrangement angle of each building, the arrangement angle of each grid is obtained first. Since each grid can include multiple buildings, the number of grids is less than the number of buildings, which can reduce the amount of calculation for obtaining the target arrangement angle of each building and improve the calculation efficiency.
[0092] Step 103, obtaining the building layout angle calculation strategy according to the location information.
[0093] In a specific embodiment, Figure 5 As shown, according to the location information, the layout angle calculation strategy of the building is obtained, including:
[0094] Step 501, obtaining the building weight of the building according to the location information.
[0095] Step 502, comparing the building weight with a preset building weight value.
[0096] The preset building weight value can be an empirical value or a value obtained from multiple tests.
[0097] Step 503, if the building weight is greater than the preset building weight value, the arrangement angle calculation strategy is: obtain the angle of the target contour edge closest to the building, select the target plot angle with the smallest difference between the angle and the target contour edge from the plot angles, and use the target plot angle as the target arrangement angle.
[0098] Step 504, if the building weight is less than or equal to the preset building weight value, the arrangement angle calculation strategy is: obtain the main angle of the plot with the largest angle weight among the plot angles, and use the main angle of the plot as the target arrangement angle.
[0099] Most buildings use the main angle of the plot as the target layout angle, including buildings whose building weight is less than or equal to the preset building weight value, and buildings whose building weight is greater than the preset building weight value and are closest to the contour edge where the main angle of the plot is located. It can ensure that the target layout angles of most buildings are consistent, all of which are the main angle of the plot. For buildings whose building weight is greater than the preset building weight value and whose angle of the target contour edge closest to the building is not the main angle of the plot, the target plot angle with the smallest difference between the angle and the target contour edge is selected as the target layout angle, which can better adapt to the shape of the plot, make the shape of the plot after arrangement more beautiful, and can also make more buildings arranged on the plot.
[0100] Step 104, obtaining the target arrangement angle of the building according to the plot angle and the arrangement angle calculation strategy.
[0101] In a specific embodiment, Figure 6 The figure shows the layout angle of the buildings. The outline of the building is generally a rectangle with a main direction. Figure 6 In the diagram, the angle of building arrangement is the angle between the direction represented by the building and the north direction, which is 20 degrees.
[0102] In a specific embodiment, Figure 7 As shown in FIG. 1 , it is a schematic diagram of the arrangement of each building in a land parcel of a certain type. Figure 8 Shown is a schematic diagram of the layout of each building in another type of plot.
[0103] In summary, the method provided in the embodiment of the present application obtains the plot angle of the plot where the building is located, obtains the location information of the building, obtains the layout angle calculation strategy of the building based on the location information, and obtains the target layout angle of the building based on the plot angle and the layout angle calculation strategy. Compared with the prior art, when automatically obtaining the layout angle of the building, the layout angle of each building in the entire plot adopts the same angle, which does not meet the actual design requirements. By combining the layout angle calculation strategy of the building with the location information of the building, the buildings at different locations on the plot can adopt different layout angle calculation strategies, and then adopt different layout angles. The layout of the buildings can be made more adapted to the shape of the plot, making the shape of the plot after arrangement more beautiful, and more buildings can be arranged on the plot.
[0104] Based on the same concept, a device for obtaining the arrangement angle of a building is provided in the embodiment of the present application. The specific implementation of the device can be found in the description of the method embodiment part, and the repeated parts will not be repeated. Fig. 9 As shown, the device mainly includes:
[0105] The first acquisition module 901 is used to acquire the plot angle of the plot where the building is located;
[0106] The second acquisition module 902 is used to acquire the location information of the building;
[0107] The first processing module 903 is used to obtain the arrangement angle calculation strategy of the building according to the location information;
[0108] The second processing module 904 is used to obtain the target arrangement angle of the building according to the plot angle and the arrangement angle calculation strategy.
[0109] Based on the same concept, an electronic device is also provided in the embodiment of the present application, such as Fig.10 As shown, the electronic device mainly includes: a processor 1001, a memory 1002 and a communication bus 1003, wherein the processor 1001 and the memory 1002 communicate with each other through the communication bus 1003. The memory 1002 stores a program executable by the processor 1001, and the processor 1001 executes the program stored in the memory 1002 to implement the following steps:
[0110] Obtain the plot angle of the plot where the building is located; obtain the location information of the building; obtain the layout angle calculation strategy of the building based on the location information; obtain the target layout angle of the building based on the plot angle and the layout angle calculation strategy.
[0111] The communication bus 1003 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 1003 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0112] The memory 1002 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Alternatively, the memory may also be at least one storage device located away from the processor 1001.
[0113] The above-mentioned processor 1001 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc., and can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0114] In another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is run on a computer, the computer executes the method for obtaining the arrangement angle of buildings described in the above embodiment.
[0115] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instruction is transmitted from a website site, a computer, a server or a data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integration. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape, etc.), an optical medium (such as a DVD) or a semiconductor medium (such as a solid-state hard disk), etc.
[0116] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0117] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for obtaining the layout angle of a building, characterized in that: include: Get the plot angle of the plot where the building is located; Obtaining location information of the building; According to the location information, obtaining a calculation strategy for the layout angle of the building; Obtaining a target arrangement angle of the building according to the plot angle and the arrangement angle calculation strategy; Wherein, obtaining the plot angle of the plot where the building is located includes: Obtaining the weight of each contour edge in the plot; According to the weights of the respective contour edges, obtaining the angle weights of the respective target angles corresponding to the respective contour edges; Sort the target angles according to the angle weights from large to small to obtain a sorting result; The first N target angles in the sorting result are used as the plot angles, where N is greater than or equal to 1; The step of obtaining a calculation strategy for the arrangement angle of the building according to the location information includes: According to the location information, obtaining the building weight of the building; Comparing the building weight with a preset building weight value; If the building weight is greater than the preset building weight value, the arrangement angle calculation strategy is: obtain the angle of the target contour edge that is closest to the building, select the target plot angle with the smallest difference from the angle of the target contour edge from the plot angles, and use the target plot angle as the target arrangement angle; If the building weight is less than or equal to the preset building weight value, the arrangement angle calculation strategy is: obtain the main angle of the plot with the largest angle weight among the plot angles, and use the main angle of the plot as the target arrangement angle.
2. The method for obtaining the arrangement angle of buildings according to claim 1, characterized in that: The location information includes the distance between the building and each contour edge of the plot, and the orientation of the building on the plot.
3. The method for obtaining the arrangement angle of buildings according to claim 1, characterized in that: The step of obtaining the angle weights of the target angles corresponding to the contour edges according to the weights of the contour edges includes: Calculating the difference between the angles of the contour edges; Sum the weights of the contour edges corresponding to the angles whose difference values are less than a threshold value to obtain the angle weight; According to the angle where the difference is less than a threshold, obtaining the target angle; A mapping relationship between the target angle and the angle weight is established.
4. The method for obtaining the arrangement angle of buildings according to claim 3, characterized in that: The weight of the contour edge is positively correlated with the length of the contour edge, and the weight of the contour edge is negatively correlated with the angle of the contour edge.
5. The method for obtaining the arrangement angle of buildings according to claim 4, characterized in that: The weight of the contour edge is positively correlated to the number of buildings that can be arranged in a preset area of the contour edge.
6. The method for obtaining the arrangement angle of buildings according to claim 1, characterized in that: Before obtaining the weights of each contour edge in the plot, the method further includes: Obtain the length of each contour edge in the plot; Obtaining the angle of each contour edge in the plot; The contour edge whose length is greater than the preset length value and whose angle is less than the area restriction angle corresponding to the plot is taken as a valid contour edge; The obtaining of the weight of each contour edge in the plot includes: Gets the weight of the valid silhouette edge.
7. A device for acquiring the arrangement angle of a building, characterized in that: include: The first acquisition module is used to obtain the plot angle of the plot where the building is located; A second acquisition module is used to acquire the location information of the building; A first processing module, configured to obtain a calculation strategy for the arrangement angle of the building according to the location information; A second processing module is used to obtain a target arrangement angle of the building according to the plot angle and the arrangement angle calculation strategy; Wherein, obtaining the plot angle of the plot where the building is located includes: Obtaining the weight of each contour edge in the plot; According to the weights of the respective contour edges, obtaining the angle weights of the respective target angles corresponding to the respective contour edges; Sort the target angles according to the angle weights from large to small to obtain a sorting result; The first N target angles in the sorting result are used as the plot angles, where N is greater than or equal to 1; The step of obtaining a calculation strategy for the arrangement angle of the building according to the location information includes: According to the location information, obtaining the building weight of the building; Comparing the building weight with a preset building weight value; If the building weight is greater than the preset building weight value, the arrangement angle calculation strategy is: obtain the angle of the target contour edge that is closest to the building, select the target plot angle with the smallest difference from the angle of the target contour edge from the plot angles, and use the target plot angle as the target arrangement angle; If the building weight is less than or equal to the preset building weight value, the arrangement angle calculation strategy is: obtain the main angle of the plot with the largest angle weight among the plot angles, and use the main angle of the plot as the target arrangement angle.
8. An electronic device, characterized in that: include: A processor, a memory and a communication bus, wherein the processor and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is used to execute the program stored in the memory to implement the method for obtaining the layout angle of buildings described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for obtaining the arrangement angle of buildings described in any one of claims 1 to 6 is implemented.
