CN110675470B - Contour line drawing method and device, computing equipment and readable storage medium - Google Patents

Contour line drawing method and device, computing equipment and readable storage medium Download PDF

Info

Publication number
CN110675470B
CN110675470B CN201910966981.8A CN201910966981A CN110675470B CN 110675470 B CN110675470 B CN 110675470B CN 201910966981 A CN201910966981 A CN 201910966981A CN 110675470 B CN110675470 B CN 110675470B
Authority
CN
China
Prior art keywords
processed
contour
contour line
grid
processing cores
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
CN201910966981.8A
Other languages
Chinese (zh)
Other versions
CN110675470A (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.)
Aerospace Hongtu Information Technology Co Ltd
Original Assignee
Beijing Piesat Information 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 Beijing Piesat Information Technology Co ltd filed Critical Beijing Piesat Information Technology Co ltd
Priority to CN201910966981.8A priority Critical patent/CN110675470B/en
Publication of CN110675470A publication Critical patent/CN110675470A/en
Application granted granted Critical
Publication of CN110675470B publication Critical patent/CN110675470B/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
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01WMETEOROLOGY
    • G01W1/00Meteorology
    • G01W1/02Instruments for indicating weather conditions by measuring two or more variables, e.g. humidity, pressure, temperature, cloud cover or wind speed
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Atmospheric Sciences (AREA)
  • Biodiversity & Conservation Biology (AREA)
  • Ecology (AREA)
  • Environmental Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The application provides a contour line drawing method, a contour line drawing device, computing equipment and a readable storage medium, and relates to the technical field of data processing, wherein the method comprises the following steps: acquiring a plurality of different contour lines to be processed; performing contour tracking calculation on a plurality of different to-be-processed contours in parallel through all processing cores of a computing device, acquiring a processed contour corresponding to each to-be-processed contour, and drawing the processed contours in a display area, wherein the to-be-processed contours subjected to contour tracking calculation through different processing cores are different. The method can improve the processing speed according to the parallel computing capability of all the processing cores of the computing equipment, thereby improving the data processing efficiency and further meeting the real-time performance of the weather guarantee service.

Description

