While positioning area features the situation often arises when two features are located side by side and that is why a part of their boundaries is common for both features. It means that some edges of boundaries of two features should strictly coincide with one another. A similar situation which requires precise coincidence arises in other cases: when a line feature is passing along the boundary of area feature, when two line features partially coincide, and also when a point feature is lying on a line feature or on the boundary of an area one.
When performing interactive adding of features it is difficult to achieve precise coincidence of lines. It may happen so that instead of coincident edges very close edges will be built which is undesirable and sometimes even inadmissible.
The solution to this problem is using the mode of attraction which is turned on by the checkbox Attraction in the lower part of the window “Editor control” (see figure 17-2). The value for attraction radius is set in the field Radius located close to it.
Attraction mode includes the following actions:
Attraction to a vertex. If in the process of adding a new feature vertex (or moving the existing vertex) the system detects that there is some vertex of some other feature within the range of attraction radius, the new vertex is located in the same position that the existing one (or the closest of the existing vertices if there are several vertices in the range of attraction radius). This attraction variant is shown at figure 18-18, a.
Attraction to an edge. If there is no vertex of another feature within attraction radius from a new vertex, but there are points belonging to some edge of another feature, the new vertex is located in the closest point of this edge as it is shown at figure 18-18, b.
Splitting an edge. If when building a new edge (that is, when adding a new vertex of a polyline or polygon) some internal point of this edge falls within attraction radius from some vertex of another feature, the edge being added is split into two parts, an additional separator vertex which is attracted to the closest vertex of another feature is created. This situation is presented at figure 18-18, c.
If there are several vertices of another feature close to the split edge, the operation of splitting may be repeated as shown at figure 18-18, d.

a) attraction to a vertex b) attraction to an edge
c) attraction with splitting an edge d) attraction with edge splitting in two points
Figure 18-18. Examples of performing attraction
In some cases it may be useful to perform building of an edge specially to cause its splitting and create a vertex attracted to the existing feature. Sometimes, the possibility to cancel adding of the vertex on which a click was performed but save the automatically created attracted vertex may be convenient. To do this the context menu command Take Away Vertex should be performed or the combination of keys <Ctrl+Backspace> should be pressed. To return the removed vertex the context menu command Return Vertex or the combination of keys <Ctrl+Shift+Backspace> is used.
The user can change some details of performing the attraction operation. Three checkboxes located under the checkbox Attract in the window “Editor control” are used for this purpose:
To first found – when the box is checked, examination of the possibility to perform attraction operation is completed as soon as at least one suitable vertex or edge point is found. If the box is cleared, then the system selects the closest point to which attraction can be performed, as it was described above.
To vertices only – when the box is checked attraction can be performed only to the existing feature vertices, but not to the points lying on feature edges.
Do not split edges – if the box is checked, the operation of splitting edges is prohibited.
To foresee possible consequences of attraction when adding features it is possible to use the mode of visualization of attraction radius. In this mode in interactive adding vertices of a line or area feature, a dotted circle with radius equal to the attraction radius is displayed around the cursor. Attraction will be performed if when adding a vertex of a new feature some vertex of the existing feature (or part of its edge) falls into the dotted circle.
The mode of visualization of attraction radius is turned on by default. It can be switched off changing the corresponding parameter of editor settings (see “Parameters of editor settings”).
One more possibility allowing the user to perform attraction for vertices of the features already built is connected with the context menu command of the editing mode Attract. This command is enabled only if a line, area or image feature is selected in the editing mode. When performing the command a dialog box “Attraction of features” shown at figure 18-19 is opened.
Figure 18-19. Dialog box “Attraction of features”
Parameters of the attraction operations are similar to those which are specified in the window “Editor control”, however, these parameters will be applied only when performing this operation of attraction. An additional parameter To selectable features only permits using only the features types which can be selected in the present theme for attraction of a vertex and an edge.
Attraction is executed after pushing the button Perform.
If the submode Editing vertices is turned off, attraction is applied to all vertices and edges of the selected feature. If this submode is turned on, before performing attraction the user should select one or several feature vertices to which attraction should be applied. The remaining vertices will not be attracted. However, edge splitting (if it was not prohibited) can be performed for any edges of the feature.