Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
Spatial entities is to express and describe existence or virtual entity in natural world by spatial data, from the angle that shows, no matter is the spatial data of vector data structure, or the spatial data of raster data structure, all has the characteristic of multiresolution.because electronic curtain (view window) has resolution, when spatial entities shows in view window, because the resolution of view window is limited, when the figure of drawing on view window when spatial data is smaller, the data (coordinate points) that have performance vector data detail section can be plotted on identical pixel, when the figure of drawing on view window when vector data is larger, detail section just can show, that is to say, the number of pixels that vector data is filled (drafting) is many, the resolution of vector data is just high, the demonstration number of filling (drafting) is few, the resolution of vector data is just low, therefore, although the display effect of vector data itself can not show because of resolution upper distortion, when but vector data shows, characteristic with multiresolution.But present vector data structure, resolution character when not recording the vector data demonstration, all transmit and show in transmission with when showing, make Internet Transmission bottleneck and data and drawn the bottleneck that shows, if vector data is carried out the self-adaptation abbreviation, has caused Calculation bottleneck to server again.Therefore the present invention records the resolution labelled amount of vector data in vector data structure, carry out the self-adaptation abbreviation, progressive transmission, drafting, analysis of vector data etc. by the resolution labelled amount of vector data, compression, Internet Transmission, the client that solves the magnanimity vector data shows and the technical bottleneck such as analysis.
Vector data comprise two-dimensional vector data, trivector data and multidimensional vector data etc. the vector data on meaningful.
The flow process of the disclosed a kind of vector data disposal route of the embodiment of the present invention comprises as shown in Figure 1:
Step S11, obtain the coordinate points of vector data;
The coordinate points of two-dimensional vector data can be expressed as: (x1, y1), and (x2, y2) ... (xn, yn);
The coordinate points of trivector data can be expressed as: (x1, y1, z1), and (x2, y2, z2) ... (xn, yn, zn);
The coordinate points of step S12, the described vector data of foundation generates the resolution labelled amount ri of the vector data minimum data unit of organizing
1, ri
2... ri
n
The minimum data unit of organizing of two-dimensional vector data is coordinate points, the minimum data unit of organizing of trivector data is relevant with three-dimensional model, the minimum data unit of organizing as, triangulation network three-dimensional model is triangle, and the minimum data unit of organizing of some cloud three-dimensional model is three-dimensional coordinate point.The resolution labelled amount that obtains can be added in vector data structure and go, thereby make when getting vector data, just can obtain its corresponding resolution labelled amount.
The flow process of the generation method of the resolution labelled amount of the disclosed a kind of vector data of the embodiment of the present invention comprises as shown in Figure 2:
Step S21, set the view window as reference, described view window comprises width ViewWidth and the height ViewHeight of view window;
By setting as the view window width of vector data reference and highly come to determine view window as the vector data reference, the resolution labelled amount for the compute vectors data when the described view window demonstration as reference.Because all vector datas can be set view window width ViewWidth and the height ViewHeight of identical conduct reference, therefore can not comprise view window width ViewWidth and height ViewHeight as reference in vector data structure.
Step S22, the described view window as reference of foundation, the resolution labelled amount of generation vector data.
Calculate to form the vector data minimum data unit of organizing (as coordinate points) as described in when showing in view window as reference, the magnification ratio that can be revealed or other are controlled parameter (as, controlled quentity controlled variable relatively) as the resolution labelled amount of this minimum data unit of organizing (as coordinate points).Such as the line vector data, when calculating each coordinate points that forms the line vector data and showing in described view window as reference, the magnification ratio that can be revealed is as the resolution labelled amount of this coordinate points.
In above-described embodiment, need to generate the resolution labelled amount of vector data according to described view window as reference, below the process of obtaining the resolution labelled amount is described in detail, its flow process comprises as shown in Figure 3:
The initial value of the resolution labelled amount of step S31, the described vector data of calculating;
The increment of step S32, setting resolution labelled amount;
Each corresponding resolution labelled amount of the minimum data unit of organizing (as coordinate points) of the initial value of step S33, the described resolution labelled amount of foundation and the described vector data of incremental computations of resolution labelled amount.
In above-described embodiment, in order to generate the resolution labelled amount data item described in vector data structure, the below will be take the two-dimensional line vector data as example, to foundation described view window width and height as reference, calculate the resolution labelled amount of each coordinate points of described line vector data, namely when described line vector data show in the view window of described setting as reference, calculate each coordinate points, can show, and not by the resolution labelled amount of the magnification ratio of other coordinate points coverings in described vector data as this coordinate points.Below the process of obtaining the resolution labelled amount is described in detail, its flow process comprises as shown in Figure 4:
At first the resolution labelled amount of described vector data is composed initial value 0.
Step S41, the width VectorWidth that obtains the line vector data and height VectorHeight;
Because mostly in actual application, the outsourcing rectangle that all contains vector data in vector data structure, can directly obtain width and the height of vector data, if can not directly obtain the outsourcing rectangle of vector data, can calculate by the coordinate points of vector data.
The initial value R of the resolution labelled amount of step S42, the described line vector data of calculating
min
(1) calculate described vector data described setting as the view window of reference in corresponding magnification ratio R during full screen display;
R
1=ViewWidth÷VectorWidth;
R
2=ViewHeight÷VectorHeight;
With R
1And R
2In smaller value as the value of R.
(2) calculate and to have magnification ratio that 2 coordinate points are revealed at least as R in the view window of described setting as reference when described line vector data
min
Suppose magnification ratio Rtemp;
If R
1Less than R
2:
RTemp=R ÷ ViewWidth * 2, and with the reference point ViewRefValue of ViewWidth as view window;
If R
1More than or equal to R
2:
RTemp=R ÷ ViewHeight * 2, and with the reference point ViewRefValue of ViewHeight as view window;
Because consist of 2 coordinate points of the minimum needs of line graph.
A. the described setting of foundation is carried out self-adaptation abbreviation as the view control parameter to vector data as view window and the RTemp of reference;
If b. there is the coordinate points more than 2 or 2 to be retained after abbreviation, that is to say under described view control parameter, described vector data has at least two coordinate points to be revealed when described setting shows in as the view window of reference, with the initial value R of RTemp as the resolution labelled amount of described line vector data
min, the value of the resolution labelled amount of the coordinate points of the corresponding vector data of the coordinate points that remains after described abbreviation is set as R
min, and finish.
Be retained if c. be less than 2 coordinate points after abbreviation, described RTemp added an increment size, occurrence can be set according to actual conditions, returns to execution in step a;
The increment Delta R of step S43, setting resolution labelled amount;
According to actual needs can be with R
minAs increment Delta R, also can be with R ÷ ViewRefValue as increment Delta R etc.
Step S44, the described initial value R of foundation
minCalculate the resolution labelled amount of each coordinate points of described vector data with increment Delta R.
Suppose that magnification ratio is R, the initial value of R is R
min
1, the R value is increased Δ R, i.e. R=R+ Δ R;
2, judge that whether having the value of the corresponding resolution labelled amount of coordinate points in the coordinate points of described vector data is 0, if there is no, finish, if exist execution in step 3;
3, the described setting of foundation is carried out self-adaptation abbreviation as the view control parameter to vector data as view window and the R of reference;
Whether the value of the corresponding resolution labelled amount of coordinate points that 4, judges the corresponding vector data of the coordinate points that remains after described abbreviation is 0, if be 0, is set as R, if greater than 0, keeps the value of original resolution labelled amount.
5, return to execution in step 1.
The present embodiment disclosed another obtain the method for vector data resolution labelled amount, its flow process as shown in Figure 5, concrete steps are as follows:
At first the resolution labelled amount of described vector data is composed initial value 0.
Step S51, the width VectorWidth that obtains the line vector data and height VectorHeight;
Because mostly in actual application, all also have the outsourcing rectangle of vector data in vector data structure, can directly obtain width and the height of vector data.If can not directly obtain the outsourcing rectangle of vector data, can calculate by the coordinate points of vector data.
The corresponding magnification ratio R of initial value of the resolution labelled amount of step S52, the described line vector data of calculating
min
(1) calculate described vector data described setting as the view window of reference in corresponding magnification ratio R during full screen display;
R
1=ViewWidth÷VectorWidth;
R
2=ViewHeight÷VectorHeight;
With R
1And R
2In smaller value as the value of R.
(2) calculate and to have magnification ratio that 2 coordinate points are revealed at least as R in the view window of described setting as reference when described line vector data
min
Suppose magnification ratio Rtemp;
If R
1Less than R
2:
RTemp=R ÷ ViewWidth * 2, and with the reference point ViewRefValue of ViewWidth as view window;
If R
1More than or equal to R
2:
RTemp=R ÷ ViewHeight * 2, and with the reference point ViewRefValue of ViewHeight as view window;
Because consist of 2 coordinate points of the minimum needs of line graph.
A. the described setting of foundation is carried out self-adaptation abbreviation as the view control parameter to vector data as view window and the RTemp of reference;
If b. there is the coordinate points more than 2 or 2 to be retained after abbreviation, that is to say under described view control parameter, described vector data has at least two coordinate points to be revealed when described setting shows in as the view window of reference, with RTemp as the corresponding magnification ratio R of the initial value of the resolution labelled amount of described vector data
minThe initial value assignment of the resolution labelled amount of described line vector data is 1, and (1 as controlled quentity controlled variable relatively, initial value as the resolution labelled amount of vector data), the value of the resolution labelled amount of the original coordinates point of the corresponding vector data of the coordinate points that remains after described abbreviation is set as 1, and finishes.
Be retained if c. be less than 2 coordinate points after abbreviation, RTemp added an increment size, occurrence can be set according to actual conditions, returns to execution in step a;
The increment Delta R of step S53, setting resolution labelled amount;
According to actual needs can be with R
minAs increment Delta R, also can be with R ÷ ViewRefValue as increment Delta R etc.
Step S54, the described initial value R of foundation
minCalculate the resolution labelled amount of each coordinate points of described vector data with increment Delta R;
Suppose that magnification ratio is R, the initial value of R is R
min, the initial value of supposing relative controlled quentity controlled variable ResolutionLabel is 1, represents the resolution labelled amount of vector data with relative controlled quentity controlled variable.
1, the R value is increased Δ R, i.e. R=R+ Δ R increases by 1 with the value of resolution labelled amount, i.e. ResolutionLabel=ResolutionLabel+1;
2, judge that whether having the value of the corresponding resolution labelled amount of coordinate points in the coordinate points of described vector data is 0, if there is no, finish, if exist execution in step 3;
3, the described setting of foundation is carried out self-adaptation abbreviation as the view control parameter to vector data as view window and the R of reference;
Whether the value of the corresponding resolution labelled amount of coordinate points that 4, judges the corresponding vector data of the coordinate points that remains after described abbreviation is 0, if be 0, be set as ResolutionLabel, if greater than 0, keep the value of original resolution labelled amount.
5, return to execution in step 1.
Above-mentioned disclosed case study on implementation can reduce the data volume of vector data, because magnification ratio is often stored with double precision, need 8 bytes, and use above-mentioned relative controlled quentity controlled variable as vector data resolution labelled amount, usually only need a bytes store just can, effectively reduced data volume.
Self-adaptation simplifying method in above-described embodiment can adopt following method disclosed by the invention, and concrete steps comprise:
A, according to the view control parameter, the original coordinates conversion of vector data is obtained view coordinate under the view window coordinate system, the view coordinate points under the corresponding described view window coordinate system of the original coordinates point of described vector data;
B, with Douglas-Pu Kefa (Douglas-Peucker), described view coordinate points is carried out the abbreviation analysis, analyze described view coordinate points and whether meet the abbreviation condition;
View coordinate with the coordinate transform of vector data under the view window coordinate system, vector data is carried out abbreviation, can guarantee to show that in the determined view window of described predefined view control parameter the time space relation keeps correct and shows after abbreviation, display effect is undistorted, can be numerical value between 0 or 0 to 1 with the value assignment of the distance threshold D of Douglas-Pu Kefa (Douglas-Peucker) according to the needs of actual displayed effect and ratio of compression.
C, according to analysis result, abbreviation meets the original coordinates point of vector data corresponding to the view coordinate points of described abbreviation condition.
The present invention discloses a kind of method of vector data abbreviation, and its flow process as shown in Figure 6.
Step S61, be identified for the resolution reference point of the described vector data of abbreviation;
Step S62, the described resolution reference point for the described vector data of abbreviation of foundation come the described vector data of abbreviation;
Concrete steps comprise as shown in Figure 7:
Step S621, first coordinate points of choosing vector data and the corresponding resolution labelled amount of this coordinate points are as current pending coordinate points and resolution labelled amount current to be judged;
Step S622, judge whether described current resolution labelled amount to be judged is less than or equal to described resolution reference point for the described vector data of abbreviation, if add current pending coordinate points to coordinate points set, execution in step S623, if not, execution in step S623;
Step S623, judge that whether described current pending coordinate points is last coordinate points in the coordinate points of described vector data, if not, execution in step S624, if, execution in step S625;
Step S624, choose next coordinate points in vector data as current pending coordinate points, and obtain resolution labelled amount corresponding to described current pending coordinate points as resolution labelled amount current to be judged, return to execution in step S622;
Step S625, the data with the coordinate points in described coordinate points set after as described vector data abbreviation, and finish.
The present invention discloses a kind of method of obtaining for the resolution reference point of the described vector data of abbreviation, and concrete steps comprise as shown in Figure 8:.
Step S71, according to predefined view control parameter, and the resolution labelled amount ResolutionLabel that shows in the determined view window of described predefined view control parameter as view window width ViewWidth and the height ViewHeight compute vectors data of reference of vector data;
Described predefined view control parameter comprises: the magnification ratio RealRadio of vector data in the width RealViewWidth of view window, the height RealViewHeight of view window and view window.The width RealViewWidth of view window and the height RealViewHeight of view window have determined to show the view window scope (0 of vector data, 0, RealViewWidth, RealViewHeight), scope as the computer screen map display window, by these two parameters, can determine in the actual view window to be used for to show the magnitude range of the window of image.
The value of RealRadio is usually according to the width of view window and height, and the rectangular extent of the vector data that shows in view window is calculated, the rectangular extent of the described vector data that shows in view window refers to the vector data in this scope is presented in view window, the outsourcing rectangle of the vector data that namely can show in view window, its concrete value range is set according to the demonstration situation of reality, the width of the rectangular extent of described vector data is vWidth, is highly vHeight.
The computing method of RealRadio are as follows:
R1=RealViewWidth÷vWidth;
R2=RealViewHeight÷vHeight;
If R1 is less than R2, with the R1 assignment to RealRadio, otherwise with the R2 assignment to RealRadio.
The computing method of ResolutionLabel are as follows:
dRadioW=(ViewWidth*RealRadio)/RealViewWidth;
dRadioH=(ViewHeight*RealRadio)/RealViewHeight;
If dRadioW is greater than dRadioH, with dRadioW value assignment to ResolutionLabel
, otherwise with dRadioH value assignment to ResolutionLabel.
Step S72, the resolution labelled amount ResolutionLabel that shows in the determined view window of described predefined view control parameter according to vector data are identified for the resolution reference point of the described vector data of abbreviation.
If the resolution labelled amount of described vector data is used be magnification ratio R as the resolution labelled amount, with ResolutionLabel as the resolution reference point for the described vector data of abbreviation.If it is undistorted to guarantee that vector data after abbreviation shows in the determined view window of described predefined view control parameter, with in the resolution labelled amount of described vector data than the large one-level of ResolutionLabel or equal resolution labelled amount as the resolution reference point that is used for the described vector data of abbreviation.
If the resolution labelled amount of described vector data is used be relative controlled quentity controlled variable as vector data resolution labelled amount, with ResolutionLabel deduct described vector data the initial value R of resolution labelled amount
minThe value of gained is kkk, if kkk less than or equal 0, the resolution reference point that is used for the described vector data of abbreviation is 1; If kkk is greater than 0, with the increment Delta R of kkk divided by described vector data resolution labelled amount, the value of gained is assumed to HHH, if HHH is integer, with HHH as the resolution reference point that is used for the described vector data of abbreviation; If HHH also has decimal; guarantee that the vector data after abbreviation shows undistorted if require in the determined view window of described predefined view control parameter; the round values with HHH adds 1 as the resolution reference point that is used for the described vector data of abbreviation; otherwise, can be directly with the round values of HHH as the resolution reference point that is used for the described vector data of abbreviation.
The present invention discloses a kind of method that vector data is drawn, and its idiographic flow as shown in Figure 9.
When vector data need to show in view window, if vector data is very meticulous, what perhaps vector data showed in view window is smaller, a plurality of coordinate points that vector data can occur are plotted on the same pixel of view window, therefore the characteristic of the multiresolution that this has when vector data shows in view window just can improve by this characteristic the drafting efficient of vector data.
Step S81, acquisition show the view control parameter of the view window of vector data;
Described view control parameter comprises: the magnification ratio RealRadio of vector data in the width RealViewWidth of view window, the height RealViewHeight of view window and view window.The width RealViewWidth of view window and the height RealViewHeight of view window have determined to show the view window scope (0 of vector data, 0, RealViewWidth, RealViewHeight), scope as the computer screen map display window, by these two parameters, can determine in the actual view window to be used for to show the magnitude range of the window of image.
The value of RealRadio is usually according to the width of view window and height, and the rectangular extent of the vector data that shows in view window is calculated, the rectangular extent of the described vector data that shows in view window refers to the vector data in this scope is presented in view window, the outsourcing rectangle of the vector data that namely can show in view window, its concrete value range is set according to the demonstration situation of reality, the width of the rectangular extent of described vector data is vWidth, is highly vHeight.
Step S82, the resolution labelled amount ResolutionLabel that shows in the determined view window of described view control parameter as the view window width ViewWidth of reference and height ViewHeight compute vectors data according to described view control parameter and vector data;
The computing method of ResolutionLabel are as follows:
dRadioW=(ViewWidth*RealRadio)/RealViewWidth;
dRadioH=(ViewHeight*RealRadio)/RealViewHeight;
If dRadioW is greater than dRadioH, with dRadioW value assignment to ResolutionLabel
, otherwise with dRadioH value assignment to ResolutionLabel.
Step S83, resolution labelled amount ResolutionLabel that described vector data is shown in the determined view window of described view control parameter carry out abbreviation as the resolution reference point of the described vector data of abbreviation to described vector data;
According to the view control parameter of the view window that shows vector data and the multi-resolution characteristics that vector data shows, vector data is carried out abbreviation in view window, the data abbreviation that is blocked by other data in described vector data when vector data is shown in described view window falls, with do not affect in vector data vector data in view window display effect and and other vector datas between the data abbreviation of spatial relationship fall.
Step S84, use drawing algorithm to draw in described view window the vector data after abbreviation.
The present invention discloses a kind of system of selection of vector data, and its flow process as shown in figure 10.
Data volume in actual range of choice may be more than shown data volume out in view window, if directly the data in range of choice are all taken out and carry out subsequent treatment, at net environment, can cause the decline of system performance, particularly subsequent operation is to carry out data edition and highlighting, and it is as follows that the present invention disclose a kind of method step of vector data selection:
Step S91, obtain and record range of choice and alternative condition;
The most basic the comprising of vector data selection clicks, frame selects, circle selects and polygon is selected etc., and the selection range that clicks is exactly a coordinate points, sometimes comprises one again and clicks tolerance limit, such as the line vector data are clicked; The selection range of frame choosing is exactly the rectangular area, and the range of choice of circle choosing often represents with the radius of center point coordinate and circle; The range of choice that polygon is selected is exactly polygonal region.Be used for that alternative condition is generally the method chosen (as comprise, intersect etc.), restriction is selected etc. certain class data, decide according to concrete actual conditions.The present invention will not enumerate, and protection domain comprises the situation of choosing of all vector datas.
Step S92, the described range of choice of foundation and alternative condition are selected to process to the vector data that shows in view window;
Complete the operation of the vector data that all to choose outside all will participating in the vector data that meets the Local Vector data of choosing condition in the vector data that shows in view window and replace all meeting alternative condition.
if select to occur in client, and the shown vector data of client is compared with the corresponding vector data of server end, if through the server end abbreviation, compression transmits after processing, and the vector data after abbreviation can guarantee in view window and abbreviation before identical display effect and with the spatial relationship of other vector data, use local show in window meet choose condition vector data (even these data are by abbreviation, compressed) replacement all meet the vector data of choosing condition and there is no impact effect, as highlight, and do not having to determine to the operation before the final operation of the vector data chosen, before finishing as graphics edition, drag operations such as (being that map drags also not end) in process as map, can not go server end to carry out selection analysis to vector data, the operations such as reading out data, directly use the local data that show in window, can very effectively alleviate the pressure of server like this, the pressure of Internet Transmission, improve the performance of whole system.
If it is click with mouse on view window or draw polar plot with mouse vector data is selected that vector data is selected, because the figure that draws on view window with mouse, the shown resolution of its figure is the highest, therefore all details that shown figure can be directly carried out selection analysis with the vector data that shows on the polar plot of described mouse drafting and view window; If by specifying certain or some vector datas that other vector datas are selected, and the vector data that shows on view window is through abbreviation, or even lossy compression method (having reduced data precision), show so two vector datas that are in contact with one another on view, may be in fact two vector datas be from, therefore sometimes need server end jointly to carry out spatial relationship and calculate and just can complete the operation that the vector data that shows is selected in view window.
The identification number that meets the vector data of alternative condition on view window is added to choose in set, as the operated object to choosing vector data to operate, when the view control parameter of view window changes, as the amplification of map, dwindle, the operation such as translation and rotation, need to judge according to described range of choice and alternative condition whether the vector data that shows in view window meets the condition of choosing, choose the data in set to upgrade to described.
Step S93, after having determined the processing that the described vector data of choosing is carried out, then choose all to meet the vector data of choosing condition according to described range of choice and alternative condition.
Such as the attribute information of checking the vector data of choosing, need the attribute information of all qualified vector datas is all taken out, therefore need to choose all qualified vector datas according to described range of choice and alternative condition, and then the corresponding attribute information of the vector data of choosing is taken out.
The present invention discloses a kind of method that vector data spatial relationship is calculated, and its flow process as shown in figure 11.
Mainly how to carry out common spatial relationship for client between the vector data after through abbreviation, compression and the complete vector data of server end to calculate, alleviate the pressure of server end, utilize the resource of client, carry out load balance, promote the performance of whole system.For the convenience of narrating, will be referred to as original vector data to the vector data of want computer memory relation, the vector data after described original vector data process abbreviation, compression is referred to as the low resolution vector data.
Step S101, the corresponding low resolution vector data of the original vector data of want computer memory relation is carried out spatial relationship calculate, determine certainly have certain spatial relationship between original vector data, certainly do not have certain spatial relationship, may have certain spatial relationship;
because client does not often have whole vector datas, and the existing vector data of client is compared with the corresponding vector data of server end, also that ratio of precision is lower, the perhaps data of vector data after by abbreviation, also do not comprise whole coordinate points, therefore the data of client are that the multi-resolution characteristics of server end when showing according to vector data is transferred to client through abbreviation with after compressing, can be in client, described low resolution vector data is judged determined certainly have certain spatial relationship between original vector data, certainly do not have certain spatial relationship, may have certain spatial relationship, if can judge between corresponding original vector data by the low resolution vector data and certainly have certain spatial relationship, certainly do not have certain spatial relationship, spatial relationship is calculated and is finished.
Step S102, to having the vector data of certain spatial relationship, use original vector data to analyze whether have certain spatial relationship.
The original vector data that may have certain spatial relationship can be got client and carry out spatial relationship calculating, also can allow server bring in and carry out spatial relationship calculating.
The present invention discloses a kind of vector data editor method, and its flow process as shown in figure 12.
Step S111, obtain and record and select vector data to carry out the editorial choice condition;
To the editor of vector data, need to first choose vector data, then the vector data of choosing is edited.
Step S112, according to described alternative condition to the vector data that meets alternative condition in view window in the vector data that the shows object that is operated as the editing and processing operation;
Carry out operation in editing process with the vector data that meets the Local Vector data of choosing condition in the vector data that shows in view window and replace all meeting alternative condition.
The identification number that meets the vector data of alternative condition on view window is added to choose in set, as the object to choosing quilt that vector data is edited to edit, when the view control parameter of view window changes, as the amplification of map, dwindle, the operation such as translation and rotation, need to judge according to described range of choice and alternative condition whether the vector data that shows in view window meets the condition of choosing, choose the data in set to upgrade to described.
if editing operation is by client, the editing operation of vector graphics to be come the vector data of editing server end, and the shown vector data of client is compared with the corresponding vector data of server end, if through the server end abbreviation, compression transmits after processing, and the vector data after abbreviation can guarantee in view window and abbreviation before identical display effect and with the spatial relationship of other vector data, use local show in window meet choose condition vector data (even these data are by abbreviation, compressed) replacement all meet the vector data of choosing condition and there is no impact effect, as highlight, and before not having to determine the editing operation of the vector data chosen is completed, operations such as (i.e. rotation also do not finish) in the figure process of drawing as the rotating vector data, can not go same server interaction, directly use the local data that show in window, can very effectively alleviate the pressure of server, the pressure of Internet Transmission, improve the performance of whole system.
Step S113, after having determined the editing and processing that the described vector data of choosing is carried out, obtain the edit instruction of vector data and editor's parameter;
Edit for rotation as the edit instruction to vector data, edit central point and the anglec of rotation that parameter comprises rotation; The edit instruction of vector data is mobile editor, edits parameter and comprise displacement along each coordinate axis.The present embodiment will not enumerate.
Step S114, choose all and meet the vector data of choosing condition according to described alternative condition, to described all meet the vector data of choosing condition according to described edit instruction for and editor's parameter vector data is edited.
As at the condition of the selection vector data that obtains the client-side editing vector graphics, the Command And Edit parameter of editing operation, then send it to server end and carry out editing operation, reduced the mutual of data.
The present invention discloses a kind of method of vector data progressive transmission, and its flow process comprises as shown in figure 13:.
Step S121, when needs request incremental data, send the incremental data request, comprise the view control parameter in described request;
Vector data progressive transmission method in the present embodiment is applicable to ask transmitting terminal, when the request transmitting terminal is judged needs request incremental data, sends the incremental data request to the request receiving end, comprises the current view control parameter of asking transmitting terminal in request.
Described view control parameter comprises: the magnification ratio RealRadio of vector data in the width RealViewWidth of view window, the height RealViewHeight of view window and view window.The width RealViewWidth of view window and the height RealViewHeight of view window have determined to show the view window scope (0 of vector data, 0, RealViewWidth, RealViewHeight), scope as the computer screen map display window, by these two parameters, can determine in the actual view window to be used for to show the magnitude range of the window of image.
The value of RealRadio is usually according to the width of view window and height, and the rectangular extent of the vector data that shows in view window is calculated, the rectangular extent of the described vector data that shows in view window refers to the vector data in this scope is presented in view window, the outsourcing rectangle of the vector data that namely can show in view window, its concrete value range is set according to the demonstration situation of reality, the width of the rectangular extent of described vector data is vWidth, is highly vHeight.
The computing method of RealRadio are as follows:
R1=RealViewWidth÷vWidth;
R2=RealViewHeight÷vHeight;
If R1 is less than R2, with the R1 assignment to RealRadio, otherwise with the R2 assignment to RealRadio.
If can obtain vector data as the view window width ViewWidth of reference and height ViewHeight at the request transmitting terminal, can calculate resolution labelled amount ResolutionLabel that vector data shows as the view control parameter in the determined view window of described view control parameter, described view control parameter comprises: the resolution labelled amount ResolutionLabel that vector data shows in the determined view window of described view control parameter.And in the height RealViewHeight of the width RealViewWidth of view window, view window and view window, the magnification ratio RealRadio of vector data just can not be included in the view control parameter.
The computing method of ResolutionLabel are as follows:
dRadioW=(ViewWidth*RealRadio)/RealViewWidth;
dRadioH=(ViewHeight*RealRadio)/RealViewHeight;
If dRadioW is greater than dRadioH, with dRadioW value assignment to ResolutionLabel
, otherwise with dRadioH value assignment to ResolutionLabel.
If the request transmitting terminal is cached with vector data, the view control parameter also comprises: the formerly identification number of the vector data of buffer memory and the formerly current highest resolution labelled amount of the vector data of buffer memory.
The incremental data of rear acquisition is analyzed in step S122, reception according to the resolution labelled amount of described view control parameter and vector data.
Receive the incremental data that the request receiving end returns.
In the disclosed vector data progressive transmission method of the present embodiment, the request transmitting terminal is when sending the incremental data request, carry the view control parameter of the view window that current needs show in request, make the request receiving end can obtain being suitable for according to the resolution labelled amount analysis that view control parameter and vector data comprise the incremental data of current view window, guaranteed that the incremental data that obtains can can't harm demonstration, reduce simultaneously volume of transmitted data, improved data transmission efficiency.
Another vector data progressive transmission method flow process disclosed by the invention as shown in figure 14, the method is applicable to ask transmitting terminal, based on the request transmitting terminal be cached with the formerly situation of the vector data of buffer memory, comprising:
Step S131, the resolution labelled amount ResolutionLabel that shows in the determined view window of described view control parameter as the view window width ViewWidth of reference and height ViewHeight compute vectors data according to view control parameter and vector data;
Step S132, obtain the formerly current highest resolution labelled amount of the vector data of buffer memory;
Step S133, judge the resolution labelled amount the ResolutionLabel whether current highest resolution labelled amount of the vector data of described formerly buffer memory shows in the determined view window of described view control parameter less than described vector data, if, execution in step S134, if not, finish;
Step S134, send the incremental data request, comprise the view control parameter in described request, comprise the identification number of the vector data of buffer memory formerly and the current highest resolution labelled amount of the vector data of buffer memory formerly in described view control parameter;
The incremental data of rear acquisition is analyzed in step S135, reception according to the resolution labelled amount of described view control parameter and vector data;
Step S136, the incremental data of described reception is inserted in the vector data of described formerly buffer memory.
If formerly use relative controlled quentity controlled variable to be used as the formerly current highest resolution labelled amount of the vector data of buffer memory in the vector data of buffer memory, step S132 changes in the present embodiment: obtain the formerly corresponding magnification ratio of current highest resolution labelled amount of the vector data of buffer memory, as the maximum magnification ratio of buffer memory formerly; Step S133 changes into: judge the formerly resolution labelled amount ResolutionLabel that whether shows in the determined view window of described view control parameter less than described vector data of the maximum magnification ratio of buffer memory of described conduct, if, execution in step S134, if not, finish;
Because ask transmitting terminal to be cached with the formerly vector data of buffer memory this moment, go so the incremental data that receives need to be inserted in the vector data of buffer memory formerly, realize data reconstruction, the data after reconstruction are as the corresponding data that show of current view window.
Incremental data with described reception disclosed by the invention be inserted in the vector data of described formerly buffer memory process as shown in figure 15, comprising:
Step S141, the positional information of obtaining the original coordinates point in described incremental data and current highest resolution labelled amount;
Step S142, according to described positional information, the point of the original coordinates in described incremental data is inserted into the correspondence position of the vector data of described formerly buffer memory;
The current highest resolution labelled amount of the vector data of step S143, the described formerly buffer memory of replacement is the current highest resolution labelled amount that comprises in incremental data.
If formerly use relative controlled quentity controlled variable to be used as the formerly current highest resolution labelled amount of the vector data of buffer memory in the vector data of buffer memory, formerly buffer memory need to record the formerly corresponding magnification ratio of current highest resolution labelled amount of the vector data of buffer memory.
The flow process of another vector data progressive transmission method disclosed by the invention comprises as shown in figure 16:
The incremental data request that step S151, reception request transmitting terminal send comprises the view control parameter in described request;
The disclosed vector data progressive transmission method of the present embodiment is applicable to the request receiving end.The type of the view control parameter in the data increment request of its reception is corresponding with the type in embodiment illustrated in fig. 13.When the request Sender side Storage has the vector data of buffer memory formerly, described view control parameter comprises: the scope of current view window, current view window magnification ratio, the identification number of the vector data of first buffer memory and the current highest resolution labelled amount of the vector data of buffer memory formerly.if can obtain vector data as the view window width ViewWidth of reference and height ViewHeight at the request transmitting terminal, can calculate resolution labelled amount ResolutionLabel that vector data shows as the view control parameter in the determined view window of described view control parameter, described view control parameter comprises: the resolution labelled amount ResolutionLabel that vector data shows in the determined view window of described view control parameter, the identification number of the vector data of first buffer memory and the current highest resolution labelled amount of the vector data of buffer memory formerly.
Step S152, the view control parameter that comprises according to described request and the resolution labelled amount of vector data are carried out analyzing and processing to vector data, and the data of determining to meet in vector data the increment condition are incremental data;
Step S153, the described incremental data of transmission are to the described request transmitting terminal.
The incremental data that obtains is sent to the request transmitting terminal.
In the disclosed vector data progressive transmission method of the present embodiment, the request receiving end carries out the abbreviation analysis according to the view control parameter to original vector data, and will meet the data of incremental data condition in vector data as incremental data.in the method, analytic process to vector data is carried out according to the resolution labelled amount of the view control parameter in the incremental data request and vector data, namely take the request transmitting terminal the actual displayed view window as the basis, to guarantee that the incremental data that obtains sends to the request transmitting terminal, the vector data that the request transmitting terminal receives after described incremental data and reconstruction can show according to the display effect of controlling by the view control parameter in advance, can realize harmless the demonstration, only incremental data is transmitted simultaneously, greatly reduced volume of transmitted data, improved data transmission efficiency.
The flow process of another vector data progressive transmission method disclosed by the invention as shown in figure 17, the method is applicable to the request receiving end, based on the request transmitting terminal be cached with the formerly situation of the vector data of buffer memory, comprising:
The incremental data request that step S161, reception request transmitting terminal send comprises the view control parameter in described request;
Step S162, the resolution labelled amount ResolutionLabel that shows in the determined view window of described view control parameter as the view window width ViewWidth of reference and height ViewHeight compute vectors data according to view control parameter and vector data;
Described resolution labelled amount ResolutionLabel also can calculate at the request transmitting terminal, directly send to the request receiving terminal as the view control parameter, described view control parameter comprises: the resolution labelled amount ResolutionLabel that vector data shows in the determined view window of described view control parameter, the identification number of the vector data of first buffer memory and the current highest resolution labelled amount of the vector data of buffer memory formerly.
If described resolution labelled amount ResolutionLabel does not calculate at the request transmitting terminal, and send to the request receiving terminal as the view control parameter, described view control parameter comprises: the scope of current view window, current view window magnification ratio RealRadio, the identification number of the vector data of first buffer memory and the current highest resolution labelled amount of the vector data of buffer memory formerly.
The scope of current view window comprises: the width RealViewWidth of view window, the height RealViewHeight of view window.
The computing method of ResolutionLabel are as follows:
dRadioW=(ViewWidth*RealRadio)/RealViewWidth;
dRadioH=(ViewHeight*RealRadio)/RealViewHeight;
If dRadioW is greater than dRadioH, with dRadioW value assignment to ResolutionLabel
, otherwise with dRadioH value assignment to ResolutionLabel.
Step S163, the resolution labelled amount ResolutionLabel that shows in the determined view window of described predefined view control parameter according to vector data are identified for the resolution reference point of the described vector data of abbreviation as current resolution reference point, with current resolution reference point, described vector data is carried out abbreviation, obtain current abbreviation result;
Step S164, with the current highest resolution labelled amount of the vector data of buffer memory formerly as resolution reference point formerly, with resolution reference point formerly, described vector data is carried out abbreviation, obtain formerly abbreviation result;
Step S165, the data of determining to meet in described current abbreviation result the increment condition are incremental data;
The detailed process of this step comprises:
Determine in described current abbreviation result, and the coordinate points of the vector data in described formerly abbreviation result and the positional information of this coordinate points in the described vector data incremental data of doing not;
Simultaneously with the current highest resolution labelled amount of described current resolution reference point as incremental data.
Step S166, the described incremental data of transmission are to the request transmitting terminal.
The flow process of another vector data progressive transmission method disclosed by the invention as shown in figure 18, the method is applicable to the request receiving end, based on the request transmitting terminal be cached with the formerly situation of the vector data of buffer memory, comprising:
The incremental data request that step S171, reception request transmitting terminal send comprises the view control parameter in described request;
Step S172, the resolution labelled amount ResolutionLabel that shows in the determined view window of described view control parameter as the view window width ViewWidth of reference and height ViewHeight compute vectors data according to view control parameter and vector data;
Described resolution labelled amount ResolutionLabel also can calculate at the request transmitting terminal, directly send to the request receiving terminal as the view control parameter, described view control parameter comprises: the resolution labelled amount ResolutionLabel that vector data shows in the determined view window of described view control parameter, the identification number of the vector data of first buffer memory and the current highest resolution labelled amount of the vector data of buffer memory formerly.
If described resolution labelled amount ResolutionLabel does not calculate at the request transmitting terminal, and send to the request receiving terminal as the view control parameter, described view control parameter comprises: the scope of current view window, current view window magnification ratio RealRadio, the identification number of the vector data of first buffer memory and the current highest resolution labelled amount of the vector data of buffer memory formerly.
The scope of current view window comprises: the width RealViewWidth of view window, the height RealViewHeight of view window.
The computing method of ResolutionLabel are as follows:
dRadioW=(ViewWidth*RealRadio)/RealViewWidth;
dRadioH=(ViewHeight*RealRadio)/RealViewHeight;
If dRadioW is greater than dRadioH, with dRadioW value assignment to ResolutionLabel
, otherwise with dRadioH value assignment to ResolutionLabel.
Step S173, the resolution labelled amount ResolutionLabel that shows in the determined view window of described predefined view control parameter according to vector data are identified for the resolution reference point of the described vector data of abbreviation as current resolution reference point;
Step S174, with the current highest resolution labelled amount of the vector data of buffer memory formerly as resolution reference point formerly;
Step S175, analyze described vector data according to described current resolution reference point and first resolution reference point, obtain meet the increment condition data as incremental data;
The detailed process of this step comprises as shown in figure 19:
Step S1751, first coordinate points of choosing vector data and the corresponding resolution labelled amount of this coordinate points are as current pending coordinate points and resolution labelled amount current to be judged;
Step S1752, judge whether described current resolution labelled amount to be judged is less than or equal to current resolution reference point and greater than first resolution reference point, if add current pending coordinate points to coordinate points set, execution in step S1753, if not, execution in step S1753;
Step S1753, judge that whether described current pending coordinate points is last coordinate points in the coordinate points of described vector data, if not, execution in step S1754, if, execution in step S1755;
Step S1754, choose next coordinate points in vector data as current pending coordinate points, and obtain resolution labelled amount corresponding to described current pending coordinate points as resolution labelled amount current to be judged, return to execution in step S1752;
Step S1755, the positional information in described vector data is as the incremental data of described vector data with the coordinate points in described coordinate points set and this coordinate points, and finishes.
Simultaneously with the current highest resolution labelled amount of described current resolution reference point as incremental data.
Step S176, the described incremental data of transmission are to the request transmitting terminal.
If the resolution labelled amount of described vector data is used be relative controlled quentity controlled variable as vector data resolution labelled amount, need described current resolution reference point is carried out using after conversion, the method for conversion is as follows:
Suppose described current resolution reference point ResolutionLabel, with ResolutionLabel deduct described vector data the initial value R of resolution labelled amount
minThe value of gained is kkk, if kkk less than or equal 0, current resolution reference point is 1; If kkk is greater than 0, with the increment Delta R of kkk divided by described vector data resolution labelled amount, the value of gained is assumed to HHH, if HHH is integer, with HHH as current resolution reference point; If HHH also has decimal; guarantee that the vector data after abbreviation shows undistorted if require in the determined view window of described predefined view control parameter; the round values with HHH adds 1 as current resolution reference point; otherwise, can be directly with the round values of HHH as current resolution reference point.If formerly also use relative controlled quentity controlled variable to be used as the formerly current highest resolution labelled amount of the vector data of buffer memory in the vector data of buffer memory, need the current highest resolution labelled amount of the current resolution reference point after described conversion as incremental data.
When the request transmitting terminal when there is no the buffer memory vector data, do not deposit identification number and the current highest resolution labelled amount of the vector data of buffer memory formerly of the vector data of first buffer memory, so do not comprise in the view control parameter yet.The request receiving end is after receiving the incremental data request, and the original vector data that will ask according to the view control parameter carries out abbreviation according to the view control parameter of the view window of current demonstration, and the data that obtain are incremental data.Request as the data that current view window need to show, shows incremental data after transmitting terminal receives incremental data, and with its buffer memory so that with this as buffer memory vector data formerly, carry out follow-up progressive transmission processing.
The present invention discloses a kind for the treatment of apparatus of vector data, its structure comprises as shown in figure 20:
Coordinate points acquiring unit 201 is for the coordinate points of obtaining vector data;
Generation unit 202, the coordinate points that is used for the described vector data of foundation generates the resolution labelled amount of the vector data minimum data unit of organizing.
The present embodiment just discloses its more excellent implementation, and its specific works process please refer to flow process shown in any width in Fig. 1-5, is not giving unnecessary details at this.
The invention also discloses a kind of vector data abbreviation device, its structure comprises as shown in figure 21:
The first determining unit 211 is for the resolution reference point that is identified for the described vector data of abbreviation;
First chooses unit 212, is used for choosing first coordinate points of vector data and the corresponding resolution labelled amount of this coordinate points as current pending coordinate points and resolution labelled amount current to be judged:
The first judging unit 213 is used for judging whether described current resolution labelled amount to be judged is less than or equal to described resolution reference point for the described vector data of abbreviation, if add current pending coordinate points to the coordinate points set;
The second judging unit 214, be used for judging whether described current pending coordinate points is last coordinate points of the coordinate points of described vector data, if not, carry out next step, if, carry out the data after as described vector data abbreviation with the coordinate points in described coordinate points set, and ending step;
Second chooses unit 215, be used for choosing the next coordinate points of vector data as current pending coordinate points, and obtain resolution labelled amount corresponding to described current pending coordinate points as resolution labelled amount current to be judged, return to execution and judge whether described current resolution labelled amount to be judged is less than or equal to described resolution reference point step for the described vector data of abbreviation;
The second determining unit 216 is used for coordinate points with the described coordinate points set data after as described vector data abbreviation, and finishes.
The present embodiment just discloses its more excellent implementation, and its specific works process please refer to flow process shown in any width in Fig. 6-8, is not giving unnecessary details at this.
The invention also discloses a kind of vector data drawing apparatus, its structure comprises as shown in figure 22:
Parameter acquiring unit 221 is used for the view control parameter that acquisition shows the view window of vector data;
Computing unit 222 is used for the resolution labelled amount ResolutionLabel that shows in the determined view window of described view control parameter as view window width ViewWidth and the height ViewHeight compute vectors data of reference according to described view control parameter and vector data;
Abbreviation unit 223 is used for resolution labelled amount ResolutionLabel that described vector data is shown in the determined view window of described view control parameter and as the resolution reference point of the described vector data of abbreviation, described vector data is carried out abbreviation;
Drawing unit 224 is used for using drawing algorithm to draw in described view window the vector data after abbreviation.
The present embodiment just discloses its more excellent implementation, and its specific works process please refer to flow process shown in Figure 9, is not giving unnecessary details at this.
The invention also discloses a kind of selecting arrangement of vector data, its structure comprises as shown in figure 23:
Range of choice and condition acquiring unit 231 are used for obtaining and recording range of choice and alternative condition;
Select processing unit 232, be used for according to described range of choice and alternative condition, the vector data that shows in view window being selected to process;
Selected cell 233 is used for after having determined the processing that the described vector data of choosing is carried out, then chooses all to meet the vector data of choosing condition according to described range of choice and alternative condition.
The present embodiment just discloses its more excellent implementation, and its specific works process please refer to flow process shown in Figure 9, is not giving unnecessary details at this.
The invention also discloses a kind of vector data spatial relationship calculation element, its structure comprises as shown in figure 24:
Spatial relationship determining unit 241, be used for that the corresponding low resolution vector data of the original vector data of want computer memory relation is carried out spatial relationship and calculate, determine certainly have certain spatial relationship between original vector data, certainly do not have certain spatial relationship, may have certain spatial relationship;
Analytic unit 242 is used for having the vector data of certain spatial relationship, uses original vector data to analyze whether have certain spatial relationship.
The present embodiment just discloses its more excellent implementation, and its specific works process please refer to flow process shown in Figure 10, is not giving unnecessary details at this.
The invention also discloses a kind of vector data editing device, its structure comprises as shown in figure 25:
Obtain record cell 251, be used for obtaining and recording selecting vector data to carry out the editorial choice condition;
Selected cell 252 is used for according to described alternative condition the vector data that meets alternative condition in the vector data that shows in the view window object that is operated as the editing and processing operation;
Edit instruction and editor's parameter acquiring unit 253 are used for after having determined the editing and processing that the described vector data of choosing is carried out, and obtain edit instruction and editor's parameter to vector data;
Edit cell 254 is used for choosing all according to described alternative condition and meets the vector data of choosing condition, to described all meet the vector data of choosing condition according to described edit instruction for and editor's parameter vector data is edited.
The present embodiment just discloses its more excellent implementation, and its specific works process please refer to flow process shown in Figure 12, is not giving unnecessary details at this.
The invention also discloses a kind of vector data progressive transmission device, be applicable to client, its structure comprises as shown in figure 26:
Incremental data request transmitting unit 261 is used for sending the incremental data request when needs request incremental data, comprises the control parameter in described request;
Incremental data receiving element 262 is used for receiving the incremental data of analyzing rear acquisition according to the resolution labelled amount of described view control parameter and vector data.
The present embodiment just discloses its more excellent implementation, and its specific works process please refer to flow process shown in any width in Figure 13-15, is not giving unnecessary details at this.
The present invention discloses another kind of vector data progressive transmission device, be applicable to server end, its structure comprises as shown in figure 27:
Incremental data request receiving unit 271 is used for receiving the incremental data request that the request transmitting terminal sends, and comprises the control parameter in described incremental data request;
Analysis and processing unit 272 is used for the view control parameter that comprises according to described request and the resolution labelled amount of vector data vector data is carried out analyzing and processing, and the data of determining to meet in vector data the increment condition are incremental data;
Transmitting element 273 is used for sending described incremental data to the described request transmitting terminal.
The present embodiment just discloses its more excellent implementation, and its specific works process please refer to flow process shown in any width in Figure 16-17, is not giving unnecessary details at this.
A kind of vector data disposal route disclosed by the invention and device can be arranged in computing machine, also can be arranged in mobile phone or other equipment.
In this instructions, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is and the difference of other embodiment that between each embodiment, identical similar part is mutually referring to getting final product.For the disclosed device of embodiment, because it is corresponding with the disclosed method of embodiment, so description is fairly simple, relevant part partly illustrates referring to method and gets final product.
The professional can also further recognize, unit and the algorithm steps of each example of describing in conjunction with embodiment disclosed herein, can realize with electronic hardware, computer software or combination both, for the interchangeability of hardware and software clearly is described, composition and the step of each example described in general manner according to function in the above description.These functions are carried out with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.The professional and technical personnel can specifically should be used for realizing described function with distinct methods to each, but this realization should not thought and exceeds scope of the present invention.
The method of describing in conjunction with embodiment disclosed herein or the step of algorithm can directly use the software module of hardware, processor execution, and perhaps both combination is implemented.Software module can be placed in the storage medium of any other form known in random access memory (RAM), internal memory, ROM (read-only memory) (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field.
To the above-mentioned explanation of the disclosed embodiments, make this area professional and technical personnel can realize or use the present invention.Multiple modification to these embodiment will be apparent concerning those skilled in the art, and General Principle as defined herein can be in the situation that do not break away from the spirit or scope of the present invention, realization in other embodiments.Therefore, the present invention will can not be restricted to these embodiment shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.