Summary of the invention
In order to overcome the deficiencies in the prior art, the object of the present invention is to provide the method and apparatus of a kind of splicing and combination view, make user the various piece belonged in a planimetric map be spliced quickly and easily and to be combined into a planimetric map meeting user and require.
For solving the problem, the technical solution adopted in the present invention is as follows:
Scheme one:
Splicing and the method for combination view, a complete planimetric map is combined by several different closed figures, and a closed figures is formed by several not closed graphic joining, and the method comprises the following steps:
For not closed graphic joining being become the step of closed figures,
S1: for two not closed figures, is labeled as the first reference point by the end points that user in the first not closed figure selects, and the end points that user in the second not closed figure selects is labeled as splice point; Wherein, the first not closed figure is the not closed figure that user chooses first, and the second not closed figure is another not closed figure that user then chooses;
S2: the not closed figure of translation second, makes splice point overlap with the first reference point;
S3: receive the splicing angle value that user inputs, be that the center of circle rotates the second not closed figure with splice point, make the angle value of the lines corresponding to splice point and the lines corresponding to the first reference point equal to splice angle value;
S4: repeat S1-S3, until complete the splicing of all not closed figures in a closed figures;
With the step for closed figures being combined into complete planimetric map,
Vertex ticks user-selected in first closed figures is the second reference point by S5: for two closed figures, is combined spot, with the second reference point for XY coordinate axis is set up in axle center by vertex ticks user-selected in the second closed figures; Wherein, the first closed figures is the closed figures that user chooses first, and the second closed figures is another closed figures that user then chooses;
S6: the X value that reception user inputs and Y value, determine the offset point relative to the second reference point by X value and Y value, translation second closed figures, makes combined spot overlap with offset point;
S7: receive the combination angle value that user inputs, be that the center of circle rotates the second closed figures with combined spot, make the angle value of the lines corresponding to combined spot and the lines corresponding to the second reference point equal to combine angle value;
S8: repeat S5-S7, until complete the combination of all closed figures in a complete planimetric map.
Preferably, in S3, lines corresponding to splice point are the lines between end points and adjacent node that in the second not closed figure, user selects, and the lines corresponding to the first reference point are the lines between end points and adjacent node that in the first not closed figure, user selects.
Preferably, in S7, lines corresponding to combined spot are the lines between node user-selected in the second closed figures and next node, and the lines corresponding to the second reference point are the lines between node user-selected in the first closed figures and next node.
Preferably, the closed figures of described closed figures for being made up of several sections of lines, the not closed figures of described not closed figure for being made up of several sections of lines.
Preferably, user-selected node is the tie point between lines and adjacent lines.
Scheme two:
Splicing and the device of combination view, a complete planimetric map is combined by several different closed figures, and a closed figures is formed by several not closed graphic joining, and this device comprises with lower module:
For not closed graphic joining being become the module of closed figures,
Modules A: for for two not closed figures, the end points that user in the first not closed figure selects is labeled as the first reference point, the end points that user in the second not closed figure selects is labeled as splice point; Wherein, the first not closed figure is the not closed figure that user chooses first, and the second not closed figure is another not closed figure that user then chooses;
Module B: for the not closed figure of translation second, makes splice point overlap with the first reference point;
Module C: for receiving the splicing angle value that user inputs, is that the center of circle rotates the second not closed figure with splice point, makes the angle value of the lines corresponding to splice point and the lines corresponding to the first reference point equal to splice angle value;
Module D: for replicated blocks A to module C, until the splicing completing all not closed figures in a closed figures;
With the module for closed figures being combined into complete planimetric map,
Module E: for for two closed figures, being the second reference point by vertex ticks user-selected in the first closed figures, is combined spot by vertex ticks user-selected in the second closed figures, with the second reference point for XY coordinate axis is set up in axle center; Wherein, the first closed figures is the closed figures that user chooses first, and the second closed figures is another closed figures that user then chooses;
Module F: for receiving the X value and Y value that user inputs, determine the offset point relative to the second reference point by X value and Y value, translation second closed figures, makes combined spot overlap with offset point;
Module G: for receiving the combination angle value that user inputs, is that the center of circle rotates the second closed figures with combined spot, makes the angle value of the lines corresponding to combined spot and the lines corresponding to the second reference point equal to combine angle value;
Module H: for replicated blocks E to module G, until the combination completing all closed figures in a complete planimetric map.
Preferably, in module C, lines corresponding to splice point are the lines between end points and adjacent node that in the second not closed figure, user selects, and the lines corresponding to the first reference point are the lines between end points and adjacent node that in the first not closed figure, user selects.
Preferably, in module G, lines corresponding to combined spot are the lines between node user-selected in the second closed figures and next node, and the lines corresponding to the second reference point are the lines between node user-selected in the first closed figures and next node.
Preferably, the closed figures of described closed figures for being made up of several sections of lines, the not closed figures of described not closed figure for being made up of several sections of lines.
Preferably, user-selected node is the tie point between lines and adjacent lines.
Compared to existing technology, beneficial effect of the present invention is: inputed in client by the not closed figure drawn by mapping worker or closed figures and process in interface, utilize method of the present invention to facilitate and determine quickly and relation between the relation that adjusts between not closed figure or closed figures, only needing to input according to actual conditions splicing and the combination that related data just can complete a complete planimetric map in real time.In addition, while greatly improving treatment effeciency, also ensure that the accuracy of the relation between each not closed figure or between each closed figures.
Embodiment
Below, by reference to the accompanying drawings and embodiment, the present invention is described further:
Present planimetric map process adopts computing machine to process mostly, and the scene that method of the present invention is applied is as follows, and a complete planimetric map is combined by several different closed figures, and a closed figures is formed by several not closed graphic joining.Such as, a complete planimetric map comprises a few part in parlor, kitchen and bedroom, so " parlor " this part is one of them closed figures, and this closed figures drawn according to measurement data by slip-stick artist, is the closed figure of of being enclosed by multistage lines.But, because completing of a closed figures may be processed by several survey crew, survey crew is responsible for the wherein part in this closed figures, therefore, this closed figures will be made up of several not closed figure, and a not closed figure is also formed by several sections of line and curve connections, only inc figure.
Based on above-mentioned scene, as shown in Figure 1, a kind of method of splicing and combination view, comprises the step for not closed graphic joining being become closed figures to method of the present invention, and for closed figures being combined into the step of complete planimetric map.
Wherein, for becoming the step of closed figures to comprise the following steps not closed graphic joining:
S1: for two not closed figures, is labeled as the first reference point by the end points that user in the first not closed figure selects, and the end points that user in the second not closed figure selects is labeled as splice point; Wherein, the first not closed figure is the not closed figure that user chooses first, and the second not closed figure is another not closed figure that user then chooses.
The several not closed figure drawn by mapping worker inputs in graphics process client, user chooses two not closed figures that be stitched together according to actual conditions, end points in the not closed figure choose user first time is labeled as the first reference point, and the end points in another the not closed figure choose user's second time is labeled as split point.Wherein, a not closed figure must have two end points, can be understood as starting point and terminal, as which end points of selection is operated by user.
S2: the not closed figure of translation second, makes splice point overlap with the first reference point.
By not closed figure (the first not closed figure) translation that the not closed figure (the second not closed figure) that second time is chosen was chosen to first time, the starting point of the second not closed figure is overlapped with the terminal of the first not closed figure.The effect of this step is the position relationship determining two not closed figures, and next step needs the angular relationship determined between them.
S3: the splicing angle value measured inputs in client by user, after having responded this splicing angle value, just be that the center of circle rotates the second not closed figure with splice point, make the angle value of the lines corresponding to splice point and the lines corresponding to the first reference point equal to splice angle value.Lines wherein corresponding to splice point refer to the lines between end points and adjacent node that in the second not closed figure, user selects, and the lines corresponding to the first reference point refer to the lines between end points and adjacent node that in the first not closed figure, user selects.Wherein, node refers to one section of tie point between lines and adjacent lines.
If the not closed visuals in a closed figures is greater than two, then perform S4.
S4: repeat S1 and S3, until complete the splicing of all not closed figures in a closed figures.
Step for closed figures being combined into complete planimetric map comprises the following steps:
Vertex ticks user-selected in first closed figures is the second reference point by S5: for two closed figures, is combined spot, with the second reference point for XY coordinate axis is set up in axle center by vertex ticks user-selected in the second closed figures; Wherein, the first closed figures is the closed figures that user chooses first, and the second closed figures is another not closed figure that user then chooses.
Several closed figures or the closed figures that obtained by above-mentioned S1-S4 input in client by mapping worker, user chooses according to actual conditions should split two closed figures together, vertex ticks in the closed figures choose user first time is the second reference point, vertex ticks in another closed figures choose user's second time is split point, with the second reference point for XY axle is set up in axle center.
S6: the X value that reception user inputs and Y value, determine the offset point relative to the second reference point by X value and Y value, translation second closed figures, makes combined spot overlap with offset point.Such as, the X value of user's input is 0, and Y value is 0, then combined spot, offset point and the second reference point three overlap, and namely selected in the second closed figures point overlaps with point selected in the first closed figures; If the X value of user's input is 1, Y value is 2, then represent that the point of point selected by the first closed figures selected in the second closed figures offsets 1 to X-axis positive dirction, to Y-axis positive dirction skew 2, the unit of concrete X value and Y value is preset in the client by user.
S7: receive the combination angle value that user is inputted by client, be that the center of circle rotates the second closed figures with combined spot, make the angle value of the lines corresponding to combined spot and the lines corresponding to the second reference point equal to combine angle value.
Wherein, in graphic plotting, a figure is drawn in order, start to draw lines with a bit, then this point is starting point, and one section is be connected by node between lines with adjacent lines, and the point at the end of drafting is then terminal, therefore lines are drawn in order, and node wherein also has sequencing.Therefore, preferably, lines corresponding to combined spot are the lines between node user-selected in the second closed figures and next node, and the lines corresponding to the second reference point refer to the lines between node user-selected in the first closed figures and next node.Such as, the combination angle value of input is 0, then the lines corresponding to combined spot are parallel with the lines corresponding to the second reference point; Input 90 degree, then the lines corresponding to combined spot are mutually vertical with the lines corresponding to the second reference point.Further, the lines corresponding to combined spot also can be selected by user, and due in a closed figures, a node is to there being two ends lines, and the rule therefore selected is, select wherein a section in two sections of lines corresponding to combined spot.
In S7, can also by the angle value of the lines corresponding to another kind of mode determination combined spot and the lines corresponding to the second reference point.User inputs an angle value by another input frame, lines then corresponding to combined spot rotate the angle corresponding to the angle value of input from current location, then show the angle value of the lines now corresponding to combined spot and the lines corresponding to the second reference point, user can again input an angle value according to the angle value of display and adjust.
If the closed figures part in a complete planimetric map is greater than two, then perform S8.
S8: repeat S5-S7, until the combination completing all closed figures in a complete planimetric map.
It should be noted that, in said method, be not to perform S1-S4, could S5-S8 be performed.S1-S4 is for not closed graphic joining is become closed figures, S5-S8 is for closed figures is combined into complete planimetric map, be two groups of relatively independent steps, if what input at the beginning is exactly multiple closed figures, then only needs to perform S5-S8 and can obtain a complete planimetric map.
Beneficial effect of the present invention is, being inputed in client by the not closed figure drawn by mapping worker or closed figures processes in interface, utilize method of the present invention to facilitate and determine quickly and relation between the relation that adjusts between not closed figure or closed figures, only needing in process interface, just to complete the relation between each part in a complete planimetric map according to actual conditions input correlation values.In addition, while greatly improving treatment effeciency, also ensure that the accuracy of the relation between each not closed figure or between each closed figures.
The invention also discloses a kind of device corresponding to said method, the device of a kind of splicing and combination view, comprises with lower module:
For not closed graphic joining being become the module of closed figures,
Modules A: for for two not closed figures, the end points that user in the first not closed figure selects is labeled as the first reference point, the end points that user in the second not closed figure selects is labeled as splice point; Wherein, the first not closed figure is the not closed figure that user chooses first, and the second not closed figure is another not closed figure that user then chooses;
Module B: for the not closed figure of translation second, makes splice point overlap with the first reference point;
Module C: for receiving the splicing angle value that user inputs, is that the center of circle rotates the second not closed figure with splice point, makes the angle value of the lines corresponding to splice point and the lines corresponding to the first reference point equal to splice angle value;
Module D: for replicated blocks A to module C, until the splicing completing all not closed figures in a closed figures;
With the module for closed figures being combined into complete planimetric map,
Module E: for for two closed figures, being the second reference point by vertex ticks user-selected in the first closed figures, is combined spot by vertex ticks user-selected in the second closed figures, with the second reference point for XY coordinate axis is set up in axle center; Wherein, the first closed figures is the closed figures that user chooses first, and the second closed figures is another closed figures that user then chooses;
Module F: for receiving the X value and Y value that user inputs, determine the offset point relative to the second reference point by X value and Y value, translation second closed figures, makes combined spot overlap with offset point;
Module G: for receiving the combination angle value that user inputs, is that the center of circle rotates the second closed figures with combined spot, makes the angle value of the lines corresponding to combined spot and the lines corresponding to the second reference point equal to combine angle value;
Module H: for replicated blocks E to module G, until the combination completing all closed figures in a complete planimetric map.
Preferably, in module C, lines corresponding to splice point are the lines between end points and adjacent node that in the second not closed figure, user selects, and the lines corresponding to the first reference point are the lines between end points and adjacent node that in the first not closed figure, user selects.
Preferably, in module G, lines corresponding to combined spot are the lines between node user-selected in the second closed figures and next node, and the lines corresponding to the second reference point are the lines between node user-selected in the first closed figures and next node.
Preferably, the closed figures of described closed figures for being made up of several sections of lines, the not closed figures of described not closed figure for being made up of several sections of lines.
Preferably, user-selected node is the tie point between lines and adjacent lines.
To one skilled in the art, according to technical scheme described above and design, other various corresponding change and deformation can be made, and all these change and deformation all should belong within the protection domain of the claims in the present invention.