CN116346138A - GIS discrete data compression method and device, electronic equipment and storage medium - Google Patents

GIS discrete data compression method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116346138A
CN116346138A CN202310152951.XA CN202310152951A CN116346138A CN 116346138 A CN116346138 A CN 116346138A CN 202310152951 A CN202310152951 A CN 202310152951A CN 116346138 A CN116346138 A CN 116346138A
Authority
CN
China
Prior art keywords
point
discrete
discrete data
gis
data set
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.)
Pending
Application number
CN202310152951.XA
Other languages
Chinese (zh)
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.)
Shanghai Jiudao Information Technology Co ltd
Original Assignee
Shanghai Jiudao 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 Shanghai Jiudao Information Technology Co ltd filed Critical Shanghai Jiudao Information Technology Co ltd
Priority to CN202310152951.XA priority Critical patent/CN116346138A/en
Publication of CN116346138A publication Critical patent/CN116346138A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/30Polynomial surface description
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/3066Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction by means of a mask or a bit-map
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/3084Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction using adaptive string matching, e.g. the Lempel-Ziv method
    • H03M7/3086Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction using adaptive string matching, e.g. the Lempel-Ziv method employing a sliding window, e.g. LZ77
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Algebra (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention discloses a GIS discrete data compression method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: compressing GIS discrete data by using a Targelas-Prak algorithm to obtain a first discrete data set; splitting the first discrete data set into at least two second discrete data sets by performing inflection point detection on the first discrete data set; sequentially segmenting at least one discrete point group from the second discrete data set, and taking an ending point in a previous discrete point group in the segmented adjacent two discrete point groups as a starting point of a next discrete point group when the number of the discrete point groups in the at least one discrete point group is more than two; and determining a second-order Bezier curve corresponding to the GIS discrete data according to the starting point, the ending point and the on-line point included in the at least one discrete point group. The method can improve the transmission efficiency and the processing speed of discrete data points and greatly save the storage resources of the system.

Description

GIS discrete data compression method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and apparatus for compressing GIS discrete data, an electronic device, and a storage medium.
Background
With the development of scientific technology, GIS (geographic information system ) discrete point data is rapidly growing, and data visualization is not utilized.
In the related scheme, although the GIS discrete point data can be compressed through the traditional data compression algorithm, the data quantity in the data transmission or transfer process can be reduced, and the original data can be fitted by a small amount of data. However, the data compression algorithm may not compress the GIS discrete data effectively when compressing, or the compression process is still not satisfactory, so that the subsequent calculation amount is still relatively large, and further, the transmission efficiency and the processing speed of the subsequent data cannot be improved effectively.
Disclosure of Invention
The invention provides a GIS discrete data compression method, a device, electronic equipment and a storage medium, which are used for solving the problems of low transmission efficiency and processing speed of discrete data points.
According to an aspect of the present invention, there is provided a GIS discrete data compression method, including:
compressing GIS discrete data through a Tagella-Prak algorithm to obtain a first discrete data set, wherein the first discrete data set belongs to a plane curve discrete data point set, and each discrete data point corresponds to an abscissa position and an ordinate position;
Splitting the first discrete data set into at least two second discrete data sets by performing inflection point detection on the first discrete data set;
sequentially slicing at least one discrete point group from the second discrete data set, wherein the discrete data points in the discrete point group are respectively applied to a starting point and an ending point required for solving a second-order Bezier curve control point and a line point on a plane curve, wherein the line point is positioned between the starting point and the ending point, and when the number of the discrete point groups in the at least one discrete point group is greater than two, the ending point in the previous discrete point group in the sliced adjacent two discrete point groups is used as the starting point of the next discrete point group;
and determining a second-order Bezier curve corresponding to the GIS discrete data according to the starting point, the ending point and the on-line point included in the at least one discrete point group.
According to another aspect of the present invention, there is provided a GIS discrete data compression apparatus, the apparatus comprising:
the coordinate position determining module is used for compressing GIS discrete data through a Tagella-Prak algorithm to obtain a first discrete data set, wherein the first discrete data set belongs to a plane curve discrete data point set, and each discrete data point corresponds to an abscissa position and an ordinate position;
The discrete data set determining module is used for dividing the first discrete data set into at least two second discrete data sets by carrying out inflection point detection on the first discrete data set;
the discrete point group determining module is used for sequentially cutting at least one discrete point group from the second discrete data set, wherein the discrete data points in the discrete point group respectively correspond to a starting point required by solving a second-order Bezier curve control point, an ending point and a point on a line between the starting point and the ending point on a plane curve, and when the number of the discrete point groups in the at least one discrete point group is greater than two, the ending point in the previous discrete point group in the adjacent two cut discrete point groups is used as the starting point of the next discrete point group;
and the curve determining module is used for determining a second-order Bezier curve corresponding to the GIS discrete data according to the starting point, the ending point and the on-line point included in the at least one discrete point group.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the GIS discrete data compression method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the GIS discrete data compression method according to any one of the embodiments of the present invention when executed.
According to the technical scheme, the first discrete data set is obtained by compressing GIS discrete data through the Tagella-Prak algorithm, the inflection point of the first discrete data set is detected, the first discrete data set is divided into at least two second discrete data sets through the inflection point, at least one discrete point group comprising three discrete points is divided from the second discrete data sets, and a second-order Bezier curve corresponding to the GIS discrete data is determined through the discrete point group.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a GIS discrete data compression method according to a first embodiment of the present invention;
fig. 2 is a flowchart of a GIS discrete data compression method according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram of a first discrete data set generated after a threshold value of thinning is set according to a GIS discrete data compression method provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram of detecting inflection points within GIS discrete data points according to the GIS discrete data compression method provided by the embodiment of the present invention;
FIG. 5 is a flow chart of a GIS discrete data compression method for compressing a discrete data set according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a GIS discrete data compression device according to a third embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device implementing the GIS discrete data compression method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a GIS discrete data compression method according to an embodiment of the present invention, where the method may be performed by a GIS discrete data compression device, and the GIS discrete data compression device may be implemented in hardware and/or software, and the GIS discrete data compression device may be configured in any electronic device having a network communication function. As shown in fig. 1, the method includes:
s110, compressing GIS discrete data through a Targes-Puck algorithm to obtain a first discrete data set, wherein the first discrete data set belongs to a plane curve discrete data point set, and each discrete data point corresponds to an abscissa position and an ordinate position.
The dagger-pock algorithm can be an algorithm for compressing a large amount of redundant GIS discrete data and extracting necessary data points.
Specifically, the discrete data of the GIS is compressed through the Targelas-Puck algorithm to obtain a first discrete data set belonging to a plane curve discrete data point set, and each discrete data point is distributed on a two-dimensional coordinate system, namely, each discrete data point corresponds to an abscissa position and an ordinate position.
S120, the first discrete data set is segmented into at least two second discrete data sets by inflection point detection on the first discrete data set.
Wherein the inflection point may be a data point that distinguishes different line segment data in the first discrete data set.
Specifically, an inflection point detection algorithm is applied to conduct inflection point detection on the first discrete data set, and the first discrete data set is segmented into at least two second discrete data sets according to inflection point information.
S130, sequentially segmenting at least one discrete point group from the second discrete data set, wherein the discrete data points in the discrete point group are respectively applied to a starting point and an ending point required by solving a second-order Bezier curve control point and a line point on a plane curve, wherein the line point is positioned between the starting point and the ending point, and when the number of the discrete point groups in the at least one discrete point group is greater than two, the ending point in the previous discrete point group in the segmented adjacent two discrete point groups is used as the starting point of the next discrete point group.
Specifically, a dataset slicing algorithm is applied to sequentially slice at least one discrete point group from a second discrete dataset, wherein the discrete data points in the discrete point group comprise a starting point, an ending point, a point between the starting point and the ending point of a plane curve and positioned on the plane curve, and if two adjacent discrete point groups are sequentially sliced from the second discrete dataset, the ending point in the previous discrete point group is used as the starting point of the next discrete point group.
And S140, determining a second-order Bezier curve corresponding to the GIS discrete data according to the starting point, the ending point and the on-line point included in the at least one discrete point group.
Specifically, a second-order Bezier curve corresponding to GIS discrete data is drawn according to the Bezier curve according to a starting point and an ending point in at least one discrete point group and a point between the starting point and the ending point on the plane curve.
The embodiment of the invention provides a GIS discrete data compression method, which is characterized in that a first discrete data set is obtained by compressing GIS discrete data through a Douglas-Prak algorithm, inflection points of the first discrete data set are detected, the first discrete data set is divided into at least two second discrete data sets through the inflection points, at least one discrete point group comprising three discrete points is divided from the second discrete data sets, and a second-order Bezier curve corresponding to the GIS discrete data is determined through the discrete point groups.
Example two
Fig. 2 is a flowchart of a GIS discrete data compression method according to a second embodiment of the present invention, where the GIS discrete data compression method is described in detail on the basis of the foregoing embodiment. As shown in fig. 2, the method includes:
s210, compressing GIS discrete data through a Targes-Puck algorithm to obtain a first discrete data set, wherein the first discrete data set belongs to a plane curve discrete data point set, and each discrete data point corresponds to an abscissa position and an ordinate position.
Specifically, based on the Douglas-pock algorithm, the GIS discrete data is compressed to obtain a first discrete data set belonging to a plane curve discrete data point set, and each discrete data point is distributed on an abscissa and ordinate system.
As an alternative but not limiting implementation manner, compressing GIS discrete data by the douglas-pock algorithm to obtain a first discrete data set may include steps A1-A2:
and A1, converting the GIS discrete data into a two-dimensional data format, and determining a thinning threshold value by analyzing the distribution of discrete data points corresponding to the GIS discrete data.
Specifically, converting GIS discrete data into a two-dimensional data format containing coordinate positions, drawing a curve according to the discrete data points of the GIS discrete data, identifying the coordinate positions of a starting point and an ending point in the GIS discrete data, drawing a connecting line of the starting point and the ending point in the GIS discrete data, and determining the thinning threshold of the discrete data points according to the coordinate positions of the discrete data points.
The method includes converting GIS discrete data into a two-dimensional data format containing coordinate positions, mapping discrete data points of the GIS discrete data into a coordinate system containing an abscissa axis, connecting a starting point and an ending point of the GIS discrete data to be processed by using a dotted line, and determining a thinning threshold value threshold according to the distribution of the discrete data points.
And A2, compressing discrete data points corresponding to the GIS discrete data by adopting a Fabry-Perot algorithm based on the thinning threshold to obtain a first discrete data set.
Specifically, the first discrete data set is obtained by combining the thinning threshold and compressing discrete data points corresponding to GIS discrete data according to the Targelas-Puck algorithm.
Illustratively, the distance between the discrete data points except the starting point and the ending point in the GIS discrete data and the dotted line is calculated, the maximum distance dmax is found and compared with the threshold value threshold, and if dmax is smaller than threshold, the discrete data points except the starting point and the ending point in the GIS discrete data are omitted; if dmax is greater than or equal to threshold, dividing the curve formed by the discrete data points corresponding to dmax into two parts by taking the discrete data points corresponding to dmax as a boundary, and circularly executing the steps A1-A2 according to the discrete data points corresponding to the two parts of the curve until all the discrete data points are processed, so as to obtain a step diagram of the discrete data points in the compressed GIS discrete data, as shown in figure 3.
S220, the first discrete data set is segmented into at least two second discrete data sets by inflection point detection on the first discrete data set.
Specifically, the inflection point is detected by a plane curve discrete point inflection point detection method, and the first discrete data is divided into at least two discrete data sets according to the inflection point.
As an alternative but non-limiting implementation, the segmentation of the first discrete data set into at least two second discrete data sets by inflection point detection of the first discrete data set may comprise steps B1-B5:
step B1, determining at least four discrete data points in succession from the first discrete data set.
Specifically, at least four consecutive discrete data points in the first discrete data set are determined.
And B2, determining a classification result of a third discrete data point relative to a first forward straight line according to the abscissa of a first discrete data point and the abscissa of a second discrete data point in the continuous at least four discrete data points, wherein the first forward straight line is a directional straight line which has the direction of the first discrete data point and the second discrete data point and passes through the first discrete data point and the second discrete data point, and the classification result relative to the first forward straight line comprises an inner point belonging to the first forward straight line or an outer point belonging to the first forward straight line.
Specifically, according to the abscissa of the first discrete data point and the second discrete data point, the first discrete data point and the second discrete data point are connected, the connecting line can be understood as a vector with a direction, the classifying result of the third discrete data point relative to the first forward straight line is calculated as the first forward straight line, if the third discrete data point belongs to an inner point or an outer point of the first forward straight line, the classifying result of the third discrete data point and the first forward straight line is stored in a variable corresponding to the first forward straight line.
Exemplary, the first discrete data point and the second discrete data point form a vector S 12 Calculate the vector S 12 With a third discrete data point (x 3 ,y 3 ) And store the classification result to the variable S 1 This process can be expressed as: s is S 12 (x 3 ,y 3 )→S 1
Step B3, determining a classification result of a fourth discrete data point relative to a second forward straight line according to the abscissa of a second discrete data point and the abscissa of a third discrete data point in the continuous at least four discrete data points, wherein the second forward straight line is a directional straight line which has the direction of the second discrete data point and the third discrete data point and passes through the second discrete data point and the third discrete data point, and the classification result relative to the second forward straight line comprises an inner point belonging to the second forward straight line or an outer point belonging to the second forward straight line;
Specifically, according to the abscissa of the second discrete data point and the third discrete data point, the second discrete data point and the third discrete data point are connected, the connecting line can be understood as a vector with a direction, the classifying result of the fourth discrete data point relative to the second forward straight line is calculated as the second forward straight line, if the fourth discrete data point belongs to an inner point or an outer point of the second forward straight line, the classifying result of the fourth discrete data point and the second forward straight line is stored in a variable corresponding to the first forward straight line.
Exemplary, the second discrete data point and the third discrete data point form a vector S 23 Calculate vector quantity S 23 With the fourth discrete data point (x 4 ,y 4 ) And store the classification result to the variable S 2 In this process, this process can representThe method comprises the following steps: s is S 23 (x 4 ,y 4 )→S 2
For example, more discrete data points than the fourth discrete data point, the classification result of the variable and the discrete data point should be calculated according to the following rule, and the classification result is stored to the variable S 2 In the following rules:
for discrete data points i=3, 4, …, n-1, calculate S i-1i (x i+1 ,y i+1 ) And store the classification result to the variable S 2 Can be expressed as S i-1i (x i+1 ,y i+1 )→S 2
And B4, determining whether a third discrete data point in the continuous at least four discrete data points belongs to an inflection point in the first discrete data set according to the classification result relative to the first forward straight line and the classification result relative to the second forward straight line.
Specifically, it is determined whether a third discrete data point of the continuous at least four discrete data points belongs to an inflection point in the first discrete data set according to a product of the relative first forward straight line classification result and the relative second forward straight line classification result.
Illustratively, the variable S obtained according to the above steps 1 And S is 2 And then judge S 1 ·S 2 Whether or not the data point is smaller than zero, if so, indicating that the third discrete data point belongs to the inflection point in the first discrete data set, otherwise, the variable S 2 The value of (2) is stored at S 1 In, S 2 →S 1 Vacated variable S 2 For determining whether the next discrete data point is an inflection point.
And B5, cutting the first discrete data set according to the inflection points determined from the first discrete data set to obtain at least two second discrete data sets.
Illustratively, as shown in FIG. 4, steps B2-B4 are repeated to determine the inflection point in the first discrete data set, and the first discrete data set is segmented into at least two discrete data sets according to the inflection point.
S230, sequentially segmenting at least one discrete point group from the second discrete data set, wherein the discrete data points in the discrete point group are respectively applied to a starting point and an ending point required by solving a second-order Bezier curve control point and a line point on a plane curve, wherein the line point is positioned between the starting point and the ending point, and when the number of the discrete point groups in the at least one discrete point group is greater than two, the ending point in the previous discrete point group in the segmented adjacent two discrete point groups is used as the starting point of the next discrete point group.
Specifically, a sliding window algorithm is applied to sequentially segment at least one discrete point group from the second discrete data set, wherein the discrete point group comprises a starting point, an ending point and discrete data points positioned between the starting point and the ending point on the plane curve, and if two continuous discrete point groups are segmented from the second discrete data set, the ending point in the former discrete point group is used as the starting point of the latter discrete point group.
As an alternative but non-limiting implementation, sequentially slicing at least one discrete point group from the second discrete dataset may include steps C1-C2:
and C1, sequentially sliding the cut second discrete data set on each discrete data point of the second discrete data set through a preset sliding window according to a preset sliding step length, wherein the preset sliding step length is two discrete data points, and the preset sliding window size is three discrete data points.
Specifically, for the second discrete data set, according to a sliding window algorithm, three discrete data points are segmented on each discrete data point of the second discrete data set according to a preset sliding step length of the two discrete data points until the preset sliding window moves to the position of the last less than three discrete data points of the second discrete data set according to the sliding step length.
And C2, taking the discrete data points in the preset sliding window after each sliding as a discrete point group, and obtaining at least one discrete point group after sliding for a plurality of times.
Specifically, three discrete data points of a preset sliding window are obtained according to each sliding of the preset sliding step length of the two discrete data points on the second discrete data set, and at least one discrete point group is obtained through multiple sliding of the step length.
S240, determining a second-order Bezier curve control point corresponding to the single discrete point group according to the determined starting point, the end point and the on-line point included in the single discrete point group.
Specifically, a starting point, an ending point and an on-line point in a single discrete point group are input into an algorithm for determining a second-order Bezier curve, and a second-order Bezier curve control point corresponding to the single discrete point group is obtained.
As an alternative but not limiting implementation manner, determining the second order bezier curve control point corresponding to the single discrete point group according to the determined start point, the end point and the on-line point included in the single discrete point group may include steps D1-D2:
and D1, determining the position proportion of the point on the central line of the single discrete point group in the corresponding second-order Bezier curve central line according to the first distance and the second distance.
Wherein the first distance may be the distance from the start point to the on-line point in a single set of discrete points; the second distance may be the distance from the point on the line to the end point in a single set of discrete points.
Specifically, the ratio of the point-on-line division second-order Bezier curve in the single discrete point group is determined according to the first distance and the second distance, namely the ratio of the distance between the starting point in the single discrete point group and the point-on-line and the distance between the point-on-line and the ending point.
Illustratively, points on a line in a single discrete point set divide a first distance from a second distance, and coordinates of points on any line on a second order Bezier curve are determined according to the following formula, based on the ratio of the positions of points on the line on the second order Bezier curve.
ratio=DIS bgn_lin /(DIS bgn_lin +DIS lin_end )
Wherein DIS is bgn_lin DIS is the distance from the start point to the point on the line in a single discrete point set lin_end Is the distance from the point on the line to the end point in a single discrete point set.
P ratio =(1-ratio) 2 ·P begin +2·ratio·(1-ratio)·P control +ratio 2 ·P end
Wherein P is begin For the bezier curve starting point, P end For Bezier curve end point, P control For Bezier curve control points, ratio is the position proportion of points on the centerline of the corresponding second-order Bezier curve in a single discrete point group, P ratio Is the actual position of the point on the line in the corresponding second-order Bezier curve in the single discrete point group.
And D2, reversely pushing second-order Bezier curve control points corresponding to the single discrete point group according to the proportion of the discrete point group and the point position on the line.
The second-order Bezier curve is drawn according to the discrete point group distribution, and the second-order Bezier curve control points corresponding to the single discrete point group are reversely deduced according to the line point position proportion of the second-order Bezier curve, and the coordinate calculation formula of the second-order Bezier curve reversely deduced control points is as follows:
P control =(P ratio -ratio 2 ·P end -(1-ratio) 2 ·P begin )/(2·ratio·(1-ratio))
s250, determining a corresponding second-order Bezier curve in the single discrete point group according to the second-order Bezier curve control points corresponding to the single discrete point group.
Specifically, a second-order bezier curve control point corresponding to the single discrete point group is determined according to S240, and a second-order bezier curve is drawn more finely according to the second-order bezier curve control point.
And S260, determining a second-order Bezier curve corresponding to the GIS discrete data according to the second-order Bezier curve corresponding to the at least one discrete point group.
Specifically, according to the determined starting point, the termination point and the on-line point included in the single discrete point group, the determined starting point, the termination point and the on-line point are input into a formula for determining the second-order bezier curve control point, that is, the formula in S240, and the second-order bezier curve corresponding to the GIS discrete data is drawn according to the second-order bezier curve control point.
In this embodiment of the present application, as shown in fig. 5, data to be compressed is input, a first discrete data set is obtained by determining a thinning threshold of GIS discrete data and compressing discrete data points corresponding to the GIS discrete data in combination with a daggera-pramipexole algorithm, an inflection point of the first discrete data set is detected, the first discrete data set is split into at least two second discrete data sets, each second discrete data set is split into three discrete points according to a sliding window algorithm, control points on a second-order Bezier curve are calculated according to the three discrete points, and a second-order Bezier curve is drawn.
The embodiment of the invention provides a GIS discrete data compression method, which comprises the steps of compressing GIS discrete data through a Tagella-Prak algorithm to obtain a first discrete data set, detecting inflection points of the first discrete data set through a rapid detection method of inflection points of a plane curve discrete data point set, dividing the first discrete data set into at least two second discrete data sets through the inflection points, dividing at least one discrete point group comprising three discrete points from the second discrete data sets, respectively corresponding to data of a second-order Bezier curve control point through discrete data points of the discrete point group, determining a second-order Bezier curve corresponding to the single discrete point group according to the second-order Bezier curve control point, and determining a second-order Bezier curve corresponding to the GIS discrete data. According to the technical scheme, the data compression method based on the Target Laplace-Prak algorithm and the rapid detection method of inflection points of the plane curve discrete data point set can improve the transmission efficiency and the processing speed of discrete data points, and greatly save the storage resources of a system.
Example III
Fig. 6 is a schematic structural diagram of a GIS discrete data compression device according to a third embodiment of the present invention. As shown in fig. 6, the apparatus includes:
The coordinate position determining module 310 is configured to compress the GIS discrete data by using a daggera-plck algorithm to obtain a first discrete data set, where the first discrete data set belongs to a plane curve discrete data point set, and each discrete data point corresponds to an abscissa position and an ordinate position;
a discrete data set determining module 320, configured to segment the first discrete data set into at least two second discrete data sets by performing inflection point detection on the first discrete data set;
a discrete point group determining module 330, configured to sequentially segment at least one discrete point group from the second discrete data set, where discrete data points in the discrete point group correspond to a start point, an end point, and a point on a line between the start point and the end point on a plane curve required for solving a second-order bezier curve control point, and when the number of discrete point groups in the at least one discrete point group is greater than two, an end point in a previous discrete point group in the two adjacent segmented discrete point groups is used as a start point of a subsequent discrete point group;
the curve determining module 340 is configured to determine a second-order bezier curve corresponding to the GIS discrete data according to a start point, an end point, and an on-line point included in the at least one discrete point group.
Further, the coordinate position determination module 310 includes:
the thinning threshold determining unit is used for converting the GIS discrete data into a two-dimensional data format and determining a thinning threshold by analyzing the distribution of discrete data points corresponding to the GIS discrete data;
the first discrete data set determining unit is used for compressing the discrete data points corresponding to the GIS discrete data by adopting a Fabry-Perot algorithm based on the thinning threshold value to obtain a first discrete data set.
Further, the discrete data set determination module 320 includes:
a discrete data point determination unit for determining at least four discrete data points in succession from the first discrete data set;
a first classification result determining unit, configured to determine, according to an abscissa of a first discrete data point and an abscissa of a second discrete data point in the continuous at least four discrete data points, a classification result of a third discrete data point relative to a first forward straight line, where the first forward straight line is a directional straight line having a direction in which the first discrete data point and the second discrete data point are located and passing through the first discrete data point and the second discrete data point, and the classification result relative to the first forward straight line includes an inner point belonging to the first forward straight line or an outer point belonging to the first forward straight line;
A second classification result determining unit, configured to determine, according to an abscissa of a second discrete data point and an abscissa of a third discrete data point in the continuous at least four discrete data points, a classification result of a fourth discrete data point relative to a second forward straight line, where the second forward straight line is a directional straight line having a direction in which the second discrete data point and the third discrete data point are located and passing through the second discrete data point and the third discrete data point, and the classification result relative to the second forward straight line includes an inner point belonging to the second forward straight line or an outer point belonging to the second forward straight line;
an inflection point judging unit for determining whether a third discrete data point of the continuous at least four discrete data points belongs to an inflection point in the first discrete data set according to a classification result relative to the first forward straight line and a classification result relative to the second forward straight line;
the data set dividing unit is used for dividing the first discrete data set according to the inflection points determined from the first discrete data set to obtain at least two second discrete data sets.
Further, the starting point determining module 330 includes:
the sequential sliding unit is used for sequentially sliding the cut second discrete data set on each discrete data point of the second discrete data set through a preset sliding window according to a preset sliding step length, wherein the preset sliding step length is two discrete data points, and the preset sliding window size is three discrete data points;
The discrete point group acquisition unit is used for taking the discrete data points in the preset sliding window after each sliding as a discrete point group, and obtaining at least one discrete point group after sliding for a plurality of times.
Further, the curve determination module 340 includes:
the curve control point determining unit is used for determining a second-order Bezier curve control point corresponding to the single discrete point group according to the determined starting point, the end point and the on-line point included in the single discrete point group;
the first curve determining unit is used for determining a corresponding second-order Bezier curve in the single discrete point group according to the second-order Bezier curve control points corresponding to the single discrete point group;
the second curve determining unit is used for determining a second-order Bezier curve corresponding to the GIS discrete data according to the second-order Bezier curve corresponding to the at least one discrete point group.
Further, the curve control point determining unit is specifically configured to:
for a single discrete point group, determining a first distance from a starting point to an on-line point in the single discrete point group and a second distance from the on-line point to an ending point in the single discrete point group;
determining the position proportion of the point on the central line of the single discrete point group in the corresponding second-order Bezier curve according to the first distance and the second distance;
And reversely pushing the second-order Bezier curve control points corresponding to the single discrete point group according to the proportion of the discrete point group and the point position on the line.
The GIS discrete point data compression device provided by the embodiment of the invention can execute the GIS discrete point data compression method provided by any embodiment of the invention, has the corresponding functions and beneficial effects of executing the GIS discrete point data compression method, and the detailed process refers to the related operation of the GIS discrete point data compression method in the embodiment.
Example IV
Fig. 7 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 7, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the GIS discrete data compression method.
In some embodiments, the GIS discrete data compression method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the GIS discrete data compression method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the GIS discrete data compression method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for compressing GIS discrete point data, the method comprising:
compressing GIS discrete data through a Tagella-Prak algorithm to obtain a first discrete data set, wherein the first discrete data set belongs to a plane curve discrete data point set, and each discrete data point corresponds to an abscissa position and an ordinate position;
splitting the first discrete data set into at least two second discrete data sets by performing inflection point detection on the first discrete data set;
Sequentially slicing at least one discrete point group from the second discrete data set, wherein the discrete data points in the discrete point group are respectively applied to a starting point and an ending point required for solving a second-order Bezier curve control point and a line point on a plane curve, wherein the line point is positioned between the starting point and the ending point, and when the number of the discrete point groups in the at least one discrete point group is greater than two, the ending point in the previous discrete point group in the sliced adjacent two discrete point groups is used as the starting point of the next discrete point group;
and determining a second-order Bezier curve corresponding to the GIS discrete data according to the starting point, the ending point and the on-line point included in the at least one discrete point group.
2. The method of claim 1, wherein compressing the GIS discrete data by a douglas-pock algorithm to obtain the first discrete data set comprises:
converting the GIS discrete data into a two-dimensional data format, and determining a thinning threshold value by analyzing the distribution of discrete data points corresponding to the GIS discrete data;
and compressing discrete data points corresponding to the GIS discrete data by adopting a Taturn-Puck algorithm based on the thinning threshold to obtain a first discrete data set.
3. The method of claim 1, wherein slicing the first discrete data set into at least two second discrete data sets by inflection point detection of the first discrete data set comprises:
determining at least four discrete data points that are continuous from the first discrete data set;
determining a classification result of a third discrete data point relative to a first forward straight line according to the abscissa of a first discrete data point and the abscissa of a second discrete data point in the continuous at least four discrete data points, wherein the first forward straight line is a directional straight line which has the direction of the first discrete data point and the second discrete data point and passes through the first discrete data point and the second discrete data point, and the classification result relative to the first forward straight line comprises an inner point belonging to the first forward straight line or an outer point belonging to the first forward straight line;
determining a classification result of the fourth discrete data point relative to a second forward straight line according to the abscissa of the second discrete data point and the abscissa of the third discrete data point in the continuous at least four discrete data points, wherein the second forward straight line is a directional straight line which has the direction of the second discrete data point and the third discrete data point and passes through the second discrete data point and the third discrete data point, and the classification result relative to the second forward straight line comprises an inner point belonging to the second forward straight line or an outer point belonging to the second forward straight line;
Determining whether a third discrete data point in the continuous at least four discrete data points belongs to an inflection point in the first discrete data set according to the classification result relative to the first forward straight line and the classification result relative to the second forward straight line;
and cutting the first discrete data set according to the inflection points determined from the first discrete data set to obtain at least two second discrete data sets.
4. The method of claim 1, wherein sequentially slicing at least one discrete point group from the second discrete dataset comprises:
sequentially sliding the cut second discrete data set on each discrete data point of the second discrete data set through a preset sliding window according to a preset sliding step length, wherein the preset sliding step length is two discrete data points, and the preset sliding window is three discrete data points;
taking the discrete data points in the preset sliding window after each sliding as a discrete point group, and obtaining at least one discrete point group after sliding for a plurality of times.
5. The method of claim 1, wherein determining a second order bezier curve corresponding to GIS discrete data based on a start point, an end point, and an on-line point included in the at least one discrete point group comprises:
Determining a second-order Bezier curve control point corresponding to the single discrete point group according to the determined starting point, the end point and the on-line point included in the single discrete point group;
determining a corresponding second-order Bezier curve in the single discrete point group according to the second-order Bezier curve control points corresponding to the single discrete point group;
and determining a second-order Bezier curve corresponding to the GIS discrete data according to the second-order Bezier curve corresponding to the at least one discrete point group.
6. The method of claim 5, wherein determining a second order bezier curve control point for a single set of discrete points based on the determined start point, end point, and on-line point included in the single set of discrete points comprises:
for a single discrete point group, determining a first distance from a starting point to an on-line point in the single discrete point group and a second distance from the on-line point to an ending point in the single discrete point group;
determining the position proportion of the point on the central line of the single discrete point group in the corresponding second-order Bezier curve according to the first distance and the second distance;
and reversely pushing the second-order Bezier curve control points corresponding to the single discrete point group according to the proportion of the discrete point group and the point position on the line.
7. A GIS discrete point data compression device, comprising:
the coordinate position determining module is used for compressing GIS discrete data through a Tagella-Prak algorithm to obtain a first discrete data set, wherein the first discrete data set belongs to a plane curve discrete data point set, and each discrete data point corresponds to an abscissa position and an ordinate position;
the discrete data set determining module is used for dividing the first discrete data set into at least two second discrete data sets by carrying out inflection point detection on the first discrete data set;
the discrete point group determining module is used for sequentially cutting at least one discrete point group from the second discrete data set, wherein the discrete data points in the discrete point group respectively correspond to a starting point required by solving a second-order Bezier curve control point, an ending point and a point on a line between the starting point and the ending point on a plane curve, and when the number of the discrete point groups in the at least one discrete point group is greater than two, the ending point in the previous discrete point group in the adjacent two cut discrete point groups is used as the starting point of the next discrete point group;
and the curve determining module is used for determining a second-order Bezier curve corresponding to the GIS discrete data according to the starting point, the ending point and the on-line point included in the at least one discrete point group.
8. The apparatus of claim 7, wherein the coordinate position determination module comprises:
the thinning threshold determining unit is used for converting the GIS discrete data into a two-dimensional data format and determining a thinning threshold by analyzing the distribution of discrete data points corresponding to the GIS discrete data;
the first discrete data set determining unit is used for compressing the discrete data points corresponding to the GIS discrete data by adopting a Fabry-Perot algorithm based on the thinning threshold value to obtain a first discrete data set.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the GIS discrete data compression method of any one of claims 1-6.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the GIS discrete data compression method of any one of claims 1-6.
CN202310152951.XA 2023-02-22 2023-02-22 GIS discrete data compression method and device, electronic equipment and storage medium Pending CN116346138A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310152951.XA CN116346138A (en) 2023-02-22 2023-02-22 GIS discrete data compression method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310152951.XA CN116346138A (en) 2023-02-22 2023-02-22 GIS discrete data compression method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116346138A true CN116346138A (en) 2023-06-27

Family

ID=86876627

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310152951.XA Pending CN116346138A (en) 2023-02-22 2023-02-22 GIS discrete data compression method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116346138A (en)

Similar Documents

Publication Publication Date Title
US20220147822A1 (en) Training method and apparatus for target detection model, device and storage medium
CN113963197A (en) Image recognition method and device, electronic equipment and readable storage medium
CN112488060A (en) Object detection method, device, apparatus, medium, and program product
CN114463551A (en) Image processing method, image processing device, storage medium and electronic equipment
CN112862017B (en) Point cloud data labeling method, device, equipment and medium
CN116309963B (en) Batch labeling method and device for images, electronic equipment and storage medium
CN117372499A (en) Log length and diameter determining method, device, equipment and storage medium
CN116596750A (en) Point cloud processing method and device, electronic equipment and storage medium
CN116346138A (en) GIS discrete data compression method and device, electronic equipment and storage medium
CN114691918B (en) Radar image retrieval method and device based on artificial intelligence and electronic equipment
CN115511999A (en) Line measurement segmentation method, device, equipment and medium
CN115049551A (en) Method, device, equipment and storage medium for filtering point cloud ground points
CN113032071B (en) Page element positioning method, page testing method, device, equipment and medium
CN115409856A (en) Lung medical image processing method, device, equipment and storage medium
CN113947146A (en) Sample data generation method, model training method, image detection method and device
CN113920404A (en) Training method, image processing method, device, electronic device and storage medium
CN114581672B (en) Image recognition method and device and electronic equipment
CN117746069B (en) Graph searching model training method and graph searching method
CN115292662B (en) Convolution acceleration operation method and device, electronic equipment and storage medium
CN113362297B (en) Image processing method, apparatus and storage medium for printed circuit board
CN115361584B (en) Video data processing method and device, electronic equipment and readable storage medium
CN113326890B (en) Labeling data processing method, related device and computer program product
CN115436899B (en) Millimeter wave radar detection data processing method, device, equipment and storage medium
CN118212469A (en) Point cloud-based power line classification post-processing method and device, equipment and medium
CN116363378A (en) Multi-scale feature extraction 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