When performing operations of interactive adding and editing the user can place point features, vertices of area and line features, characteristic points of text and image features in arbitrary points of the theme displaying pane. Actually, it means that precision of locating features is determined by the size of a pixel (screen point) to which some value in map units corresponds in current displaying scale. As a rule, this value is expressed by a real number with a long fractional part. Using such an accuracy limit as one pixel causes certain inconveniences.
Firstly, it is often required to specify coordinates of vertices with a certain precision measured in map units. For example, it may be necessary to round coordinates to integer numbers, to one 10th and so on, depending on the actual size of map unit and on the precision requirements defined by a particular application.
Secondly, sometimes it is necessary to draw a segment strictly horizontally or vertically, that is, parallel to one of the coordinate axes. A certain experience is needed to avoid deviation to some side by one or two pixels.
The above mentioned inconveniences can be avoided when the editing grid permitting the user to round coordinates with required precision is used.
Parameters of the editing grid are specified on page “Snap Grid” of the window “Editor control” shown at figure 18-17.
Figure 18-17. Window “Editor control”, page “Snap Grid”
Unlike coordinate grid described in chapter 12 “Themes”, the editing grid is displayed not by lines, but by equidistant points in the displaying pane located along the lines parallel to coordinate axes. To display the editing grid the box Visible should be checked on page “Snap Grid” and, moreover, the distance between grid points on the screen with the current displaying scale should be not very small. A base point and steps along X and Y axes (in map units) are specified for editing grid.
Using this grid while adding and editing features is determined by three checkboxes:
Snap features – if the box is checked, some characteristic feature point will be located in one of the grid points when moving any features. The following points can be considered as characteristic ones:
for area features – the first point in the list of outer boundary vertices;
for line features – the first point in the list of vertices;
for point features – the feature itself (the point of map symbol binding);
for text features – the top left corner of the bounding box;
for image features – the first point in the list of vertices of feature outer boundary.
Snap sizes – if sizes of the feature (under which the height and width of the bounding box are understood) are changed when the box is checked, the size being changed will only take the values divisible by grid step.
Snap vertices – when the box is checked any vertices of line and area features created or moved in the submode Editing vertices will be located in grid points.
Thus, for example, if any point with integer coordinates is selected as a base point and the grid steps along X and Y are equal to 1, then all added or moved vertices will have integer coordinates. Besides, to draw an ideally horizontal or vertical line the user should just be careful not to make a mistake in more than half a step of the grid while adding a feature.