A kind of efficient method for drafting of flight pathTechnical field
The present invention relates to a kind of efficient method for drafting of flight path.
Background technology
Flight path is a kind of user data critically important in navigation equipment peculiar to vessel, the navigation rail passed through for recording shipMark.As memory storage capabilities are increasing, the points that navigation equipment can be supported recording flight path are more and more.This also bringsOne problem, the drafting of flight path allow equipment increasingly to block with increasing of counting of flight path in use.
The storage organization of flight path is generally made of flight path section one by one, and flight path section is made of a certain amount of track points again.Whether each flight path section has corresponding bounding box information, bounding box information to be used to judge current flight path section in the screen for needing to drawIn range, the flight path section not in screen ranges is skipped to improve flight path and draws efficiency.But it is bigger in chart scaleWhen, a large amount of flight path is shown in screen ranges, and the method for bounding box filtering at this time can not improve drafting efficiency well.
The present invention is based on above-mentioned deficiencies to be studied, and spy proposes a kind of efficient method for drafting of flight path.
Invention content
The purpose of the present invention is to provide a kind of efficient method for drafting of flight path, under the premise of avoiding flight path from being distorted, significantlyIt improves flight path and draws efficiency.
To reach above-mentioned technical purpose, technical method of the invention is as follows:
A kind of efficient method for drafting of flight path, including:According to optimization it needs to be determined that track points in each flight path section, directly drawThe bounding box of flight path section so that pixel quantity shared by the bounding box diagonal line of the flight path section is less than a setting value P, then by instituteThere is bounding box to connect composition track line.
Setting value p=5.
Filling can be used in the mode for drawing the bounding box of flight path section, dot is drawn, diagonal line is drawn or rectangular edges are drawn.
After the above method, the positive effect of the present invention is:By directly drawing flight path section bounding box, then pass through packetIt encloses box and draws out flight path, flight path shape and traditional track points one by one flight path connected are substantially similar, in flight path section packetEnclose box it is sufficiently small in the case of, the flight path of the two, which is visually seen, reaches identical, without the drafting line put one by oneTrack points substantially increase drafting efficiency.
Description of the drawings
Fig. 1 is the Bounding Box schematic diagram that the drafting mode of existing flight path is drawn out;
Fig. 2 is the comparison diagram that existing way draws out flight path with the present invention;
Fig. 3 is bounding box diagonal line schematic diagram;
The track plot that Fig. 4 is drawn out when being p=5.
Specific implementation mode
The drafting mode of existing flight path is simple track points one by one of drawing track points will connect one by one again,To form a complete flight path section, as shown in Figure 1, rectangle frame is the bounding box of the flight path section.
When chart scale is bigger, the point in a flight path section all piles up in the region of very little, the packet drawn outEnclose one piece of region that box is also very little.It is that will normally draw flight path under certain chart scale and only draw and surround shown in Fig. 2Box is compared, and the flight path of the two, which is visually seen, reaches identical.
Therefore, the present invention discloses a kind of efficient method for drafting of flight path, including:According to optimization it needs to be determined that each flight path sectionIn track points, directly draw flight path section bounding box so that pixel quantity is less than shared by the bounding box diagonal line of the flight path sectionThen all bounding boxs are connected composition track line by one setting value P.Figure it is seen that using the present invention efficientThe flight path shape that method for drafting obtains is substantially similar to Fig. 1, if flight path section bounding box is sufficiently small, the flight path of the two is visuallySee it can is identical, and directly drawing bounding box can be more many soon than the efficiency of line after the track points of drafting one by one.Draw boatFilling can be used in the mode of the bounding box of mark section, dot is drawn, diagonal line is drawn or rectangular edges are drawn.
Accordingly, it is determined that can the size in bounding box region be the key that directly to obtain flight path by drawing bounding box, and lead toThe size in bounding box region can be judged by crossing the cornerwise length d of bounding box rectangle;As shown in figure 3, when the packet of flight path sectionIt encloses box catercorner length d and is less than certain pixel p, it will be able to filling flight path section bounding box is directly drawn, without point one by oneDrafting line track points, under the premise of p value setting is rational, the flight path image of drafting and the flight path image of ordinary drawn can notBy visually seeing difference.
As shown in figure 4, as setting value p=5, flight path has no distortion phenomenon, but P values, depending on optimizing intensity, p is bigger, excellentChange intensity is bigger, and image fault is more, and P is not limited to this example, can be adjusted according to actual needs.
It is filling bounding box rectangle that the present embodiment, which is taken and draws the mode of bounding box, can also be wrapped by drawing in software realizationIt encloses box diagonal line or other modes is waited to be drawn.