CN112991489B - Isobaric line drawing method and device, electronic equipment and storage medium - Google Patents

Isobaric line drawing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112991489B
CN112991489B CN202110372182.5A CN202110372182A CN112991489B CN 112991489 B CN112991489 B CN 112991489B CN 202110372182 A CN202110372182 A CN 202110372182A CN 112991489 B CN112991489 B CN 112991489B
Authority
CN
China
Prior art keywords
isobaric line
rectangular
air pressure
current
isobaric
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110372182.5A
Other languages
Chinese (zh)
Other versions
CN112991489A (en
Inventor
赵宗玉
安刚
张海忠
秦东明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
3Clear Technology Co Ltd
Original Assignee
3Clear Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 3Clear Technology Co Ltd filed Critical 3Clear Technology Co Ltd
Priority to CN202110372182.5A priority Critical patent/CN112991489B/en
Publication of CN112991489A publication Critical patent/CN112991489A/en
Application granted granted Critical
Publication of CN112991489B publication Critical patent/CN112991489B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Design And Manufacture Of Integrated Circuits (AREA)

Abstract

The invention discloses an isobaric line drawing method, an isobaric line drawing device, electronic equipment and a computer readable storage medium. The method comprises the following steps: dividing an area to be drawn with isobars into a plurality of rectangular grids; acquiring the air pressure value of the vertex of the rectangular grid; and screening out the rectangular grids to be drawn with the isobaric line segments from the rectangular grids according to the air pressure values at the vertexes of the rectangular grids, and drawing the isobaric line segments. Acquiring an unmarked isobaric line segment as a current isobaric line and marking the current isobaric line segment as occupied; and (4) finishing the left end growth and the right end growth of the current isoline, and repeating the steps until all the isoline segments are marked. According to the method, the rectangular lattices are divided firstly, the isobaric line segments are drawn according to the vertexes of the rectangular lattices, and finally the isobaric line segments are connected into the isobaric line, so that the drawing difficulty of the isobaric line is reduced, and the calculated amount is reduced. The isobars in the rectangular grids can be grown at the left end and the right end simultaneously, and the speed of drawing the isobars is improved.

Description

Isobaric line drawing method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of isobaric line drawing, in particular to an isobaric line drawing method, an isobaric line drawing device, electronic equipment and a computer readable storage medium.
Background
A plurality of weather monitoring sites can provide air pressure data in China, air pressure distribution has important significance for weather study and judgment, weather forecast and pollution condition forecast, the important embodiment form of the air pressure distribution is a isobologram, and extremely important information in the aspect of weather forecast, such as a high-pressure center, a low-pressure center, trend and the like, can be obtained on the isobologram.
When drawing the isobologram, the isobologram is drawn according to the pressure of each node, so that the isobologram graph is visually expressed. Traditional isobolograms rely on the manual drawing, not only consume time, and the isobologram that draws is also inaccurate. The existing isobaric line drawing method comprises a triangular mesh method, isobaric points are tracked on a triangular mesh, and finally an isobaric diagram is formed. The drawing method has the advantages of large calculation amount, large operation difficulty and long consumed time.
Therefore, designing an isobaric line drawing method with high precision, convenient operation and high efficiency becomes one of the important concerns and urgent problems to be solved in the field.
Disclosure of Invention
In view of this, embodiments of the present invention provide an isobar drawing method, an apparatus, an electronic device, and a computer-readable storage medium, so as to solve the problems of low accuracy, long time consumption, and large computation amount in an isobar drawing process in the prior art.
Therefore, the embodiment of the invention provides the following technical scheme:
in a first aspect of the present invention, a method for drawing isobars is provided, including:
step 101: dividing an area to be drawn with isobars into a plurality of rectangular grids;
step 102: acquiring the air pressure value of the vertex of the rectangular grid;
step 103: screening the rectangular grids to be drawn with the isobaric line segments from the rectangular grids according to the air pressure values of the vertexes of the rectangular grids, and drawing the isobaric line segments in the rectangular grids to be drawn with the isobaric line segments;
step 104: acquiring an unmarked isobaric line segment as a current isobaric line and marking the current isobaric line segment as occupied, and executing the step 105 and the step 107;
step 105: judging whether an unmarked isobaric line segment matched with the left end point of the current isobaric line exists in eight rectangular grids adjacent to a first appointed rectangular grid, wherein the first appointed rectangular grid is the rectangular grid where the left end point of the current isobaric line is located;
step 106: if the judgment result in the step 105 is yes, inserting the isobaric line segment matched with the left end point of the current isobaric line into the current isobaric line, marking the segment as occupied, and returning to the step 105;
step 107: judging whether an unmarked isobaric line segment matched with the right end point of the current isobaric line exists in eight rectangular grids adjacent to a second specified rectangular grid, wherein the second specified rectangular grid is the rectangular grid where the right end point of the current isobaric line is located;
step 108: if the judgment result in the step 107 is yes, inserting the isobaric line segment matched with the right end point of the current isobaric line into the current isobaric line, marking the segment as occupied, and returning to the step 107;
step 109: when the judgment results of the step 105 and the step 107 are both negative, judging whether the isobar segments are both marked, and when the judgment results are negative, returning to the step 104;
step 110: if the determination result in step 109 is yes, the drawing is ended.
Further, step 103 comprises:
dividing the vertexes of the rectangular grid into two types, wherein one type is the vertex with the air pressure value smaller than a set threshold value, and the other type is the vertex with the air pressure value larger than the set threshold value;
determining the end points of the isobaric line segments on the edges where two adjacent and classified different vertexes are located; the smaller the difference value between the vertex and the set threshold value is, the closer the distance between the vertex and the endpoint is;
and connecting the end points of the isobaric line segments in the rectangular lattices to form the isobaric line segments.
Further, the coordinates of the end points of the isobar segments are
Figure BDA0003009715280000031
Figure BDA0003009715280000032
Where thres is a set threshold, (x0, y0) is a coordinate value of a vertex whose air pressure value is greater than the set threshold, val0 is an air pressure value of a vertex whose air pressure value is greater than the set threshold, (x1, y1) is a coordinate value of a vertex whose air pressure value is less than the set threshold, and val1 is an air pressure value of a vertex whose air pressure value is less than the set threshold.
Further, when the judgment results of step 105 and step 107 are both negative, the method further comprises:
judging whether the left end point and the right end point of the current isobaric line are overlapped or not to obtain a third judgment result;
if the third judgment result is yes, the current isobaric line is a closed isobaric line;
and if the third judgment result is negative, the current isobaric line is a non-closed isobaric line.
Further, when the determination result in step 109 is yes, the method further includes:
and deleting the isobars with the length less than the preset value.
In a second aspect of the present invention, there is provided an isobar drawing device, including:
the dividing module is used for dividing the area of the isobaric line to be drawn into a plurality of rectangular grids;
the first acquisition module is used for acquiring the air pressure value of the vertex of the rectangular grid;
the drawing module is used for screening the rectangular grids of the isobaric line segments to be drawn from the rectangular grids according to the air pressure values of the vertexes of the rectangular grids and drawing the isobaric line segments in the rectangular grids of the isobaric line segments to be drawn;
the second acquisition module is used for acquiring the unmarked isobaric line segment as the current isobaric line and marking the current isobaric line segment as occupied;
the first judgment module is used for judging whether an unmarked isobaric line segment matched with the left end point of the current isobaric line exists in eight rectangular grids adjacent to a first specified rectangular grid, wherein the first specified rectangular grid is the rectangular grid where the left end point of the current isobaric line is located;
the first inserting module is used for inserting the isobaric line segment matched with the left end point of the current isobaric line into the current isobaric line and marking the segment as occupied when the judgment result of the first judging module is yes, and returning to the first judging module;
the second judgment module is used for judging whether an unmarked isobaric line segment matched with the right end point of the current isobaric line exists in eight rectangular lattices adjacent to a second specified rectangular lattice, and the second specified rectangular lattice is the rectangular lattice where the right end point of the current isobaric line is located;
the second inserting module is used for inserting the isobaric line segment matched with the right end point of the current isobaric line into the current isobaric line and marking the segment as occupied when the judgment result of the second judging module is yes, and returning to the second judging module;
the third judging module is used for judging whether the isobaric line segments are marked or not when the judging results of the first judging module and the second judging module are both negative, and returning to the second obtaining module when the judging results are negative;
and the control module is used for finishing drawing when the judgment result of the third judgment module is yes.
Further, the rendering module includes:
the classification unit is used for classifying the vertexes of the rectangular grids into two types, wherein one type is the vertex with the air pressure value smaller than a set threshold value, and the other type is the vertex with the air pressure value larger than the set threshold value;
the computing unit is used for determining the end points of the isobaric line segments on the edges where two adjacent vertexes which are different in classification are located; the smaller the difference value between the vertex and the set threshold value is, the closer the distance between the vertex and the endpoint is;
and the drawing unit is used for connecting the end points of the isobaric line segments in the rectangular grids to form the isobaric line segments.
Further, the computing unit is also used for marking the coordinates of the end points of the isobar segments as the coordinates
Figure BDA0003009715280000041
Where thres is a set threshold, (x0, y0) is a coordinate value of a vertex whose air pressure value is greater than the set threshold, val0 is an air pressure value of a vertex whose air pressure value is greater than the set threshold, (x1, y1) is a coordinate value of a vertex whose air pressure value is less than the set threshold, and val1 is an air pressure value of a vertex whose air pressure value is less than the set threshold.
In a third aspect of the present invention, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the isobar drawing method according to any one of the first aspect of the present invention.
In a fourth aspect of the present invention, there is provided a computer-readable storage medium having stored thereon computer instructions, wherein the instructions, when executed by a processor, implement the isobar drawing method according to any one of the first aspect of the present invention.
The technical scheme of the embodiment of the invention has the following advantages:
the embodiment of the invention provides an isobaric line drawing method, an isobaric line drawing device, electronic equipment and a computer readable storage medium. According to the method, the rectangular lattices are divided firstly, the isobaric line segments are drawn according to the vertexes of the rectangular lattices, and finally the isobaric line segments are connected into the isobaric line, so that the drawing difficulty of the isobaric line is reduced, and the calculated amount is reduced. The isobars in the rectangular grids can be grown at the left end and the right end simultaneously, and the speed of drawing the isobars is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a isobar drawing method according to an embodiment of the invention;
FIG. 2 is a schematic illustration of an isobar segment according to an embodiment of the invention;
fig. 3 is a block diagram of a structure of an isobar drawing device according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the description of the present application, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like indicate orientations or positional relationships based on those shown in the drawings, and are used merely for convenience of description and for simplicity of description, and do not indicate or imply that the referenced device or element must have a particular orientation, be constructed in a particular orientation, and be operated, and thus should not be considered as limiting the present application. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
In this application, the word "exemplary" is used to mean "serving as an example, instance, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for the purpose of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known structures and processes are not set forth in detail in order to avoid obscuring the description of the present application with unnecessary detail. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
In accordance with an embodiment of the present invention, there is provided an isobar drawing method embodiment, it is noted that the steps illustrated in the flowchart of the figure may be performed in a computer system, such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
In this embodiment, a method for drawing isobars is provided, which may be used in an environment monitoring system, and the like, and fig. 1 is a flowchart of the method for drawing isobars according to the embodiment of the present invention, as shown in fig. 1, the process includes the following steps:
step S101: and dividing the area to be drawn with the isobars into a plurality of rectangular grids. In this embodiment, the rectangular grids may be selected as rectangles or squares having the same shape.
Step S102: and acquiring the air pressure value of the vertex of the rectangular grid. In this embodiment, the coordinates and the air pressure data of the multiple weather monitoring stations may be obtained first, the coordinates of the vertex of the rectangular grid may be obtained, and the air pressure value of the vertex of the rectangular grid may be calculated by an interpolation method.
Step S103: and screening out the rectangular lattices to be drawn with the isobaric line segments from the rectangular lattices according to the air pressure values at the vertexes of the rectangular lattices, and drawing the isobaric line segments in the rectangular lattices to be drawn with the isobaric line segments. In this embodiment, the vertices of the rectangular grid may be divided into two types, one type is a vertex whose air pressure value is smaller than a set threshold, and the other type is a vertex whose air pressure value is greater than the set threshold. And the rectangular lattices comprising the two types of vertexes are rectangular lattices to be drawn into isobaric line segments. And in the rectangular grid of the isobaric line segment to be drawn, taking the points on the edges where two adjacent and classified different vertexes are located as the end points of the isobaric line segment. And connecting the endpoints of the isobaric line segments in the rectangular lattices in a non-crossed manner to form the isobaric line segments. FIG. 2 is a schematic diagram of an isobar segment according to an embodiment of the invention. As shown in fig. 2, the middle point of the edge where two adjacent and classified different vertices are located may be selected as the end point of the isobar segment. And connecting the endpoints of the isobaric line segments in the rectangular lattices in a non-crossed manner to form the isobaric line segments. In the figure, the solid points are the peaks where the air pressure value is higher than the set threshold value, and the hollow points are the peaks where the air pressure value is lower than the set threshold value.
Step S104: acquiring an unmarked isobar segment as the current isobar and marking the segment as occupied, and executing the step S105 and the step S107. Preferably, step S105 and step S107 are performed simultaneously. In this embodiment, one end of the current isobar is the left end, and the other end is the right end. Left-end growth and right-end growth were performed simultaneously.
Step S105: and judging whether an unmarked isobaric line segment matched with the left end point of the current isobaric line exists in eight rectangular grids adjacent to the first appointed rectangular grid, wherein the first appointed rectangular grid is the rectangular grid where the left end point of the current isobaric line is located. In this embodiment, one end of the isobar segment in the rectangular lattice is overlapped with the left end point of the current isobar, and then the isobar segment is matched with the left end point of the current isobar.
Step S106: if the judgment result in the step S105 is yes, inserting the isobaric line segment matched with the left end point of the current isobaric line into the current isobaric line, marking the segment as occupied, and returning to the step S105; in this embodiment, the left end point of the inserted isobar segment replaces the original left end point to become the left end point of the current isobar.
Step S107: and judging whether an unmarked isobaric line segment matched with the right end point of the current isobaric line exists in eight rectangular grids adjacent to the second specified rectangular grid, wherein the second specified rectangular grid is the rectangular grid where the right end point of the current isobaric line is located. In this embodiment, one end of the isobar segment in the rectangular lattice coincides with the right end point of the current isobar, and then the isobar segment matches with the right end point of the current isobar.
Step S108: if the judgment result in the step S107 is yes, the isobaric segment matched with the right end point of the current isobaric is inserted into the current isobaric and marked as occupied, and the step S107 is returned. In this embodiment, the right end point of the inserted isobar segment replaces the original right end point to become the right end point of the current isobar.
Step S109: when the judgment results of the step S105 and the step S107 are both negative, judging whether the isobar segments are all marked, and if the judgment results are negative, returning to the step S104;
step S110: if the determination result in step S109 is yes, the drawing is ended.
In this embodiment, before finishing the drawing, deleting the isobars with the length smaller than the preset value.
According to the embodiment of the invention, the rectangular grids are divided firstly, the isobaric line segments are drawn according to the vertexes of the rectangular grids, and finally the isobaric line segments are connected into the isobaric line, so that the drawing difficulty of the isobaric line is reduced, and the calculated amount is reduced. The isobars in the rectangular grids can be grown at the left end and the right end simultaneously, and the speed of drawing the isobars is improved. Compared with the conventional irregular triangular mesh drawing method, the method saves a large amount of labor and time, has high accuracy and improves the drawing efficiency.
To ensure the accuracy of the air pressure data, in an alternative embodiment, step 103 includes: the vertexes of the rectangular grid are divided into two types, wherein one type is the vertex with the air pressure value smaller than the set threshold value, and the other type is the vertex with the air pressure value larger than the set threshold value. In this embodiment, the setting threshold is set according to actual requirements. Determining the end points of the isobaric line segments on the edges where two adjacent and classified different vertexes are located; the smaller the difference value between the vertex and the set threshold value is, the closer the distance between the vertex and the endpoint is; and connecting the end points of the isobaric line segments in the rectangular grids to form the isobaric line segments. In this embodiment, the isobar segments may be selected as straight lines or arcs.
In one embodiment, the coordinates of the endpoints of the isobar segments are
Figure BDA0003009715280000091
Where thres is a set threshold, (x0, y0) is a coordinate value of a vertex whose air pressure value is greater than the set threshold, val0 is an air pressure value of a vertex whose air pressure value is greater than the set threshold, (x1, y1) is a coordinate value of a vertex whose air pressure value is less than the set threshold, and val1 is an air pressure value of a vertex whose air pressure value is less than the set threshold.
Compared with the method of taking the middle point of the side where the adjacent and classified vertexes are located as the end point of the isobaric segment, the isobaric drawing method of the embodiment determines the position of the end point of the isobaric segment according to the difference value between the air pressure value of the adjacent vertex and the set threshold, the isobaric end point is closer to the actual value, and the accuracy of the isobaric is obviously improved.
In an optional embodiment, when the determination results in step 105 and step 107 are both no, the method further includes: judging whether the left end point and the right end point of the current isobaric line are overlapped or not to obtain a third judgment result; if the third judgment result is yes, the current isobaric line is a closed isobaric line; and if the third judgment result is negative, the current isobaric line is a non-closed isobaric line.
In this embodiment, an isobar drawing device is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and the description of the device is omitted for brevity. As used hereinafter, the term "module" is a combination of software and/or hardware that can implement a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
The present embodiment provides an isobar drawing device, including:
the dividing module 301 is configured to divide an area where an isobaric line is to be drawn into a plurality of rectangular grids;
a first obtaining module 302, configured to obtain an air pressure value at a vertex of the rectangular lattice;
the drawing module 303 is configured to screen out a rectangular lattice of the isobaric line segment to be drawn from the rectangular lattice according to the air pressure value at the vertex of the rectangular lattice, and draw the isobaric line segment in the rectangular lattice of the isobaric line segment to be drawn;
a second obtaining module 304, configured to obtain an unmarked isobar segment as a current isobar and mark the current isobar segment as occupied;
a first judging module 305, configured to judge whether an unmarked isobaric segment matching the left end point of the current isobaric exists in eight rectangular lattices adjacent to a first specified rectangular lattice, where the first specified rectangular lattice is a rectangular lattice in which the left end point of the current isobaric is located;
a first inserting module 306, configured to insert, when the determination result of the first determining module 305 is yes, the isobar segment matched with the left end point of the current isobar into the current isobar, mark the current isobar as occupied, and return to the first determining module 305;
a second judging module 307, configured to judge whether an unmarked isobaric line segment matching the right end point of the current isobaric line exists in eight rectangular lattices adjacent to a second specified rectangular lattice, where the second specified rectangular lattice is a rectangular lattice in which the right end point of the current isobaric line is located;
a second inserting module 308, configured to insert, when the determination result of the second determining module 307 is yes, the isobar segment matched with the right end point of the current isobar into the current isobar, mark the current isobar as occupied, and return to the second determining module 307;
a third judging module 309, configured to judge whether the isobar segments are both marked when the judgment results of the first judging module 305 and the second judging module 307 are both negative, and return to the second obtaining module 304 when the judgment results are negative;
and a control module 310, configured to end the drawing when the determination result of the third determining module 309 is yes.
The drawing module 303 includes:
the classification unit is used for classifying the vertexes of the rectangular grids into two types, wherein one type is the vertex with the air pressure value smaller than a set threshold value, and the other type is the vertex with the air pressure value larger than the set threshold value;
the computing unit is used for determining the end points of the isobaric line segments on the edges where two adjacent vertexes which are different in classification are located; the smaller the difference value between the vertex and the set threshold value is, the closer the distance between the vertex and the endpoint is;
and the drawing unit is used for connecting the end points of the isobaric line segments in the rectangular grids to form the isobaric line segments.
The computing unit is further configured to mark coordinates of end points of the isobar segments as
Figure BDA0003009715280000111
Where thres is a set threshold, (x0, y0) is a coordinate value of a vertex whose air pressure value is greater than the set threshold, val0 is an air pressure value of a vertex whose air pressure value is greater than the set threshold, (x1, y1) is a coordinate value of a vertex whose air pressure value is less than the set threshold, and val1 is an air pressure value of a vertex whose air pressure value is less than the set threshold.
The isobar rendering device in this embodiment is presented in the form of functional units, where a unit refers to an ASIC circuit, a processor and memory executing one or more software or fixed programs, and/or other devices that may provide the above-described functionality.
Further functional descriptions of the modules are the same as those of the corresponding embodiments, and are not repeated herein.
An embodiment of the present invention further provides an electronic device, which includes the isobaric drawing device shown in fig. 3.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an electronic device according to an alternative embodiment of the present invention, and as shown in fig. 4, the terminal may include: at least one processor 401, such as a CPU (Central Processing Unit), at least one communication interface 403, memory 404, and at least one communication bus 402. Wherein a communication bus 402 is used to enable connective communication between these components. The communication interface 403 may include a Display (Display) and a Keyboard (Keyboard), and the optional communication interface 403 may also include a standard wired interface and a standard wireless interface. The Memory 404 may be a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The memory 404 may optionally be at least one memory device located remotely from the processor 401. Wherein the processor 401 may be combined with the apparatus described in fig. 3, an application program is stored in the memory 404, and the processor 401 calls the program code stored in the memory 404 for executing any of the above-mentioned isobar drawing methods.
The communication bus 402 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 402 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
The memory 404 may include a volatile memory (RAM), such as a random-access memory (RAM); the memory may also include a non-volatile memory (english: non-volatile memory), such as a flash memory (english: flash memory), a hard disk (english: hard disk drive, abbreviated: HDD) or a solid-state drive (english: SSD); the memory 404 may also comprise a combination of memories of the kind described above.
The processor 401 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP.
The processor 401 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
Optionally, the memory 404 is also used to store program instructions. The processor 401 may call program instructions to implement the isobar drawing method as shown in the embodiment of fig. 1 of the present application.
The embodiment of the invention also provides a non-transitory computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the isobaric line drawing method in any method embodiment. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. An isobar drawing method is characterized by comprising the following steps:
step 101: dividing an area to be drawn with isobars into a plurality of rectangular grids;
step 102: acquiring the air pressure value of the vertex of the rectangular grid;
step 103: screening the rectangular grids to be drawn with the isobaric line segments from the rectangular grids according to the air pressure values of the vertexes of the rectangular grids, and drawing the isobaric line segments in the rectangular grids to be drawn with the isobaric line segments;
step 104: acquiring an unmarked isobaric line segment as a current isobaric line and marking the current isobaric line segment as occupied, and executing the step 105 and the step 107;
step 105: judging whether an unmarked isobaric line segment matched with the left end point of the current isobaric line exists in eight rectangular grids adjacent to a first appointed rectangular grid, wherein the first appointed rectangular grid is the rectangular grid where the left end point of the current isobaric line is located;
step 106: if the judgment result in the step 105 is yes, inserting the isobaric line segment matched with the left end point of the current isobaric line into the current isobaric line, marking the segment as occupied, and returning to the step 105;
step 107: judging whether an unmarked isobaric line segment matched with the right end point of the current isobaric line exists in eight rectangular grids adjacent to a second specified rectangular grid, wherein the second specified rectangular grid is the rectangular grid where the right end point of the current isobaric line is located;
step 108: if the judgment result in the step 107 is yes, inserting the isobaric line segment matched with the right end point of the current isobaric line into the current isobaric line, marking the segment as occupied, and returning to the step 107;
step 109: when the judgment results of the step 105 and the step 107 are both negative, judging whether the isobar segments are both marked, and when the judgment results are negative, returning to the step 104;
step 110: if the determination result in step 109 is yes, the drawing is ended.
2. The isobar drawing method according to claim 1, wherein step 103 comprises:
dividing the vertexes of the rectangular grid into two types, wherein one type is the vertex with the air pressure value smaller than a set threshold value, and the other type is the vertex with the air pressure value larger than the set threshold value;
determining the end points of the isobaric line segments on the edges where two adjacent and classified different vertexes are located; the smaller the difference value between the vertex and the set threshold value is, the closer the distance between the vertex and the endpoint is;
and connecting the end points of the isobaric line segments in the rectangular lattices to form the isobaric line segments.
3. The isobar drawing method according to claim 2, wherein the coordinates of the end points of the isobar segments are
Figure FDA0003009715270000021
Where thres is a set threshold, (x0, y0) is a coordinate value of a vertex whose air pressure value is greater than the set threshold, val0 is an air pressure value of a vertex whose air pressure value is greater than the set threshold, (x1, y1) is a coordinate value of a vertex whose air pressure value is less than the set threshold, and val1 is an air pressure value of a vertex whose air pressure value is less than the set threshold.
4. The isobar drawing method according to claim 1, wherein when the judgment results of step 105 and step 107 are both no, further comprising:
judging whether the left end point and the right end point of the current isobaric line are overlapped or not to obtain a third judgment result;
if the third judgment result is yes, the current isobaric line is a closed isobaric line;
and if the third judgment result is negative, the current isobaric line is a non-closed isobaric line.
5. The isobar drawing method according to claim 1, wherein when the judgment result of step 109 is yes, further comprising:
and deleting the isobars with the length less than the preset value.
6. An isobar drawing device, comprising:
the dividing module is used for dividing the area of the isobaric line to be drawn into a plurality of rectangular grids;
the first acquisition module is used for acquiring the air pressure value of the vertex of the rectangular grid;
the drawing module is used for screening the rectangular grids of the isobaric line segments to be drawn from the rectangular grids according to the air pressure values of the vertexes of the rectangular grids and drawing the isobaric line segments in the rectangular grids of the isobaric line segments to be drawn;
the second acquisition module is used for acquiring the unmarked isobaric line segment as the current isobaric line and marking the current isobaric line segment as occupied;
the first judgment module is used for judging whether an unmarked isobaric line segment matched with the left end point of the current isobaric line exists in eight rectangular grids adjacent to a first specified rectangular grid, wherein the first specified rectangular grid is the rectangular grid where the left end point of the current isobaric line is located;
the first inserting module is used for inserting the isobaric line segment matched with the left end point of the current isobaric line into the current isobaric line and marking the segment as occupied when the judgment result of the first judging module is yes, and returning to the first judging module;
the second judgment module is used for judging whether an unmarked isobaric line segment matched with the right end point of the current isobaric line exists in eight rectangular lattices adjacent to a second specified rectangular lattice, wherein the second specified rectangular lattice is the rectangular lattice where the right end point of the current isobaric line is located;
the second inserting module is used for inserting the isobaric line segment matched with the right end point of the current isobaric line into the current isobaric line and marking the segment as occupied when the judgment result of the second judging module is yes, and returning to the second judging module;
the third judging module is used for judging whether the isobaric line segments are marked or not when the judging results of the first judging module and the second judging module are both negative, and returning to the second obtaining module when the judging results are negative;
and the control module is used for finishing drawing when the judgment result of the third judgment module is yes.
7. The isobar drawing device according to claim 6, wherein the drawing module comprises:
the classification unit is used for classifying the vertexes of the rectangular grids into two types, wherein one type is the vertex with the air pressure value smaller than a set threshold value, and the other type is the vertex with the air pressure value larger than the set threshold value;
the computing unit is used for determining the end points of the isobaric line segments on the edges where two adjacent vertexes which are different in classification are located; the smaller the difference value between the vertex and the set threshold value is, the closer the distance between the vertex and the endpoint is;
and the drawing unit is used for connecting the end points of the isobaric line segments in the rectangular grids to form the isobaric line segments.
8. The isobar drawing device according to claim 7, wherein the computing unit is further configured to mark coordinates of end points of the isobar segments as coordinates of the end points
Figure FDA0003009715270000041
Where thres is a set threshold, (x0, y0) is a coordinate value of a vertex whose air pressure value is greater than the set threshold, val0 is an air pressure value of a vertex whose air pressure value is greater than the set threshold, (x1, y1) is a coordinate value of a vertex whose air pressure value is less than the set threshold, and val1 is an air pressure value of a vertex whose air pressure value is less than the set threshold.
9. An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the one processor to cause the at least one processor to perform the isobar rendering method as recited in any of claims 1-5 above.
10. A computer-readable storage medium having stored thereon computer instructions, which when executed by a processor, implement the isobar rendering method of any of claims 1-5.
CN202110372182.5A 2021-04-07 2021-04-07 Isobaric line drawing method and device, electronic equipment and storage medium Active CN112991489B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110372182.5A CN112991489B (en) 2021-04-07 2021-04-07 Isobaric line drawing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110372182.5A CN112991489B (en) 2021-04-07 2021-04-07 Isobaric line drawing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112991489A CN112991489A (en) 2021-06-18
CN112991489B true CN112991489B (en) 2021-11-05

Family

ID=76339315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110372182.5A Active CN112991489B (en) 2021-04-07 2021-04-07 Isobaric line drawing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112991489B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114565057B (en) * 2022-03-15 2022-10-21 中科三清科技有限公司 Machine learning-based grading field identification method and device, storage medium and terminal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106981084A (en) * 2016-10-28 2017-07-25 阿里巴巴集团控股有限公司 A kind of method and device of drawing isoline
CN108230423A (en) * 2018-01-03 2018-06-29 成都信息工程大学 A kind of method for drafting of the isobar air pressure line of rabbet joint and crestal line
CN110675470A (en) * 2019-10-11 2020-01-10 北京航天宏图信息技术股份有限公司 Contour line drawing method and device, computing equipment and readable storage medium
CN112559619A (en) * 2020-12-07 2021-03-26 中科三清科技有限公司 Method and device for drawing spatial distribution map, electronic equipment and readable storage medium
CN112614207A (en) * 2020-12-17 2021-04-06 航天宏图信息技术股份有限公司 Contour line drawing method, device and equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070188491A1 (en) * 2005-12-12 2007-08-16 Ensco, Inc. System and method for fast efficient contour shading of sampled data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106981084A (en) * 2016-10-28 2017-07-25 阿里巴巴集团控股有限公司 A kind of method and device of drawing isoline
CN108230423A (en) * 2018-01-03 2018-06-29 成都信息工程大学 A kind of method for drafting of the isobar air pressure line of rabbet joint and crestal line
CN110675470A (en) * 2019-10-11 2020-01-10 北京航天宏图信息技术股份有限公司 Contour line drawing method and device, computing equipment and readable storage medium
CN112559619A (en) * 2020-12-07 2021-03-26 中科三清科技有限公司 Method and device for drawing spatial distribution map, electronic equipment and readable storage medium
CN112614207A (en) * 2020-12-17 2021-04-06 航天宏图信息技术股份有限公司 Contour line drawing method, device and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于Delaunay三角网的等值线生成算法的研究";姚家振;《中国优秀博硕士学位论文全文数据库(硕士) 信息科技辑》;20151115;全文 *

Also Published As

Publication number Publication date
CN112991489A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
CN112686972B (en) Air pressure contour drawing method and device, electronic equipment and storage medium
CN112991489B (en) Isobaric line drawing method and device, electronic equipment and storage medium
CN110689492B (en) Image edge smoothing method and device
CN108804016B (en) Object identification method and device based on touch screen and electronic equipment
CN112966330A (en) Wall surface generation method of crossed wall body, computer equipment and readable storage medium
CN114779209B (en) Laser radar point cloud voxelization method and device
CN111523531A (en) Word processing method and device, electronic equipment and computer readable storage medium
CN108847120B (en) Drawing method based on electronic fence map order thermodynamic diagram distribution
CN112580594B (en) Document identification method, device, computer equipment and storage medium
CN109949421B (en) Triangular net cutting method and device
CN111462277B (en) Method and device for generating target line of wall sticker to be processed
CN113393430A (en) Thermal imaging image enhancement training method and device for fan blade defect detection
CN107045732B (en) Digital ground model simplifying method and device
CN109360215B (en) Method, device and equipment for searching outer contour of three-dimensional model and storage medium
CN113032071B (en) Page element positioning method, page testing method, device, equipment and medium
CN114444185A (en) In-situ labeling identification method and device and electronic equipment
WO2022073377A1 (en) Vehicle damage assessment method and apparatus, computer device, and readable storage medium
CN114741188A (en) Graphic element processing method and device, electronic equipment and storage medium
CN112613088A (en) Pattern recognition method, pattern recognition device and computer equipment
CN112214872B (en) Automatic calculation method and device for railway line longitudinal section scale information
CN112767379A (en) Method, system and computer readable storage medium for fault detection in ceramic manufacturing
CN113553796B (en) Method and system for acquiring position of through hole area in layout file and electronic equipment
CN112785713B (en) Method, device, equipment and readable storage medium for arranging light source
CN114296591A (en) Composite line drawing method and device and related equipment
CN113849422B (en) Garbage collection target block selection method, device, equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20210618

Assignee: Beijing Zhongke Sanqing Environmental Technology Co.,Ltd.

Assignor: 3CLEAR TECHNOLOGY Co.,Ltd.

Contract record no.: X2022980012305

Denomination of invention: A method, device, electronic device and storage medium for drawing isobars

Granted publication date: 20211105

License type: Common License

Record date: 20220815

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20210618

Assignee: Beijing Zhongke Sanqing Environmental Technology Co.,Ltd.

Assignor: 3CLEAR TECHNOLOGY Co.,Ltd.

Contract record no.: X2023980042173

Denomination of invention: A method, device, electronic device, and storage medium for drawing isobars

Granted publication date: 20211105

License type: Common License

Record date: 20230920