CN106408627B - A kind of line symbol method for drafting - Google Patents

A kind of line symbol method for drafting Download PDF

Info

Publication number
CN106408627B
CN106408627B CN201610838776.XA CN201610838776A CN106408627B CN 106408627 B CN106408627 B CN 106408627B CN 201610838776 A CN201610838776 A CN 201610838776A CN 106408627 B CN106408627 B CN 106408627B
Authority
CN
China
Prior art keywords
line
texture
rectangular element
drafting
symbol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610838776.XA
Other languages
Chinese (zh)
Other versions
CN106408627A (en
Inventor
邓秀剑
张仟新
许宇
钟斌青
周挺
陈立威
张钰鹏
潘倩兮
胡志雄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Aeronautical Radio Electronics Research Institute
Original Assignee
China Aeronautical Radio Electronics Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Aeronautical Radio Electronics Research Institute filed Critical China Aeronautical Radio Electronics Research Institute
Priority to CN201610838776.XA priority Critical patent/CN106408627B/en
Publication of CN106408627A publication Critical patent/CN106408627A/en
Application granted granted Critical
Publication of CN106408627B publication Critical patent/CN106408627B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a kind of line symbol method for drafting comprising the steps of: Step 1: expanding using the line segment for forming line feature as rectangular centre line toward the direction perpendicular to line segment, forms continuous and independent one group of rectangular element;Step 2: at the crack of adjacent segments, 1 dot quadrangularly pel is inserted on corner bisector as length using w/2 when adjacent segments are corner;Wherein w is the width of rectangular element;Step 3: calculating the angular coordinate of each rectangular element and quadrilateral primitives;Step 4: creating and generating using rectangular element and quadrilateral primitives as the display list of basic element, texture is filled according to rectangular element and the angular coordinate of quadrilateral primitives in display list.The present invention rationally expands simplification to line feature pel, simplifies computational complexity, the method for realizing Fast Drawing line symbol, improves flexibility and draw efficiency that line symbol uses.

Description

A kind of line symbol method for drafting
Technical field
The present invention relates to the methods of real-time rendering line symbol when the operation of airborne vector numerical map software.
Background technique
Airborne digital map is the important component of modern aircraft avionics system.Line symbol is map datum symbolism Important content, for express on geographical space along some direction extend linear or band-like feature geographic element, such as river, road Road, supply line, state boundary etc..Since line symbol is usually described by smooth curve that anchor point in varying numbers forms, The consecutive variations of shape can produce solid line and intermittent line, it is also possible to which a variety of symbol superpositions and combined mode constitute complicated symbol Number, thus the tissue of line symbol and filling require a large amount of operations.
Under airborne circumstance, how limited hardware resource is utilized, balance appearance, the symbol plotting flexibility of line symbol It is the key problem that line symbol is drawn with drafting efficiency.Existing vector numerical map software generallys use three kinds of methods: one It is that pure function is drawn, writes a drafting function by the atural object type classification that symbol indicates, and for every a kind of symbol;Second is that longitudinal folded Add pel method, Complex Linear Symbol is longitudinally split at multiple basic units, it is drawn respectively from the origin-to-destination of symbol in order Each unit symbol is produced, longitudinal superposition of pel is completed;Third is that traverse cycle pel method, is defined as a complexity for line symbol Cycling element paintbrush, the filling of stepping along the line are drawn, and continuous line symbol is formed.Pure function method for drafting fast speed, but accord with Number editability and maintainability are poor, and user's customization and modification are very difficult;Longitudinal superposition combination of the pel method by basic unit Form complex symbol, using flexible, but after the same line splits into basic unit needs repeatedly to draw, while basic unit it Between need a large amount of calculating position dependences, it is lower to draw efficiency;Traverse cycle pel method is walked using a complex loops unit Into drafting, sliver symbol can be completed from the drafting of origin-to-destination single, but need to calculate the parameter of each stepping, It is relatively low that efficiency is drawn under airborne circumstance.
Summary of the invention
To overcome the problems, such as that the operation of airborne circumstance hardware resource and rendering capability are weaker, the present invention provides a kind of line symbol Method for drafting rationally expands simplification to line feature pel, simplifies computational complexity, the method for realizing Fast Drawing line symbol, Improve the flexibility and draw efficiency that line symbol uses.
A kind of line symbol method for drafting comprising the steps of:
Step 1: being expanded using the line segment for forming line feature as rectangular centre line toward the direction perpendicular to line segment, formed continuous Independent one group of rectangular element again;
Step 2: at the crack of adjacent segments, dividing equally using w/2 as length in corner when adjacent segments are corner 1 dot quadrangularly pel is inserted on line;Wherein w is the width of rectangular element;
Step 3: calculating the angular coordinate of each rectangular element and quadrilateral primitives;
Step 4: creating and generating using rectangular element and quadrilateral primitives as the display list of basic element, according to display Rectangular element and the angular coordinate of quadrilateral primitives fill texture in list.
Preferably, also comprising eliminating rectangle using stencil buffer when adjacent segments are corner in the step 4 The overlapping phenomenon of pel.
Preferably, it when a kind of line symbol method for drafting also includes picture scaling, is cached by Double Data, on backstage It is re-execute the steps one to four, then foreground is exchanged to by caching.
The invention has the benefit that, with less operation times, being met by rationally expanding simplification to line feature pel Line symbol draws demand, effectively reduces the occupancy to computing resource, takes into account symbol using flexible, effectively improves airborne vector The drawing efficiency of numerical map, works well, and is worthy to be popularized.
Detailed description of the invention
Fig. 1 is that line segment rectangular element expands schematic diagram;
Fig. 2 is line corner quadrilateral primitives rough schematic view;
Fig. 3 is that rectangular element parameter calculates schematic diagram;
Fig. 4 is pel rapid tissue and drafting schematic diagram;
Fig. 5 is a kind of flow diagram of line symbol method for drafting of the present invention.
Specific embodiment
For a better understanding of the present invention, below by drawings and examples, invention is further described in detail.
As shown in figure 5, a kind of line symbol fast drawing method, comprising the following steps: line segment rectangular element is expanded, line turns Angle quadrilateral primitives are simplified, pel parameter quickly calculates, pel rapid tissue and drafting.
(1) line segment rectangular element is expanded, and this method is past perpendicular to line to form the line segment of line feature as rectangular centre line Direction expand, form continuous and independent one group of rectangular element.
Vector line feature as shown in Figure 1Node is formed by n, n node can form n-1 Line segment.If line symbol width is w, it can be widened by n-1 line segment and form n-1 rectangle, line segmentRectangle can be formed A1B1C1D1, line segmentThe length of a length of corresponding line segment of rectangle A2B2C2D2 ... rectangle can be formed, width is the width of line symbol Spend w.
(2) line corner quadrilateral primitives simplify, this method when adjacent segments be corner when, in splitting for adjacent segments At seam, 1 dot quadrangularly pel is inserted into as length on corner bisector using w/2;Wherein w is the width of rectangular element
As shown in Fig. 2, between the rectangular element expanded by step 1, there are cracks, influence the visual effect of line symbol, If a large amount of points can be inserted by doing fillet at crack smoothly, the drafting efficiency of line is influenced, so the online corner of this method, using four Side shape pel simplifies, and using the angle point of line segment node and adjacent rectangle pel, is inserted into 1 point on corner bisector and forms four sides Shape pel,
(3) pel parameter quickly calculates, and this method is converted by space geometry, transports using Vector Rotation and apart from approximation Calculate the angular coordinate that algorithm quickly calculates each rectangular element and quadrilateral primitives.
As shown in figure 3, the coordinate for the L1 that sets up an office is (xL1, yL1), the coordinate of point L2 is (xL2, yL2), line segmentLength For h, line symbol intervals are w, and angle ∠ B1L1L2 is right angle.
Vector:
And:
Wherein:
Due to:
Cos (90 °)=0, sin (90 °)=1
The coordinate of substitute point L1 and L2 can obtain the coordinate of point B1 are as follows:
In the coordinate process for calculating point B1, only simple arithmetic can greatly improve meter without complicated calculations Calculate speed.The coordinate of the other points of rectangle can be calculated with similar method.
The coordinate of point A1 are as follows:
The coordinate of point C1 are as follows:
The coordinate of point D1 are as follows:
In the vertex of line corner quadrangle, it is only necessary to calculate the coordinate of the point Tn on the angular bisector that is newly inserted into, in Fig. 2, Point p is the intersection point of Δ C1L2B2 angular bisector and side C1B2, the coordinate of point p are as follows:
xp=(xc1+xb2)/2
yp=(yc1+yb2)/2
Line segmentLength be
It is reduced to (xp-xL2)+(yp-yL2)
The then coordinate of point T1 are as follows:
xT1=xL2+w·lpL2·(xp-xL2)/2
yT1=yL2+w·lpL2·(yp-yL2)/2
In this calculating process, also only simple arithmetic.
(4) it pel rapid tissue and draws, this method is according to the line segment rectangular element of calculating and corner quadrilateral primitives Coordinate creates and generates the display list using quadrangle as basic element, fills texture in rectangular element and quadrilateral primitives. Shape, color, size and the pattern that line symbol is extracted to circulation section, generate basic texture primitive.Using the starting point of line as texture Initial coordinate, to accumulate length along path as next node texture coordinate, texture coordinate is constantly cumulative, may be selected when being surround using texture Automatic duplicate characteristic, in direction along the line, setting texture repeats to surround, and when drafting shows list, keeps symbol texture cell automatic Cyclic pac king along the line forms the line symbol for meeting vision requirement, as shown in Figure 4.When picture scales, cached by Double Data, Line chart member parameter is being recalculated from the background, then foreground is exchanged to by caching, realize the smooth of pel zooming effect.Scheme drawing When first, using stencil buffer, the overlapping phenomenon of rectangular element when eliminating line corner optimizes display effect.

Claims (3)

1. a kind of line symbol method for drafting comprising the steps of:
Step 1: being expanded using the line segment for forming line feature as rectangular centre line toward the direction perpendicular to line segment, formed continuous and only One group of vertical rectangular element;
Step 2: being length on corner bisector using w/2 at the crack of adjacent segments when adjacent segments are corner It is inserted into 1 insertion point, forms quadrilateral primitives using line segment node, the angle point of adjacent rectangle pel and insertion point;Wherein w is square The width of shape pel;
Step 3: calculating the angular coordinate of each rectangular element and quadrilateral primitives;
Step 4: creating and generating using rectangular element and quadrilateral primitives as the display list of basic element, according to display list Middle rectangular element and the angular coordinate of quadrilateral primitives fill texture;Wherein fill the mode of texture are as follows: using the starting point of line as line Initial coordinate is managed, to accumulate length along path as next node texture coordinate, texture coordinate is constantly cumulative, optional when surrounding using texture Automatic duplicate characteristic is selected, texture is set in direction along the line and repeats to surround, when drafting shows list, makes symbol texture cell certainly Cyclic pac king along dynamic.
2. a kind of line symbol method for drafting according to claim 1, it is characterised in that also comprising working as in the step 4 When adjacent segments are corner, the overlapping phenomenon of rectangular element is eliminated using stencil buffer.
3. a kind of line symbol method for drafting according to claim 1, it is characterised in that when also comprising picture scaling, pass through Double Data caching is re-executeing the steps one to four, then exchange to foreground by caching from the background.
CN201610838776.XA 2016-09-21 2016-09-21 A kind of line symbol method for drafting Active CN106408627B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610838776.XA CN106408627B (en) 2016-09-21 2016-09-21 A kind of line symbol method for drafting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610838776.XA CN106408627B (en) 2016-09-21 2016-09-21 A kind of line symbol method for drafting

Publications (2)

Publication Number Publication Date
CN106408627A CN106408627A (en) 2017-02-15
CN106408627B true CN106408627B (en) 2019-05-24

Family

ID=57996890

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610838776.XA Active CN106408627B (en) 2016-09-21 2016-09-21 A kind of line symbol method for drafting

Country Status (1)

Country Link
CN (1) CN106408627B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107564087B (en) * 2017-09-11 2019-08-06 南京大学 A kind of Three-D linear symbol rendering method based on screen
CN111524446B (en) * 2019-02-01 2021-11-12 阿里巴巴集团控股有限公司 Data processing method and device, electronic equipment and readable storage medium
CN115082592A (en) * 2022-07-15 2022-09-20 广州鑫景信息科技服务有限公司 Curve generation method, system, computer equipment and storage medium
CN118229829B (en) * 2024-05-23 2024-08-06 北京山维科技股份有限公司 Linear ground object element symbol display method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136767A (en) * 2011-11-24 2013-06-05 北京图盟科技有限公司 Vector diagram drawing method and device
CN104268911A (en) * 2014-09-18 2015-01-07 腾讯科技(深圳)有限公司 Method and device for drawing route in map
CN105719230A (en) * 2016-01-11 2016-06-29 南京师范大学 GPU-based color gradual change linear map symbol drafting method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4998386B2 (en) * 2008-06-27 2012-08-15 富士通セミコンダクター株式会社 Line drawing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136767A (en) * 2011-11-24 2013-06-05 北京图盟科技有限公司 Vector diagram drawing method and device
CN104268911A (en) * 2014-09-18 2015-01-07 腾讯科技(深圳)有限公司 Method and device for drawing route in map
CN105719230A (en) * 2016-01-11 2016-06-29 南京师范大学 GPU-based color gradual change linear map symbol drafting method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"基于OpenGL技术的铸造CAE图形学的研究与开发";张春明;《中国优秀博硕士学位论文全文数据库(硕士) 工程科技I辑》;20060515;论文第8页
"基于规则格网DEM线状矢量要素三维可视化方法";程绵绵等;《测绘工程》;20150228;第24卷(第2期);论文第39-41页及图3、图4

Also Published As

Publication number Publication date
CN106408627A (en) 2017-02-15

Similar Documents

Publication Publication Date Title
CN106408627B (en) A kind of line symbol method for drafting
US8773439B2 (en) Approximation of stroked higher-order curved segments by quadratic bèzier curve segments
US9672656B1 (en) Variable level-of-detail map rendering
CN101751682B (en) Preparation method of universal map
CN105513110A (en) GPU-based method for drawing linetype map symbol with gradually-varied width
CN102147936B (en) Cascade-based method for seamlessly superposing two-dimensional vectors on three-dimensional topography surface
US20150332481A1 (en) Indexed uniform styles for stroke rendering
CN109237999B (en) Method and system for drawing batch three-dimensional situation target trail in real time
CN103559374A (en) Method for subdividing surface split type curved surfaces on multi-submesh model
KR20140073480A (en) Rendering a text image following a line
CN109934893B (en) Method and device for displaying any cross section of geometric body and electronic equipment
US20200279415A1 (en) Efficiently Computed Distance Fields
CN103439743A (en) Method for drawing seismic data profile graph
US20160307294A1 (en) Systems and Methods for Displaying Patterns of Recurring Graphics on Digital Maps
KR20050030569A (en) Image processing apparatus and method thereof
CN103544729A (en) Animation data processing method and system
CN113066176B (en) Map data processing method, device, equipment and storage medium
JP4664169B2 (en) Graphic drawing apparatus and graphic drawing program
US10593111B2 (en) Method and apparatus for performing high throughput tessellation
JP6297169B2 (en) Drawing apparatus and drawing method
CN111091620A (en) Map dynamic road network processing method and system based on graphics and computer equipment
CN115761166A (en) Map construction method based on vector tiles and application thereof
CN111127589B (en) Vector map circular dotted line symbol drawing method considering line width consistency
CN111145301B (en) Vector map solid line symbol end drawing method considering line width consistency
CN113066179B (en) Map data processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant