Map line element continuous scale expression method
By obtaining the Fourier expansion coefficient of map line elements and constructing interpolation relationships, combining the interpolation and scale relationships, the problem of expressing map line elements at different scales is solved, and accurate expression of arbitrary scales and scientific description of curve forms is achieved.
Patent Information
- Application Number
- CN202410986206.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-12
AI Technical Summary
The prior art is difficult to effectively express the continuous scale of map line elements under different scales, especially the expression of intermediate scales. Traditional methods require professional knowledge to set parameters, and cannot realize curve descriptions of any scale, and Fourier-based methods When simplifying, it will cause changes in the fitted curve, and the gradient relationship between curve shape and detail cannot be reflected.
By obtaining the Fourier expansion coefficient of the map line elements, the interpolation relationship between the intermediate scale and the key scale is constructed, combined with the interpolation ratio and the scale relationship, the relationship between the interpolation weight and the interpolation ratio is fitted to realize the continuous scale expression of the map line elements.
The accurate expression of map line elements under any scale is achieved, the calculation of interpolation weights is optimized, the scientific and reasonable description of curve shapes is ensured, and the expression accuracy of intermediate scales is improved.
Smart Images

Figure CN118939745A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of map technology, and in particular relates to a method for expressing continuous scales of map line elements. Background Art
[0002] With the universal development of GIS and the widespread application of Internet electronic maps, the demand for multi-scale and infinite-scale expression of maps has become increasingly urgent, becoming a hot and difficult issue in the field of geographic information. The core issue of continuous scale expression of geographic information is to solve the problem of expressing the intermediate scale of a series of scales. Line features, as the basic geometric type of geographic information, are the basis and key to achieving continuous expression of geographic information. Therefore, studying the continuous scale transformation method of map line features has important significance and application value.
[0003] The continuous scale transformation of map line features is a technology for hierarchical description and compression of curves. Its core idea is to decompose the curve into multiple levels and describe the curve of each level with fewer control points. This method can greatly reduce the amount of data of the curve while retaining the key features of the curve. The development history of multi-level description methods of curves includes traditional methods and neural network methods. Traditional multi-level description methods of curves such as B-spline curves, fractal compression methods and compression methods based on wavelet transform have good theoretical foundations and application experience, but their processing and description capabilities for curve data are limited. In addition, in cartographic applications, it is usually necessary to use the experience and knowledge of professionals to finely set parameters in order to simplify at different levels to obtain map data at a small scale, resulting in great differences in the performance of the method in different environments. The multi-level description method of curves based on Fourier directly removes the high-frequency terms of the Fourier series when simplifying the curve, resulting in significant changes in the fitting curve. The resulting Fourier series can only correspond to a specific map scale and cannot achieve curve description of any scale. At the same time, there are also references to the graphic gradient technology in animation, using the map data at two key scales to interpolate the map data of the intermediate scale. The core issue here is how to construct the relationship between the map scale and the interpolation weight. The current general practice is to default to a linear relationship between scale and interpolation, that is, a uniform change in scale causes a uniform change in weight coefficient. This approach lacks consideration of the relationship between information such as curve shape and details and scale, and cannot well reflect the gradual relationship between information such as curve shape and details with scale. For this reason, the present invention proposes a method for expressing the continuous scale of map line elements. Summary of the invention
[0004] The purpose of the present invention is to provide a method for expressing the continuous scale of map line elements to solve the problems raised in the above background technology.
[0005] To achieve the above object, the present invention provides the following technical solution: a method for expressing a continuous scale of a map line element, step 1: obtaining a Fourier expansion coefficient of a map line element;
[0006] Step 2: Construct the interpolation relationship between the intermediate scale and the key scale;
[0007] Step 3: Construct the relationship between the intersection ratio and the scale;
[0008] Step 4: Construct the relationship between the intersection ratio and the interpolation weight;
[0009] Step 5: Realization of continuous scale expression of map line features.
[0010] Preferably, the step 1 specifically includes: assuming that the map line elements L(P0(X0, Y0), P1(X1, Y1), ... PN(X N , Y N )) is a closed curve consisting of a string of points P0, P1, P2…PN, N points, where P0 and P N coincide; in order to perform Fourier transform on the curve, the curve can be represented by a piecewise parametric equation with the curve length S as the independent variable, as shown in formula (1):
[0011]
[0012] In the formula, (x i ,y i ) is point P i The coordinates of the curve segment P are X(S) and Y(S). i P i+1 Previous point, S i Point P i The length to the starting point P0, S is the length of point P S The length to P0, 0≤i≤N-1; the above formula represents the curve segment P i P i+1 The parametric equation of the equation cluster can be regarded as a periodic function with the curve perimeter L as the period, and the Fourier expansion of formula (1) can be obtained as follows:
[0013]
[0014] The Fourier expansion coefficients can be calculated using the following formula:
[0015]
[0016] Preferably, the step 2 specifically includes: using the map data at two key scales to interpolate the map data at the intermediate scale, as shown in formula (4):
[0017] f=(1-g)×f1+g×f2, 0<g<1 (4)
[0018] In formula (4), f1, f2, f represent the Fourier expansion coefficients of the same map line element at large scale, small scale and intermediate scale respectively, g is the interpolation weight, r1, r2, r represent the large scale, small scale and intermediate scale respectively; the larger g is, the more similar f is to f2, and vice versa, the more similar f is to f1; at this time, it is only necessary to determine the relationship between the interpolation weight g and r1, r2, r to obtain the Fourier expansion coefficient f of the intermediate scale, thereby realizing the continuous scale expression of the map line element.
[0019] Preferably, the step three specifically includes: for closed curves, the indicator used to describe the shape and detail differences of two different closed curves is area similarity, that is, the area ratio between the intersection and the union of the areas enclosed by the two curves, that is, the intersection-and-union ratio (IOU); considering that the change in the morphology of map line elements caused by the change in map scale is a uniform change with the scale, the intersection-and-union ratio (IOU) is used to measure the morphological differences of map line elements at different scales, and the intersection-and-union ratio of small-scale data and the large-scale data is calculated as IOU0 based on the large-scale data. In the process of uniformly changing the scale from a large scale to a small scale, the intersection-and-union ratio (IOU) of the intermediate scale and the large scale decreases uniformly with the scale, that is, the IOU gradually changes uniformly from 1 to IOU0, as shown in formula (5);
[0020]
[0021] In formula (5), M1, M2, and M represent large scale, small scale, and intermediate scale, respectively; IOU0 represents the intersection-over-union ratio of small scale data to large scale data; and IOU represents the intersection-over-union ratio of intermediate scale.
[0022] Preferably, the step 4 specifically includes: since it is impossible to directly obtain the relationship between the intersection-over-union ratio (IOU) and the interpolation weight g, however, after the interpolation weight g is determined, the curve of the middle scale can be obtained by using formula (4), so that the IOU under the current scale can be calculated; therefore, multiple groups of intersection-over-union ratios and interpolation weights g can be used to fit their relationship function; through experimental tests, the effect is best when the degree of the fitted polynomial function is 3, that is, the functional relationship between the interpolation weight g of each curve and the intersection-over-union ratio (IOU) of the curve area can be expressed as:
[0023] g=A*IoU 3 +B*IoU 2 +C*IoU+D (6)
[0024] Among them, A, B, C, and D can be obtained by the least squares method.
[0025] Preferably, the step five specifically includes: for the two determined map line elements of different scales, firstly obtain their respective Fourier expansion coefficients, and use formula (4) and formula (6) to establish the relationship between IOU and g, and then calculate the IOU of the curve at scale M and the corresponding interpolation weight g in turn according to the current intermediate scale M, and then use formula (4) to obtain the curve Fourier characteristics of the curve at scale M, and obtain f M The corresponding curve shape can realize the expression of the curve at any scale and the multi-level description of the curve.
[0026] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention realizes a more scientific and reasonable continuous scale expression of map line elements by optimizing the calculation of interpolation weights; the setting of interpolation weights is particularly critical to the expression of map line elements of intermediate scales, and determines the specific shape of the curve; the current interpolation weights are assumed to be linearly related to the scale by default, but in fact, the intersection and union ratio is linearly related to the scale. We use the linear change relationship between the intersection and union ratio and the map scale as a bridge, and finally construct the relationship between the map scale and the interpolation weight by fitting the relationship between the intersection and union ratio and the interpolation weight, so that the calculation of the interpolation weight is more scientific and reasonable, thereby making the expression of the intermediate-scale line elements more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a schematic diagram of the method flow of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] See also Figure 1 , a technical solution is provided: a method for expressing continuous scales of map line elements, step 1: obtaining Fourier expansion coefficients of map line elements;
[0030] In this embodiment, preferably, step 1 specifically includes: assuming that map line elements L(P0(X0, Y0), P1(X1, Y1), ... PN(X N , Y N )) is a closed curve consisting of a string of points P0, P1, P2…PN, N points, where P0 and P N coincide; in order to perform Fourier transform on the curve, the curve can be represented by a piecewise parametric equation with the curve length S as the independent variable, as shown in formula (1):
[0031]
[0032] In the formula, (x i ,y i ) is point P i The coordinates of the curve segment P are X(S) and Y(S). i P i+1 Previous point, S i Point P i The length to the starting point P0, S is the length of point P S The length to P0, 0≤i≤N-1; the above formula represents the curve segment P i P i+1 The parametric equation of the equation cluster can be regarded as a periodic function with the curve perimeter L as the period, and the Fourier expansion of formula (1) can be obtained as follows:
[0033]
[0034] The Fourier expansion coefficients can be calculated using the following formula:
[0035]
[0036] Step 2: Construct the interpolation relationship between the intermediate scale and the key scale;
[0037] In this embodiment, preferably, step 2 specifically includes: using the map data at two key scales to interpolate the map data at the intermediate scale, as shown in formula (4):
[0038] f=(1-g)×f1+g×f2,0<g<1 (4)
[0039] In formula (4), f1, f2, f represent the Fourier expansion coefficients of the same map line element at large scale, small scale and intermediate scale respectively, g is the interpolation weight, r1, r2, r represent the large scale, small scale and intermediate scale respectively; the larger g is, the more similar f is to f2, and vice versa, the more similar f is to f1; at this time, it is only necessary to determine the relationship between the interpolation weight g and r1, r2, r to obtain the Fourier expansion coefficient f of the intermediate scale, thereby realizing the continuous scale expression of the map line element.
[0040] Step 3: Construct the relationship between the intersection ratio and the scale;
[0041] In this embodiment, preferably, step three specifically includes: for closed curves, the indicator used to describe the shape and detail differences of two different closed curves is area similarity, that is, the area ratio between the intersection and the union of the areas enclosed by the two curves, that is, the intersection-and-union ratio (IOU); considering that the change in the morphology of map line elements caused by the change in map scale is a uniform change with the scale, the intersection-and-union ratio (IOU) is used to measure the morphological differences of map line elements at different scales, and the intersection-and-union ratio of small-scale data and the large-scale data is calculated as IOU0 based on the large-scale data. In the process of uniformly changing the scale from a large scale to a small scale, the intersection-and-union ratio (IOU) of the intermediate scale and the large scale decreases uniformly as the scale decreases, that is, the IOU gradually changes uniformly from 1 to IOU0, as shown in formula (5);
[0042]
[0043] In formula (5), M1, M2, and M represent large scale, small scale, and intermediate scale, respectively; IOU0 represents the intersection-over-union ratio of small scale data to large scale data; and IOU represents the intersection-over-union ratio of intermediate scale.
[0044] Step 4: Construct the relationship between the intersection ratio and the interpolation weight;
[0045] In this embodiment, preferably, step 4 specifically includes: since it is impossible to directly obtain the relationship between the intersection-and-union ratio (IOU) and the interpolation weight g, after the interpolation weight g is determined, the curve of the middle scale can be obtained by using formula (4), so that the IOU under the current scale can be calculated; therefore, multiple groups of intersection-and-union ratios and interpolation weights g can be used to fit their relationship function; through experimental tests, the effect is best when the degree of the fitted polynomial function is 3, that is, the functional relationship between the interpolation weight g of each curve and the intersection-and-union ratio (IOU) of the curve area can be expressed as:
[0046] g=A*IoU 3 +B*IoU 2 +C*IoU+D (6)
[0047] Among them, A, B, C, and D can be obtained by the least squares method.
[0048] Step 5: Realization of continuous scale expression of map line features;
[0049] In this embodiment, preferably, step five specifically includes: for the two determined map line elements of different scales, first obtain their respective Fourier expansion coefficients, and use formula (4) and formula (6) to establish the relationship between IOU and g, and then calculate the curve IOU and the corresponding interpolation weight g at the scale M in turn according to the current intermediate scale M, and then use formula (4) to obtain the curve Fourier characteristics of the curve at the scale M, and get f M The corresponding curve shape can realize the expression of the curve at any scale and the multi-level description of the curve.
[0050] Although embodiments of the present invention have been shown and described (see the above detailed description for details), it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for expressing continuous scales of map line elements, characterized by: Step 1: Obtain the Fourier expansion coefficients of map line elements; Step 2: Construct the interpolation relationship between the intermediate scale and the key scale; Step 3: Construct the relationship between the intersection ratio and the scale; Step 4: Construct the relationship between the intersection ratio and the interpolation weight; Step 5: Realization of continuous scale expression of map line features.
2. A method for expressing continuous scales of map line elements according to claim 1, characterized in that: The step 1 specifically includes: assuming that the map line elements L(P0(X0, Y0), P1(X1, Y1), ... PN(X N , Y N )) is a closed curve consisting of a string of points P0, P1, P2…PN, N points, where P0 and P N overlap; perform Fourier transform on the curve, and the curve can be expressed by a piecewise parametric equation with the curve length S as the independent variable, as shown in formula (1): In the formula, (x i ,y i ) is point P i The coordinates of the curve segment P are X(S) and Y(S). i P i+1 Previous point, S i For point P i The length to the starting point P0, S is the length of point P S The length to P0, 0≤i≤N-1; the above formula represents the curve segment P i P i+1 The parametric equation of the equation cluster can be regarded as a periodic function with the curve perimeter L as the period, and the Fourier expansion of formula (1) can be obtained as follows: The Fourier expansion coefficients can be calculated using the following formula:
3. A method for expressing continuous scales of map line elements according to claim 2, characterized in that: The step 2 specifically includes: using the map data at two key scales to interpolate the map data at the intermediate scale, as shown in formula (4): f=(1-g)×f1+g×f2, 0<g<1 (4) In formula (4), f1, f2, f represent the Fourier expansion coefficients of the same map line element at large scale, small scale and intermediate scale, respectively; g is the interpolation weight; r1, r2, r represent the large scale, small scale and intermediate scale, respectively; the larger g is, the more similar f is to f2, and vice versa, the more similar f is to f1; at this time, it is only necessary to determine the relationship between the interpolation weight g and r1, r2, r to obtain the Fourier expansion coefficient f of the intermediate scale, and realize the continuous scale expression of the map line element.
4. A method for expressing continuous scales of map line elements according to claim 3, characterized in that: The step three specifically includes: the indicator used to describe the shape and detail differences of two different closed curves is area similarity, that is, the area ratio between the intersection and the union of the areas enclosed by the two curves, that is, the intersection-and-union ratio (IOU); the change in the morphology of map line elements caused by the change in map scale is a uniform change with the scale, and the intersection-and-union ratio (IOU) is used to measure the morphological differences of map line elements at different scales. Taking the large-scale data as the benchmark, the intersection-and-union ratio of the small-scale data and the IOU is calculated as IOU0. In the process of uniformly changing the scale from a large scale to a small scale, the intersection-and-union ratio (IOU) of the intermediate scale and the large scale decreases uniformly with the scale, that is, the IOU gradually changes uniformly from 1 to IOU0, as shown in formula (5); In formula (5), M1, M2, and M represent large scale, small scale, and intermediate scale, respectively; IOU0 represents the intersection-over-union ratio of small scale data to large scale data; and IOU represents the intersection-over-union ratio of intermediate scale.
5. A method for expressing continuous scales of map line elements according to claim 4, characterized in that: The step 4 specifically includes: since it is impossible to directly obtain the relationship between the intersection-over-union ratio (IOU) and the interpolation weight g, once the interpolation weight g is determined, the curve of the middle scale can be obtained by using formula (4), so that the IOU under the current scale can be calculated; therefore, multiple groups of intersection-over-union ratios and interpolation weights g can be used to fit their relationship function; the effect is best when the degree of the fitted polynomial function is 3, that is, the functional relationship between the interpolation weight g of each curve and the intersection-over-union ratio (IOU) of the curve area can be expressed as: g=A*IoU 3 +B*IoU 2 +C*IoU+D (6) Among them, A, B, C, and D can be obtained by the least squares method.
6. A method for expressing continuous scales of map line elements according to claim 5, characterized in that: The step 5 specifically includes: for the two determined map line elements of different scales, firstly obtain their respective Fourier expansion coefficients, and use formula (4) and formula (6) to establish the relationship between IOU and g, and then calculate the IOU of the curve at scale M and the corresponding interpolation weight g in turn according to the current intermediate scale M, and then use formula (4) to obtain the curve Fourier characteristics of the curve at scale M, and get f M The corresponding curve shape can realize the expression of the curve at any scale and the multi-level description of the curve.