Contour line drawing method and device, computing equipment and readable storage medium
Technical Field
The application relates to the technical field of data processing, in particular to a contour line drawing method, a contour line drawing device, a computing device and a readable storage medium.
Background
The ground high-altitude live weather analysis is one of important technical means for weather service guarantee, and mainly comprises contour line analysis of factors such as ground sea level air pressure, 3-hour pressure change, high altitude potential height and temperature. The existing common isoline tracking method generally comprises two methods, namely an irregular triangular grid-based method and a regular rectangular grid-based method, the triangular grid isoline tracking algorithm needs to reconstruct the triangular grid for changed station data each time, the algorithm flexibility and expansibility are poor, the regular rectangular grid isoline tracking algorithm has good flexibility and expansibility, but the efficiency of large-scale discrete data processing is low, and the real-time problem of weather guarantee service cannot be met.
Disclosure of Invention
An embodiment of the application aims to provide a contour line drawing method, a contour line drawing device, a computing device and a readable storage medium, which are used for solving the problem that the real-time performance of a weather guarantee service cannot be met in the prior art.
In a first aspect, an embodiment of the present application provides a method for drawing a contour line, where the method includes: acquiring a plurality of different contour lines to be processed; performing contour tracking calculation on a plurality of different to-be-processed contours in parallel through all processing cores of a computing device, acquiring a processed contour corresponding to each to-be-processed contour, and drawing the processed contours in a display area, wherein the to-be-processed contours subjected to contour tracking calculation through different processing cores are different.
In the implementation process, parallel contour tracking calculation is carried out on a plurality of different obtained contour lines to be processed, processed contour lines corresponding to the contour lines to be processed are obtained, parallel calculation is carried out according to all processing cores of the computing equipment, the processing speed can be increased, the data processing efficiency is improved, and real-time performance of the weather guarantee service is further met.
Optionally, the performing, by all processing cores of the computing device, contour tracking calculation on a plurality of different to-be-processed contours in parallel to obtain a processed contour corresponding to each to-be-processed contour includes: dividing the display area into a plurality of grid units according to preset grid parameters; if the contour line to be processed is an open contour line, acquiring a plurality of first intersection points of the edge grid unit positioned at the outermost layer in the plurality of grid units and the contour line to be processed; determining internal grid cells except the edge grid cells in the grid cells, and acquiring a plurality of second intersection points of the internal grid cells and the contour line to be processed; determining, by the plurality of processing cores of the computing device, a processed contour line from a first intersection of the plurality of first intersections that is located on the display area edge line and the plurality of second intersections in parallel.
In the implementation process, the display area is divided into a plurality of grid units according to preset grid parameters, when the contour line to be processed is an open contour line, a first intersection point and a second intersection point which are obtained by intersecting the contour line to be processed and the grid units are obtained, wherein the first intersection point is an intersection point of an edge grid unit positioned on the outermost layer in the grid units and the contour line to be processed, the second intersection point is an intersection point of an internal grid unit except the edge grid unit in the grid units and the contour line to be processed, and the contour line is tracked according to the first intersection point and the second intersection point.
Optionally, after dividing the display area into a plurality of grid cells according to preset grid parameters, the method includes: if the contour line to be processed is a closed contour line, determining a plurality of second intersection points of the internal grid units except the edge grid units in the grid units and the contour line to be processed; determining, by a plurality of processing cores of the computing device, a processed contour from the plurality of second intersections in parallel.
In the implementation process, if the contour line to be processed is a closed contour line, the processed contour line can be determined according to a plurality of second intersection points of the internal grid units except the edge grid unit and the contour line to be processed in the grid units, and the contour line to be processed is tracked according to the intersection points of the grid units and the contour line to be processed, so that the accuracy of contour line tracking can be ensured.
Optionally, before the obtaining a plurality of different contours to be processed, the method further includes: dividing a display area into a plurality of sub-areas according to the number of processing cores of the computing equipment; performing interpolation calculation on the station data in all the sub-areas in parallel through all the processing cores and acquiring a plurality of interpolation calculation results, wherein the sub-areas interpolated through different processing cores are different, and each interpolation calculation result comprises at least one contour line segment; and combining a plurality of contour line segments matched in a plurality of interpolation calculation results into a contour line to be processed so as to obtain a plurality of contour lines to be processed.
According to the method, the display area is divided into a plurality of sub-areas according to the number of processing cores of the computing equipment, and then interpolation calculation is performed on the station data in the sub-areas in parallel through different processing cores, so that the acquisition speed of the contour line to be processed is increased, the data processing efficiency is improved, and the real-time performance of the weather guarantee service is further met.
Optionally, the performing, by all the processing cores, interpolation calculation on the station data in all the sub-areas in parallel and obtaining a plurality of interpolation calculation results includes: and performing interpolation calculation on the station data in all the sub-areas in parallel by all the processing cores by adopting a reverse distance weighting method to obtain a plurality of interpolation calculation results. The reverse distance weighting method is based on the principle of similar similarity, the distance between the interpolation point and the sample point is taken as the weight to carry out weighted average, the closer the sample point to the interpolation point, the greater the weight is given to the sample point, the method is simple and easy to implement, visual and high in efficiency, and therefore the contour line to be processed with higher accuracy can be obtained.
In a second aspect, an embodiment of the present application provides a contour drawing apparatus, including: the contour line processing device comprises a contour line acquisition module to be processed, a contour line processing module and a contour line processing module, wherein the contour line acquisition module is used for acquiring a plurality of different contour lines to be processed; the contour processing module is used for performing contour tracking calculation on a plurality of different to-be-processed contours in parallel through all processing cores of the computing device, acquiring a processed contour corresponding to each to-be-processed contour, and drawing the processed contours in a display area, wherein the to-be-processed contours subjected to contour tracking calculation through different processing cores are different.
Optionally, the contour processing module includes: the grid cell dividing unit is used for dividing the display area into a plurality of grid cells according to preset grid parameters; a first intersection point obtaining unit, configured to obtain, when the to-be-processed contour line is an open contour line, a plurality of first intersection points between an outermost edge mesh cell of the plurality of mesh cells and the to-be-processed contour line; a second intersection point obtaining unit, configured to determine an internal grid unit, excluding the edge grid unit, in the multiple grid units, and obtain multiple second intersection points between the internal grid unit and the to-be-processed contour line; a contour processing unit to determine, by the plurality of processing cores of the computing device, a processed contour from a first intersection of the plurality of first intersections located on the edge line of the display area and the plurality of second intersections in parallel.
Optionally, the contour processing module further comprises: the second intersection point acquisition unit is further used for determining a plurality of second intersection points of the internal grid units except the edge grid units in the grid units and the contour line to be processed when the contour line to be processed is a closed contour line; and the contour processing unit is further used for determining a processed contour according to the plurality of second intersection points in parallel through a plurality of processing cores of the computing equipment.
Optionally, the apparatus further comprises: the sub-region dividing module is used for dividing the display region into a plurality of sub-regions according to the number of the processing cores of the computing equipment; the interpolation calculation module is used for performing interpolation calculation on the station data in all the sub-areas in parallel through all the processing cores and acquiring a plurality of interpolation calculation results, wherein the sub-areas subjected to interpolation calculation through different processing cores are different, and each interpolation calculation result comprises at least one contour line segment; and the contour line acquisition module to be processed is used for merging a plurality of matched contour line segments in a plurality of interpolation calculation results into a contour line to be processed so as to acquire a plurality of contour lines to be processed.
Optionally, the apparatus further comprises: and the interpolation calculation module is also used for carrying out interpolation calculation on the station data in all the sub-areas in parallel by all the processing cores by adopting a reverse distance weighting method to obtain a plurality of interpolation calculation results.
In a third aspect, embodiments of the present application provide a computing device, including a processor and a memory, where the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the method as provided in the first aspect are executed.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, performs the steps in the method as provided in the first aspect.
Additional features and advantages of the present application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the present application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a block diagram of a computing device according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of a method for contour drawing according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a contour line to be processed according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an interpolation algorithm provided in an embodiment of the present application;
fig. 5 is a block diagram of a contour drawing apparatus according to an embodiment of the present application.
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. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
The contour line is a smooth curve formed by connecting a certain number of points with equal index values of a drawing object, and is commonly used in the fields of geography, weather and the like, the currently commonly used contour line tracking method generally comprises two types of methods based on an irregular triangular grid and a regular rectangular grid, the contour line technology is more and more widely applied in scientific research and engineering, and the requirements on the accuracy and the real-time performance of contour line drawing are greatly improved. At least one processor 110, such as a CPU, at least one communication interface 120, at least one memory 130, and at least one communication bus 140. Wherein the communication bus 140 is used for realizing direct connection communication of these components. The communication interface 120 of the device in the embodiment of the present application is used for performing signaling or data communication with other node devices. The memory 130 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. Memory 130 may optionally be at least one memory device located remotely from the aforementioned processor. The memory 130 has stored therein computer-readable instructions that, when executed by the processor 110, cause the computing device to perform the method processes described below in fig. 2.
It will be appreciated that the configuration shown in FIG. 1 is merely illustrative, and that computing device 100 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof. In this embodiment of the application, the computing device 100 may be, but is not limited to, a dedicated detection device, a desktop, a notebook computer, a smart phone, an intelligent wearable device, an in-vehicle device, and other physical devices, and may also be a virtual device such as a virtual machine. In addition, the computing device 100 need not be a single device, but may be a combination of multiple devices, such as a server cluster, and so forth.
Referring to fig. 2, fig. 2 is a flowchart of a contour drawing method according to an embodiment of the present application, where the contour drawing method includes the following steps:
step S110: a plurality of different to-be-processed contours are obtained.
The contour line to be processed is simply drawn according to data, and the contour line to be processed can be obtained according to various methods, for example, discrete data can be obtained by calculation through an interpolation algorithm, wherein various specific operations for drawing the contour line are performed. During interpolation calculation, many algorithms can be selected according to the requirements of actual conditions, and different parameters in various algorithms need to be debugged according to different conditions, for example, fine adjustment is performed according to geographical environment factors and the like. The parallel interpolation algorithm provided by the application can improve the interpolation calculation speed, and the parallel interpolation algorithm will be described in detail later, and will not be described herein again.
Step S120: and performing contour tracking calculation on a plurality of different contour lines to be processed in parallel through all processing cores of the computing equipment, acquiring a processed contour line corresponding to each contour line to be processed, and drawing the processed contour lines in a display area.
The contour lines to be processed, which are subjected to contour line tracking calculation through different processing cores, are different.
Parallel Processing (Parallel Processing) is a computing method capable of executing two or more processes simultaneously in a computer system, and can work in different aspects of the same program simultaneously. When contour tracking calculation is carried out on a plurality of different contour lines to be processed, the calculation processing speed can be improved by carrying out parallel processing on all processing cores of the calculation equipment.
The contour line can be divided into an unclosed contour line and a closed contour line, the contour line is tracked from a display area boundary or a previous equivalent point in the display area to a next equivalent point, namely, the coordinate of the next equivalent point is obtained according to the coordinate of the equivalent point, then the next equivalent point is continuously tracked from the next equivalent point, the tracking is carried out all the time, for an open contour line, the tracking is carried out until the boundary of the display area is met, for a closed contour line, the tracking is carried out until the starting point in the display area is returned, the position of the previous equivalent point on the contour line can be found, namely, the contour line is successfully tracked, and the processed contour line is obtained. The following describes the open contour tracking and the closed contour tracking, respectively.
With respect to the tracking calculation of the open contours to obtain the processed contours corresponding to each of the to-be-processed contours, the following steps may be taken: firstly, dividing a display area into a plurality of grid units according to preset grid parameters, if an isoline to be processed is an open isoline, acquiring a plurality of first intersection points of an edge grid unit positioned at the outermost layer in the plurality of grid units and the isoline to be processed, then acquiring a plurality of second intersection points of an internal grid unit and the isoline to be processed after determining an internal grid unit except the edge grid unit in the plurality of grid units, and finally determining the processed isoline according to the first intersection point and the plurality of second intersection points positioned on the edge line of the display area in parallel through a plurality of processing cores of a computing device.
In the implementation process, the display area is divided into a plurality of grid units according to preset grid parameters, when the contour line to be processed is an open contour line, a first intersection point and a second intersection point which are obtained by intersecting the contour line to be processed and the grid units are obtained, wherein the first intersection point is an intersection point of an edge grid unit positioned on the outermost layer in the grid units and the contour line to be processed, the second intersection point is an intersection point of an internal grid unit except the edge grid unit in the grid units and the contour line to be processed, and the contour line is tracked according to the first intersection point and the second intersection point.
And determining a plurality of second intersection points of the internal grid units except the edge grid unit and the contour line to be processed in the plurality of grid units by performing tracking calculation on the open contour line, and determining the processed contour line according to the plurality of second intersection points in parallel through a plurality of processing cores of the computing equipment.
In the implementation process, if the contour line to be processed is a closed contour line, the processed contour line can be determined according to a plurality of second intersection points of the internal grid units except the edge grid unit and the contour line to be processed in the grid units, and the contour line to be processed is tracked according to the intersection points of the grid units and the contour line to be processed, so that the accuracy of contour line tracking can be ensured.
For example, as shown in fig. 3, three contour lines to be processed are shown in fig. 3, including: two open contours a and b and one closed contour c, where for the contour a to be processed in fig. 3, the first intersection points of intersection with the grid cells have a1, a2, a10 and a11, while the first intersection points at the edge lines of the display area have only a1 and a11, so that contour tracing can be performed starting from a1, or starting from a11, and for the contour b to be processed in fig. 3, the first intersection points of intersection with the grid cells have b1, b2 and b3, while the first intersection points at the edge lines of the display area have only b1 and b3, so that contour tracing can be performed starting from b1, or starting from b3, and for the contour c to be processed in fig. 3, the second intersection points of intersection with the grid cells have c1, c2, c 6862, c 69556, c 828653, 368653, c 8653, and 368653 c 867, contour tracing can be performed starting from any one of the second intersection points, and contour tracing can also be performed starting from b 3.
In addition, the target tracking is performed in parallel according to a plurality of processing cores of the computing device, if the computing device has four processing cores, when the target tracking is performed, each processing core can simultaneously track the contour lines a, b, c and d to be processed respectively, the computing speed is improved, and after all contour lines are tracked, all the obtained processed contour lines are drawn in the corresponding display areas.
In the implementation process, parallel contour tracking calculation is carried out on a plurality of different obtained contour lines to be processed, processed contour lines corresponding to the contour lines to be processed are obtained, parallel calculation is carried out according to all processing cores of the computing equipment, the processing speed can be increased, the data processing efficiency is improved, and real-time performance of the weather guarantee service is further met.
As an implementation manner, a method of parallel interpolation calculation may be adopted to obtain a plurality of different to-be-processed contours, and the specific steps are as follows:
the display area is divided into a plurality of sub-areas according to the number of processing cores of the computing device.
And performing interpolation calculation on the station data in all the sub-areas in parallel through all the processing cores and acquiring a plurality of interpolation calculation results. The sub-regions interpolated by different processing cores are different, and each interpolation calculation result comprises at least one contour line segment.
And combining a plurality of contour line segments matched in the plurality of interpolation calculation results into the contour line to be processed so as to obtain a plurality of contour lines to be processed.
The parallel interpolation calculation method can exert the maximum processing performance of a computing device including a plurality of processing cores, for example, if the computing device has N processing cores, the display area may be divided into nN × M sub-areas, where N is a positive integer, specifically, if the computing device has 4 processing cores, the display area may be divided into 4 × 4 sub-areas according to the number of the processing cores of the computing device, as shown in fig. 4, the sub-areas are respectively represented as (0,0), (0,1), (0,2), (0,3), (1,0), (1,1), (1,2), (1,3), (2,0), (2,1), (2,2), (2,3), (3,0), (3,1), (3,2) and (3,3), and then the thread manager is started to perform interpolation calculation on the station data in all the sub-areas in parallel by the four processing cores, the first processing core may perform interpolation calculation on the station data in (0,0), (1,0), (2,0), and (3,0), the second processing core may perform interpolation calculation on the station data in (0,1), (1,1), (2,1), and (3,1), the third processing core may perform interpolation calculation on the station data in (0,2), (1,2), (2,2), and (3,2), and the fourth processing core may perform interpolation calculation on the station data in (0,3), (1,3) (2,3), and (3, 3).
And then synchronously waiting for the threads until the interpolation calculation of all the threads is finished, and combining the calculation results after the interpolation calculation results of all the threads are obtained. Because each interpolation calculation result comprises at least one contour line segment, a plurality of to-be-processed contours can be obtained after all the interpolation calculation results are combined.
According to the method, the display area is divided into a plurality of sub-areas according to the number of processing cores of the computing equipment, and then interpolation calculation is performed on the station data in the sub-areas in parallel through different processing cores, so that the acquisition speed of the contour line to be processed is increased, the data processing efficiency is improved, and the real-time performance of the weather guarantee service is further met.
In addition, because the values of some of the plurality of to-be-processed contours obtained according to the station data do not conform to the contour drawing rule, the to-be-processed contours can be filtered according to a certain condition or the contour drawing rule, for example, taking ground weather map analysis as an example, assuming that the current sea level air pressure contour extraction value range is read: [ X1, X2] at intervals of Δ P, the contours to be tracked include X1, X1+ Δ P, X1+2 Δ P, …, X2. At this time, if the number of the processing cores and the number of the contours are tracked, the thread tasks may be divided, for example, if the contour extraction value range is [990hPa,1030hPa ], the contour interval is 2.5hPa, the number of contours with different values is 16 in total, and if the CPU has 4 processing cores, 4 thread tasks may be allocated to each core.
Alternatively, a plurality of interpolation calculation results may be obtained by performing interpolation calculation on the station data in all the sub-areas in parallel by all the processing cores by using a reverse distance weighting method. The inverse distance weighting method is to obtain the variation relation corresponding to the interpolation point by obtaining the approximation relation between the interpolation point and the selected control point pair and the corresponding weight relation, the approximation function can be understood as the influence degree on the interpolation point p, the weight function can be regarded as the weight on the distance, and the longer the distance is, the smaller the weight is.
If the reverse distance weighting function
Figure BDA0002229591480000111
Wherein,
Figure BDA0002229591480000112
the specific steps for performing interpolation calculation are as follows:
the first step is as follows: the distances of the unknown points to all the points are calculated.
The second step is that: a weight is calculated for each point, wherein the weight is a function of the inverse of the distance.
The second step is that: calculation results
Figure BDA0002229591480000113
Wherein n is the number of control points selected to meet the condition, WiThe weight values of different control points.
The reverse distance weighting method is based on the principle of similar similarity, the distance between the interpolation point and the sample point is taken as the weight to carry out weighted average, the closer the sample point to the interpolation point, the greater the weight is given to the sample point, the method is simple and easy to implement, visual and high in efficiency, and therefore the contour line to be processed with higher accuracy can be obtained.
Based on the same inventive concept, the embodiment of the present application further provides a structural block diagram of the contour drawing apparatus 200. As shown in fig. 5, the apparatus may be a module, a program segment, or code on a computing device. It should be understood that the contour drawing apparatus 200 corresponds to the above-mentioned embodiment of the method of fig. 2, and can perform the steps related to the embodiment of the method of fig. 2, and the specific functions of the contour drawing apparatus 200 can be referred to the above description, and the detailed description is appropriately omitted here to avoid redundancy.
Optionally, the apparatus 200 for plotting a contour includes:
a to-be-processed contour line obtaining module 210, configured to obtain a plurality of different to-be-processed contour lines.
The contour processing module 220 is configured to perform contour tracking calculation on multiple different to-be-processed contours in parallel through all processing cores of the computing device, obtain a processed contour corresponding to each to-be-processed contour, and draw the processed contours in a display area, where the to-be-processed contours that are subjected to contour tracking calculation through different processing cores are different.
Optionally, the contour processing module 220 includes:
and the grid cell dividing unit is used for dividing the display area into a plurality of grid cells according to the preset grid parameters.
And the first intersection point acquisition unit is used for acquiring a plurality of first intersection points of the edge grid unit positioned at the outermost layer in the grid units and the contour line to be processed when the contour line to be processed is an open contour line.
And the second intersection point acquisition unit is used for determining the internal grid unit except the edge grid unit in the grid units and acquiring a plurality of second intersection points of the internal grid unit and the contour line to be processed.
And the contour processing unit is used for determining the processed contour through a plurality of processing cores of the computing equipment according to a first intersection point and a plurality of second intersection points which are positioned on the edge line of the display area in parallel in the plurality of first intersection points.
Optionally, the contour processing module 220 further comprises:
and the second intersection point acquisition unit is also used for determining a plurality of second intersection points of the internal grid units except the edge grid units in the grid units and the contour line to be processed when the contour line to be processed is a closed contour line.
And the contour processing unit is further used for determining the processed contour line according to the plurality of second intersection points in parallel through a plurality of processing cores of the computing equipment.
Optionally, the contour drawing apparatus 200 further comprises:
and the sub-region dividing module is used for dividing the display region into a plurality of sub-regions according to the number of the processing cores of the computing equipment.
And the interpolation calculation module is used for performing interpolation calculation on the station data in all the sub-areas in parallel through all the processing cores and acquiring a plurality of interpolation calculation results, wherein the sub-areas subjected to interpolation calculation through different processing cores are different, and each interpolation calculation result comprises at least one contour line segment.
And the contour line to be processed acquisition module is used for merging a plurality of contour line segments matched in the plurality of interpolation calculation results into a contour line to be processed so as to acquire a plurality of contour lines to be processed.
Optionally, the contour drawing apparatus 200 further comprises:
and the interpolation calculation module is also used for carrying out interpolation calculation on the station data in all the sub-areas in parallel by all the processing cores by adopting a reverse distance weighting method to obtain a plurality of interpolation calculation results.
The embodiment of the present application provides a readable storage medium, and when being executed by a processor, a computer program performs the method processes performed by the computing device in the method embodiment shown in fig. 2.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method, and will not be described in too much detail herein.
In summary, the present application provides a method, an apparatus, a computing device, and a readable storage medium for contour line rendering, where the method performs parallel contour line tracking calculation on a plurality of different to-be-processed contour lines obtained, and obtains a processed contour line corresponding to each to-be-processed contour line, where parallel calculation is performed according to all processing cores of the computing device, which can increase processing speed, thereby improving data processing efficiency, and further meeting weather guarantee service real-time performance.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (6)

1. A method of contour drawing, the method comprising:
acquiring a plurality of different contour lines to be processed;
performing contour tracking calculation on a plurality of different to-be-processed contours in parallel through all processing cores of a computing device, acquiring a processed contour corresponding to each to-be-processed contour, and drawing the processed contours in a display area, wherein before performing the contour tracking calculation on the to-be-processed contours, the to-be-processed contours are divided into a plurality of intervals within an extraction value range, and the to-be-processed contours in different intervals are processed by different processing cores;
performing contour tracking calculation on a plurality of different to-be-processed contours in parallel through all processing cores of the computing device to obtain a processed contour corresponding to each to-be-processed contour, including:
dividing the display area into a plurality of grid units according to preset grid parameters;
if the contour line to be processed is an open contour line, acquiring a plurality of first intersection points of the edge grid unit positioned at the outermost layer in the plurality of grid units and the contour line to be processed;
determining internal grid cells except the edge grid cells in the grid cells, and acquiring a plurality of second intersection points of the internal grid cells and the contour line to be processed;
determining, by a plurality of processing cores of the computing device, a processed contour line in parallel from a first intersection point of a plurality of first intersection points located on the display area edge line and the plurality of second intersection points;
after the display area is divided into a plurality of grid units according to the preset grid parameters, the method comprises the following steps:
if the contour line to be processed is a closed contour line, determining a plurality of second intersection points of the internal grid units except the edge grid units in the grid units and the contour line to be processed;
determining, by a plurality of processing cores of the computing device, a processed contour from the plurality of second intersections in parallel.
2. The contour drawing method according to claim 1, wherein before said obtaining a plurality of different to-be-processed contours, said method further comprises:
dividing a display area into a plurality of sub-areas according to the number of processing cores of the computing equipment;
performing interpolation calculation on the station data in all the sub-areas in parallel through all the processing cores and acquiring a plurality of interpolation calculation results, wherein the sub-areas interpolated through different processing cores are different, and each interpolation calculation result comprises at least one contour line segment;
and combining a plurality of contour line segments matched in a plurality of interpolation calculation results into a contour line to be processed so as to obtain a plurality of contour lines to be processed.
3. The contour drawing method according to claim 2, wherein said interpolating station data in all the sub-regions in parallel by all the processing cores and obtaining a plurality of interpolation results comprises:
and performing interpolation calculation on the station data in all the sub-areas in parallel by all the processing cores by adopting a reverse distance weighting method to obtain a plurality of interpolation calculation results.
4. An apparatus for contour drawing, the apparatus comprising:
the contour line processing device comprises a contour line acquisition module to be processed, a contour line processing module and a contour line processing module, wherein the contour line acquisition module is used for acquiring a plurality of different contour lines to be processed;
the contour processing module is used for performing contour tracking calculation on a plurality of different to-be-processed contours in parallel through all processing cores of the computing equipment, acquiring a processed contour corresponding to each to-be-processed contour, and drawing the processed contour in a display area, wherein before the contour tracking calculation is performed on the to-be-processed contours, the to-be-processed contours are divided into a plurality of intervals within an extraction value range, and different processing cores process the to-be-processed contours in different intervals;
the contour processing module comprises:
the grid cell dividing unit is used for dividing the display area into a plurality of grid cells according to preset grid parameters;
a first intersection point obtaining unit, configured to obtain, when the to-be-processed contour line is an open contour line, a plurality of first intersection points between an outermost edge mesh cell of the plurality of mesh cells and the to-be-processed contour line;
a second intersection point obtaining unit, configured to determine an internal grid unit, excluding the edge grid unit, in the multiple grid units, and obtain multiple second intersection points between the internal grid unit and the to-be-processed contour line;
a contour processing unit for determining, by a plurality of processing cores of the computing device, a processed contour in parallel from a first intersection point located on the edge line of the display area among a plurality of first intersection points and the plurality of second intersection points;
the contour processing module further comprises:
the second intersection point acquisition unit is further used for determining a plurality of second intersection points of the internal grid units except the edge grid units in the grid units and the contour line to be processed when the contour line to be processed is a closed contour line;
and the contour processing unit is further used for determining a processed contour according to the plurality of second intersection points in parallel through a plurality of processing cores of the computing equipment.
5. A computing device comprising a processor and a memory, the memory storing computer readable instructions which, when executed by the processor, perform the steps of the method of any one of claims 1 to 3.
6. A readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 3.
CN201910966981.8A 2019-10-11 2019-10-11 Contour line drawing method and device, computing equipment and readable storage medium Active CN110675470B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910966981.8A CN110675470B (en) 2019-10-11 2019-10-11 Contour line drawing method and device, computing equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910966981.8A CN110675470B (en) 2019-10-11 2019-10-11 Contour line drawing method and device, computing equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN110675470A CN110675470A (en) 2020-01-10
CN110675470B true CN110675470B (en) 2021-02-19

