CN102799352A - Method for capturing graph nodes - Google Patents
Method for capturing graph nodes Download PDFInfo
- Publication number
- CN102799352A CN102799352A CN2012101992560A CN201210199256A CN102799352A CN 102799352 A CN102799352 A CN 102799352A CN 2012101992560 A CN2012101992560 A CN 2012101992560A CN 201210199256 A CN201210199256 A CN 201210199256A CN 102799352 A CN102799352 A CN 102799352A
- Authority
- CN
- China
- Prior art keywords
- seizure
- point
- key element
- node
- judge
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 26
- 238000013459 approach Methods 0.000 claims description 14
- 230000006870 function Effects 0.000 claims description 13
- 238000011161 development Methods 0.000 claims description 8
- 238000012360 testing method Methods 0.000 claims description 5
- 238000012067 mathematical method Methods 0.000 claims description 3
- 238000009877 rendering Methods 0.000 claims description 3
- 238000005457 optimization Methods 0.000 abstract 1
- 238000012216 screening Methods 0.000 abstract 1
- 238000013461 design Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 239000012467 final product Substances 0.000 description 1
- 238000011017 operating method Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Landscapes
- Processing Or Creating Images (AREA)
Abstract
The invention discloses a method for capturing graph nodes for dynamically displaying capturing point position marks in real time. According to the method, the capturing mode is divided into conventional capturing and unconventional capturing; by matching use of conventional capturing and unconventional capturing and control of a user, capturing points can be acquired with lowest cost (time and operating steps) according to the requirement of the user; and data optimization and capturing strategies are improved by combing characteristics of ArcGIS software, and efficiency and using habit can be furthest considered in actual use. Because the capturing points can be dynamically displayed, coordinate information of the capturing points is clear for the user, and particularly for many graphs, screening and selection are facilitated; and the method is convenient and intuitive to operate, and realizes 'what you see is what you get'.
Description
Technical field
The present invention relates to a kind of method that node is caught that under the ArcGIS platform, realizes, especially a kind of method for catching that can reflect the node that captures directly, in real time.
Background technology
Node is caught, and is a kind of technology of obtaining the existing graphics coordinate.In the data edition process, indispensable effect is arranged, direct relation user's experience and editorial efficiency.In CAD software, owing to pay attention to Graphics Design, focus on the data edition function, aspect the node capture function, be exactly the mode of a kind of " What You See Is What You Get ".The user can see the node of seizure intuitively in newly-built and editing graph process; Opposite, GIS software is paid attention to the management of data and is shared the particularly management of the spatial database of magnanimity; Be different from the file management of CAD software, aspect the node seizure, can't accomplish What You See Is What You Get; And, aspect capturing efficiency, also there is certain bottleneck because data volume is huge.Must, not enough below the node capture function under the ArcGIS software exists:
1, compares CAD software, have inconvenient operation, shortcoming intuitively not.In ArcGIS 9.3 platforms,, two kinds of modes of operation are arranged in order to catch the node coordinate of existing graphics.A kind of operation is to click right button at the node place that will catch, in right-click menu, selects to catch menu, carries out and catches; A kind of in addition operation is a catching mode of opening the figure layer, directly clicks node and carries out the node seizure.In 9.3 upgraded version ArcGIS 10, though improvement is arranged, and CAD software is by comparison, also has tangible gap;
2, catching mode is dumb, and user's controllability is poor.In CAD software, support the seizure of multiple node, when catching, can carry out fast and catch.In order to improve capturing efficiency, the user can directedly catch (promptly only catching a certain type node), in the time of also can carrying out quite a few kinds of conditions seizure at the same time, finds optimum seizure point;
3, can not take into account efficient and use habit.Under the condition of mass data, how to guarantee capturing efficiency, and remove to catch node with the mode of " What You See Is What You Get ", under existing condition, also need certain optimisation strategy to realize.
Summary of the invention
In order to solve the seizure problem of above-mentioned ArcGIS secondary development application system, the invention provides a kind of method that realizes that graphical nodes is caught, mainly comprise the steps:
Step 1: captured object initialization;
Step 2: in the MouseMove function of ArcGIS order ITool, realize capture-process:
At first, calculate the seizure node:
To catch node and be divided into two types: regular node and unconventional node, regular node comprises node, mid point and closest approach, unconventional node comprises point on the center of circle, intersection point, vertical point and the extended line; The second development interface that utilizes ArcGIS to provide, the seizure of regular node can directly be obtained, and unconventional node can calculate through the mathematical method that said interface provides;
(1) uses the IFeatureCache interface to set up the key element buffer memory, only need during seizure the key element in the IFeatureCache set is caught;
(2) use the IHitTest interface among the ArcEngine to make hit testing, whether can capture a little to judge in current set point and the marginal range;
(3) seizure of regular node:
(a) judge that current seizure point whether in the scope that the key element buffer memory is comprised, if comprise, then changes next step,, then catch radius and rebuild the key element buffer memory according to current point and node if do not comprise;
(b) obtain the key element of key element buffer memory,, then return sky if key element is empty;
(c) judge whether to capture closest approach, as can not, then obtain next buffer memory key element, change step (b);
(d) judge the current seizure of whether setting mid point,, then change next step if having; No, then change step (h);
(e) judge currently whether can capture mid point, then forward step (h) to as not catching, if any then changeing next step;
(f) judge whether to catch end points, if not, then return middle point coordinate; If then change next step;
(g) judge whether to capture end points, if could the return terminal point coordinate otherwise would return middle point coordinate;
(h) judge whether to catch end points, if then judge whether to be provided with the seizure end points, if return terminal point coordinate then, otherwise next step;
(i) judge whether to catch closest approach,, otherwise obtain next buffer memory key element, change step (b) if then return the closest approach coordinate;
The seizure of (4) putting on the center of circle, hang down point, the extended line:
(a) make up single key element choice set through current point coordinate and seizure radius;
(b) judge the seizure type, next step is then changeed in the center of circle in this way, if the point that hangs down then changes step (d), prolongs point and then changes step (e);
(c) obtain key element and judge that whether current key element is the circle key element, if then return central coordinate of circle, otherwise returns sky;
(d) obtain the vertical point of key element and calculating, return vertical point coordinate;
(e) obtain key element and calculating prolongation point, return the prolongation point coordinate;
(5) seizure of intersection point:
(a) make up many key elements choice set through current point coordinate and seizure radius;
(b) find intersection in twos between the key element obtains intersection point and then returns intersecting point coordinate, otherwise returns sky;
Then, draw a seizure point mark:
Utilize the IDisplay interface among the ArcEngine, after the seizure interface captures a little, make up a key element through catching point, and the symbolization parameter is drawn.
Further, the drafting flow process of said drafting seizure point mark is:
(a) judge whether the seizure mark key element a that drew last time is empty,, then draw once more and catch mark key element a, in map window, wipe mark as not being empty;
(b) judge that whether new seizure key element mark b is empty, as then not drawing new seizure key element mark b, and the value of b is composed to a for empty.
Further, said drafting is caught in the step of some mark, when rendered object is caught the mark drafting, adopts esriROPNot * OrPen rendering parameter.
Further, the initialized method of said captured object is:
When (1) opening loading data, make up and catch manager object, catch manager object and comprise capture function switching variable, directed seizure categorical variable and captured object set in system;
(2) obtain the set of figure layer,, then create captured object based on the current layer type if current layer is not empty; Captured object is divided into a key element captured object, line feature captured object and face key element captured object; Each captured object comprises information such as capture switch variable, seizure figure layer, has also realized simultaneously based on mouse point coordinate and the interface function of catching radius seizure point;
(3) captured object is added in the captured object set of catching manager object;
(4) obtain next figure layer, return step (2).
Through adopting said method, the present invention can show a seizure point position mark in real time, realizes the dynamic demonstration of a some mark; Let the user that the point coordinate information of catching is come into plain view, particularly when figure is more, be convenient to screen and choose; Easy to operate directly perceived, accomplish " What You See Is What You Get "; In addition, the present invention can also support multiple catching mode, and user's controllability is strong.The present invention is divided into conventional the seizure and unconventional seizure with catching mode; The conventional seizure promptly is less catching mode consuming time; Catch like node, mid point and closest approach; Unconventional seizure promptly is to need through the seizure of calculating in real time, and the present invention is referred to as directed the seizure, for example the center of circle, intersection point, the some seizure etc. of hanging down.Routine seizure and unconventional seizure are used,, can catch point with cost (time and the operating procedure) acquisition of minimum according to customer requirements by user's control; At last, the present invention is in conjunction with the characteristic of ArcGIS software, data-optimized and catch and also done certain research aspect tactful, can farthest accomplish taking into account of efficient and use habit during actual the use.
Description of drawings
Fig. 1 is a captured object initialization schematic flow sheet.
Fig. 2 is the capture-process synoptic diagram.
Fig. 3 is the schematic flow sheet that regular node is caught.
Fig. 4 is the seizure schematic flow sheet of putting on the center of circle, vertical point, the extended line.
Fig. 5 is the seizure schematic flow sheet of intersection point.
Fig. 6 is the drafting schematic flow sheet of catching the some mark.
Embodiment
Below in conjunction with accompanying drawing and embodiment the present invention is done further explain.
Seizure node in the inventive method is divided into following 9 types:
1, node is promptly put the point of key element.
2, summit, the i.e. node of line and face key element.
3, mid point, the i.e. mid point of the line segment of line and face key element two nodes composition.
4, closest approach, on the line segment that promptly online and face key element two nodes are formed from catching the nearest point of point.
5, intersection point, i.e. intersection point between line, the face key element.
6, the center of circle.
7, the point of contact of putting on the circle key element object is promptly caught at point of contact.
8, vertical point is promptly caught the intersection point point of point on line segment.
9, prolong point, the i.e. prolongation of line point.
The present invention includes following steps:
Step 1: captured object initialization
As shown in Figure 1, in the system loads data, need to use captured object initialization flow process:
When (1) opening loading data, make up and catch manager object, catch manager object and comprise capture function switching variable, directed seizure categorical variable and captured object set in system;
(2) obtain the set of figure layer,, then create captured object based on the current layer type if current layer is not empty; Captured object is divided into a key element captured object, line feature captured object and face key element captured object; Each captured object comprises information such as capture switch variable, seizure figure layer, has also realized simultaneously based on mouse point coordinate and the interface function of catching radius seizure point;
(3) captured object is added in the captured object set of catching manager object;
(4) obtain next figure layer, return step (2).
Step 2: as shown in Figure 2, in the MouseMove function of ArcGIS order ITool, realize capture-process.Main seizure manager and the seizure essential factor management device of utilizing calculates the seizure point coordinate in real time and catches the some mark with drafting, accomplishes " What You See Is What You Get ":
1, catches the calculating of node
The second development interface that mainly utilizes ArcGIS to provide is caught the calculating of node.For the seizure of regular node, ArcGIS provides second development interface directly to obtain; For unconventional node, the mathematical method that can utilize the ArcGIS second development interface to provide goes to calculate, for example two straight line find intersections, ask the prolongation point, asking the point or the like that hangs down.
Capture function mainly uses two interfaces among the ArcEngine, and one is that the IHitTest interface is used to do hit testing, and another is the IFeatureCache interface, is used to set up the key element buffer memory.The purpose of key element buffer memory exactly in order to set up the set of current captured object, is a set that dynamically updates, and can improve capturing efficiency.During seizure, the key element in only need gathering IFeatureCache caught and got final product.
(1) use of IFeatureCache
IFeatureCache is mainly used in and sets up the key element buffer memory, and provides interface to judge whether and will rebuild, and main usage is following, can be with reference to ArcGIS secondary development help document.
(a) initialization:
IFeatureCache?m_FeatureCache=new?FeatureCacheClass();
(b) make up the key element buffer memory:
m_FeatureCache.Initialize(snapPoint,distance*10);
m_FeatureCache.AddFeatures(featureClass);
(c) judge whether buffer memory needs to rebuild:
m_FeatureCache.Contains(point);
(d) obtaining of buffer memory key element:
(2) use of IHitTest
Whether IHitTest is used for doing hit testing, judges in current set point and the marginal range, can capture a little.Main usage is following, can be with reference to ArcGIS secondary development help document:
(3) seizure of regular node (as shown in Figure 3):
(a) judge that current seizure point whether in the scope that the key element buffer memory is comprised, if comprise, then changes next step,, then catch radius and rebuild the key element buffer memory according to current point and node if do not comprise;
(b) obtain the key element of key element buffer memory,, then return sky if key element is empty;
(c) judge whether to capture closest approach, as can not, then obtain next buffer memory key element, change step (b);
(d) judge the current seizure of whether setting mid point,, then change next step if having; No, then change step (h);
(e) judge currently whether can capture mid point, then forward step (h) to as not catching, if any then changeing next step;
(f) judge whether to catch end points,, then return middle point coordinate if not, if could next step;
(g) judge whether to capture end points, if could the return terminal point coordinate otherwise would return middle point coordinate;
(h) judge whether to catch end points, if then judge whether to be provided with the seizure end points, if return terminal point coordinate then, otherwise next step;
(i) judge whether to catch closest approach,, otherwise obtain next buffer memory key element, change step (b) if then return the closest approach coordinate;
The seizure (as shown in Figure 4) of (4) putting on the center of circle, hang down point, the extended line:
(a) make up single key element choice set through current point coordinate and seizure radius;
(b) judge the seizure type, next step is then changeed in the center of circle in this way, if the point that hangs down then changes step (d), prolongs point and then changes step (e);
(c) obtain key element and judge that whether current key element is the circle key element, if then return central coordinate of circle, otherwise returns sky;
(d) obtain the vertical point of key element and calculating, return vertical point coordinate;
(e) obtain key element and calculating prolongation point, return the prolongation point coordinate.
(5) seizure of intersection point (as shown in Figure 5):
(a) make up many key elements choice set through current point coordinate and seizure radius;
(b) find intersection in twos between the key element obtains intersection point and then returns intersecting point coordinate, otherwise returns sky.
2, catch the drafting of some mark
In order to improve drafting efficient, can only the schematic capture mark directly be plotted on the screen, and can not add the data the inside to, otherwise can take the extra time of reading and writing data and demonstration, the requirement that does not reach efficient as graphical element.
Catch the drafting of key element, mainly realize through the IDisplay interface among the ArcEngine.After the seizure interface captures a little, make up a key element through catching point, and adopt certain symbolic parameter to draw.When rendered object is caught the mark drafting, adopt the esriROPNotXOrPen rendering parameter, when same like this key element is drawn second time, be on screen this key element is wiped, return to the state before not drawing.
The drafting flow process of catching the some mark is as shown in Figure 6, and concrete steps are:
(a) judge whether the seizure mark key element a that drew last time is empty,, then draw once more and catch mark key element a, in map window, wipe mark as not being empty;
(b) judge that whether new seizure key element mark b is empty, as then not drawing new seizure key element mark b, and the value of b is composed to a for empty.
In order to improve the efficient of seizure, guarantee practicality, the present invention combines the software feature of ArcGIS, and the optimisation strategy of employing is following:
First: the data staging display strategy.The map datum classification display can be optimized the data under the current displaying ratio chi, removes the unconcerned data of user, can improve data presentation speed so on the one hand, can reduce the figure layer (sightless figure layer does not participate in catching) of participating in seizure simultaneously.
Second: the spatial index of setting up classification.According to the ratio data chi, set up the first order and the second level spatial index of data.First order engineer's scale size is length half the of standard proportional chi mapborder, and spatial index size in the second level is the length of standard proportional chi mapborder.The foundation of spatial index can reduce the total amount of data of key element buffer memory.
The the 3rd: utilize the key element caching technology.The current data storing that will catch in the buffer memory the inside, can be reduced the time that key element is obtained, improve access efficiency.When the map window ranges changes, need reconstruct key element buffer memory.
The the 4th: catch hierarchical policy.When user's mouse position can capture dissimilar node, need catch according to the priority level of catching type.For single key element, do closest approach earlier and catch to test whether can capture point coordinate, judge whether the seizure of mid point and node then, and catch the distance relation between the point according to nearest seizure point and other, select optimum seizure point.This strategy has obtained embodiment in algorithm.
Claims (4)
1. a method that realizes that graphical nodes is caught is characterized in that, comprises the steps:
Step 1: captured object initialization;
Step 2: in the MouseMove function of ArcGIS order ITool, realize capture-process:
At first, calculate the seizure node:
To catch node and be divided into two types: regular node and unconventional node, regular node comprises node, mid point and closest approach, unconventional node comprises point on the center of circle, intersection point, vertical point and the extended line; The second development interface that utilizes ArcGIS to provide, the seizure of regular node can directly be obtained, and unconventional node can calculate through the mathematical method that said interface provides;
(1) uses the IFeatureCache interface to set up the key element buffer memory, only need during seizure the key element in the IFeatureCache set is caught;
(2) use the IHitTest interface among the ArcEngine to make hit testing, whether can capture a little to judge in current set point and the marginal range;
(3) seizure of regular node:
(a) judge that current seizure point whether in the scope that the key element buffer memory is comprised, if comprise, then changes next step,, then catch radius and rebuild the key element buffer memory according to current point and node if do not comprise;
(b) obtain the key element of key element buffer memory,, then return sky if key element is empty;
(c) judge whether to capture closest approach, as can not, then obtain next buffer memory key element, change step (b);
(d) judge the current seizure of whether setting mid point,, then change next step if having; No, then change step (h);
(e) judge currently whether can capture mid point, then forward step (h) to as not catching, if any then changeing next step;
(f) judge whether to catch end points, if not, then return middle point coordinate; If then change next step;
(g) judge whether to capture end points, if could the return terminal point coordinate otherwise would return middle point coordinate;
(h) judge whether to catch end points, if then judge whether to be provided with the seizure end points, if return terminal point coordinate then, otherwise next step;
(i) judge whether to catch closest approach,, otherwise obtain next buffer memory key element, change step (b) if then return the closest approach coordinate;
The seizure of (4) putting on the center of circle, hang down point, the extended line:
(a) make up single key element choice set through current point coordinate and seizure radius;
(b) judge the seizure type, next step is then changeed in the center of circle in this way, if the point that hangs down then changes step (d), prolongs point and then changes step (e);
(c) obtain key element and judge that whether current key element is the circle key element, if then return central coordinate of circle, otherwise returns sky;
(d) obtain the vertical point of key element and calculating, return vertical point coordinate;
(e) obtain key element and calculating prolongation point, return the prolongation point coordinate;
(5) seizure of intersection point:
(a) make up many key elements choice set through current point coordinate and seizure radius;
(b) find intersection in twos between the key element obtains intersection point and then returns intersecting point coordinate, otherwise returns sky;
Then, draw a seizure point mark:
Utilize the IDisplay interface among the ArcEngine, after the seizure interface captures a little, make up a key element through catching point, and the symbolization parameter is drawn.
2. method according to claim 1 is characterized in that the drafting flow process of said drafting seizure point mark is:
(a) judge whether the seizure mark key element a that drew last time is empty,, then draw once more and catch mark key element a, in map window, wipe mark as not being empty;
(b) judge that whether new seizure key element mark b is empty, as then not drawing new seizure key element mark b, and the value of b is composed to a for empty.
3. method according to claim 1 and 2 is characterized in that, said drafting is caught in the step of some mark, when rendered object is caught the mark drafting, adopts the esriROPNotXOrPen rendering parameter.
4. method according to claim 1 and 2 is characterized in that the initialized method of said captured object is:
When (1) opening loading data, make up and catch manager object, catch manager object and comprise capture function switching variable, directed seizure categorical variable and captured object set in system;
(2) obtain the set of figure layer,, then create captured object based on the current layer type if current layer is not empty; Captured object is divided into a key element captured object, line feature captured object and face key element captured object; Each captured object comprises information such as capture switch variable, seizure figure layer, has also realized simultaneously based on mouse point coordinate and the interface function of catching radius seizure point;
(3) captured object is added in the captured object set of catching manager object;
(4) obtain next figure layer, return step (2).
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2012101992560A CN102799352A (en) | 2012-06-18 | 2012-06-18 | Method for capturing graph nodes |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2012101992560A CN102799352A (en) | 2012-06-18 | 2012-06-18 | Method for capturing graph nodes |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN102799352A true CN102799352A (en) | 2012-11-28 |
Family
ID=47198469
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2012101992560A Pending CN102799352A (en) | 2012-06-18 | 2012-06-18 | Method for capturing graph nodes |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN102799352A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104750726A (en) * | 2013-12-30 | 2015-07-01 | 北京中盈安信技术服务有限公司 | Three-dimensional map coordinate determining method and device |
| CN107248182A (en) * | 2017-06-07 | 2017-10-13 | 王征 | A kind of system and method for the polygon rendering based on magnet suction device |
| CN110109844A (en) * | 2014-03-27 | 2019-08-09 | 英特尔公司 | System conformance in the classification of distributive image process device |
-
2012
- 2012-06-18 CN CN2012101992560A patent/CN102799352A/en active Pending
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104750726A (en) * | 2013-12-30 | 2015-07-01 | 北京中盈安信技术服务有限公司 | Three-dimensional map coordinate determining method and device |
| CN110109844A (en) * | 2014-03-27 | 2019-08-09 | 英特尔公司 | System conformance in the classification of distributive image process device |
| CN107248182A (en) * | 2017-06-07 | 2017-10-13 | 王征 | A kind of system and method for the polygon rendering based on magnet suction device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11087561B2 (en) | Three-dimensional sketching in mobile augmented reality | |
| US9268423B2 (en) | Definition and use of node-based shapes, areas and windows on touch screen devices | |
| CN103003789B (en) | Adjustable and progressive mobile device street view | |
| CA2549809C (en) | Method of displaying and interacting with information on a rotary fabric | |
| CA2886429C (en) | Method for partitioning, managing and displaying a collaboration space and interactive input system employing same | |
| US10031928B2 (en) | Display, visualization, and management of images based on content analytics | |
| US20210364313A1 (en) | Mapping method and device of map engine, terminal device, and storage medium | |
| CN111475097B (en) | A kind of handwriting selection method, device, computer equipment and storage medium | |
| US9529696B2 (en) | Screen bounds for view debugging | |
| CN102855132B (en) | A kind of choosing method of Drawing Object and system | |
| TW201203084A (en) | Temporary formatting and charting of selected data | |
| DE112013002803T5 (en) | A method, system and apparatus for providing a three-dimensional transition animation for changing a map view | |
| CN103678501B (en) | A kind of super large remote sensing image display packing based on pyramid and visual renderings engine | |
| CN109859109A (en) | A kind of Serial Scale PDF map seamless organization and display methods | |
| US8610743B2 (en) | Systems and methods for displaying, viewing and navigating three dimensional representations | |
| CN107943365A (en) | Line handwriting presenting method and device, electronic equipment and storage medium | |
| JP2006164049A (en) | GUI program, data processing apparatus, and object operation method | |
| CN100429658C (en) | Big capacity image fast browsing system | |
| US7432927B2 (en) | Extended portfolio chart drawing device, processing method and computer-readable medium recording a program of the same | |
| CN104991918A (en) | WEBGIS based online big data display method | |
| CN102799352A (en) | Method for capturing graph nodes | |
| CN107817935A (en) | Application interface display method and device, terminal and computer readable storage medium | |
| US10534523B1 (en) | Independent control of map data display | |
| CN106599004A (en) | Method and device for displaying map data | |
| CN111061381A (en) | Screen global input control system and method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20121128 |