Family

ID=69081900

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910966981.8A Active CN110675470B (en) 2019-10-11 2019-10-11 Contour line drawing method and device, computing equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN110675470B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112614207B (en) * 2020-12-17 2024-03-12 航天宏图信息技术股份有限公司 Contour line drawing method, device and equipment
CN112991489B (en) * 2021-04-07 2021-11-05 中科三清科技有限公司 Isobaric line drawing method and device, electronic equipment and storage medium
CN117274360A (en) * 2023-08-15 2023-12-22 昆仑数智科技有限责任公司 Contour map-based contour line area calculation method, device and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103617594A (en) * 2013-12-16 2014-03-05 中国民航大学 Noise isopleth-surface drawing-oriented multi-GPU (Graphics Processing Unit) rendering parallel-processing device and method thereof
CN106652032A (en) * 2016-09-30 2017-05-10 电子科技大学 DEM parallel contour line generation method based on Linux cluster platform
CN110197013A (en) * 2019-05-14 2019-09-03 南京泛在地理信息产业研究院有限公司 Riverbed bedrock surface modeling method based on Morphing

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1797030A (en) * 2004-12-29 2006-07-05 中国石油天然气集团公司 Method for plotting structural diagram of contour line of complex normal fault
CN101661514B (en) * 2008-05-21 2014-04-16 中国石化股份胜利油田分公司地质科学研究院 Oil deposit black oil model numerical simulation system
CN103440434B (en) * 2013-09-22 2016-10-05 吉林大学 The computational methods of a kind of extensive hybrid grid contour and system
CN104331389B (en) * 2014-11-21 2017-08-08 南京南瑞集团公司 Contour tracing algorithm based on 8 methods
CN105426605B (en) * 2015-11-12 2018-10-23 中国民航大学 Multi-screen Three-dimensional Track and noise contours real-time display method
CN108254784B (en) * 2017-12-11 2020-09-08 中国石油天然气股份有限公司 Fault identification method, device and system based on two-dimensional seismic data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103617594A (en) * 2013-12-16 2014-03-05 中国民航大学 Noise isopleth-surface drawing-oriented multi-GPU (Graphics Processing Unit) rendering parallel-processing device and method thereof
CN106652032A (en) * 2016-09-30 2017-05-10 电子科技大学 DEM parallel contour line generation method based on Linux cluster platform
CN110197013A (en) * 2019-05-14 2019-09-03 南京泛在地理信息产业研究院有限公司 Riverbed bedrock surface modeling method based on Morphing

Also Published As

Publication number Publication date
CN110675470A (en) 2020-01-10

Similar Documents

Publication Publication Date Title
CN110675470B (en) Contour line drawing method and device, computing equipment and readable storage medium
CN110543473B (en) Crowdsourcing data fusion optimization method and device and storage medium
CN109472871A (en) A kind of method for reconstructing three-dimensional model, system and electronic equipment
CN108595613A (en) GIS local maps edit methods and device
CN116539053A (en) Real-time global point cloud map construction method, system, equipment and storage medium
CN109871743B (en) Text data positioning method and device, storage medium and terminal
CN112614207B (en) Contour line drawing method, device and equipment
CN107239664A (en) A kind of ground mulching surface area rasterizing computational methods and device
CN111309835B (en) Processing method, system and equipment for spatial data visualization
CN111489386B (en) Point cloud characteristic point extraction method, device, storage medium, equipment and system
CN116824358A (en) Ridge type identification method and device based on morphological characteristics
CN116596750A (en) Point cloud processing method and device, electronic equipment and storage medium
CN110210576A (en) A kind of the figure spot similarity calculation method and system of map datum
CN115907159A (en) Method, device, equipment and medium for determining similar path typhoon
CN113723405A (en) Method and device for determining area outline and electronic equipment
CN114138925A (en) Location point belonging area retrieval method, device, electronic equipment, medium and product
CN112487124A (en) Method for converting dot-shaped elements in CorelDraw map into SuperMap by using VBA
Wu et al. An object detection method for catenary component images based on improved Faster R-CNN
CN116051925B (en) Training sample acquisition method, device, equipment and storage medium
Gong et al. Vanishing point detection method based on constrained classification for checkpoints on urban roads
CN117194591B (en) Method, device, equipment and medium for displaying sphere track to plane map
CN115858895B (en) Multi-source heterogeneous data processing method and system for smart city
CN112348949B (en) Three-dimensional annotation drawing method and system for tunnel advanced geological forecast abnormal body
CN109472777B (en) Bridge detection method based on FPGA heterogeneous computation
CN115480650A (en) Data enhancement method and device, electronic equipment and 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
CP03 Change of name, title or address

Address after: 100195 Room 301, 3 / F, building 5, zone 4, Xishan Creative Park, Haidian District, Beijing

Patentee after: Aerospace Hongtu Information Technology Co.,Ltd.

Address before: 100144 Room 301, 3 / F, building 5, zone 4, Xishan Creative Park, Haidian District, Beijing

Patentee before: BEIJING PIESAT INFORMATION TECHNOLOGY Co.,Ltd.

CP03 Change of name, title or address