For performing transformation of coordinates there is the menu command Tools+Transform which can be called either from the navigation window when a map, theme, layer or feature type of map or theme is selected or from the map browser window. Features of all or some map components accordingly will be taking part in the operation.
Preparation for transformation is executed under control of transformation wizard. At figure 20-1 the first wizard page is shown.
Figure 20-1. Selection of transformation type and settings file
One of the types described in subsection “Coordinate transformation types” should be selected in the pane Transformation type. It can be either similarity, affine, least-squares affine, nonlinear local, nonlinear affine-local, nonlinear polynomial or nonlinear affine-polynomial transformation.
If the transformation settings were saved before, the box Load settings should be checked and using the button Browse selection of settings file should be performed.
When the box Load settings is checked, the pane of transformation type selection is disabled since the transformation type will be loaded from the settings file. If the user wants to use the previous settings but apply a different transformation type, he can act in the following way: first check the box Load settings, select the settings file and push the button Next (loading is performed), then return to the first step using the button Back, clear the loading box, select the necessary transformation type and push the button Next again.
On the second stage of wizard work (figure 20-2) the following question is settled: whether to create a rollback file which permits canceling the results of coordinate transformation and restoring the map state which was before the transformation. If the rollback file is not created coordinate transformation is irreversible.
Figure 20-2. Selection of rollback file for transformation
To create a rollback file it is necessary to check the box Create rollback file and specify the name for rollback file using the button Browse. The system will assign the file name a standard ROL extension. If the file with such a name already exists, one of the two variants should be selected using the radio buttons:
Overwrite – the previous file content is lost.
Append – the system adds information for rollback to the data that already exists in the present file. In this way it is possible to accumulate information about several successive transformation operations in one file. It will allow the user to cancel all transformations by one rollback operation if necessary, however, in this case the possibility to cancel only the last transformation is lost.
If the user performs coordinate transformation several times one after another and he wants to have a possibility to cancel only one or several last transformations, he should create an individual rollback file for every transformation (select another file name). Rollback correctness is guaranteed only in the case if the rollback operations are performed in the reverse order (that is, the last transformation is the first to rollback).
On the third stage of wizard work (figure 20-3) the user should determine a concrete transformation specifying old and new coordinates of control points.
Figure 20-3. Setting of transformation control points
The number of control points for similarity transformation should be equal to two, for affine transformation – to three, for other transformation types not less than three control points are required.
There are three methods of adding control points to the list.
Individual point adding. To do this it is necessary to fill in the fields Source X, Y and Target X, Y with source and target coordinate values of the control point being added accordingly and push the button Add.
Adding vertices of all selected features. This method can be used only in the case if transformation is performed from the map browser window. It is assumed that before calling the transformation operation the user selected the feature or several features the vertices of which should serve as control points. To enter these vertices in the list the button Group should be pushed. Only area, line and point features will be taken into account, and for area features only vertices of outer boundary, not of inner boundaries of the feature will be included into the list of transformation points. Target coordinate values are set equal to source values. Later, the user can change these values.
Adding vertices of all features of the specified types. After pushing the button Type a dialog box “Select feature types” (figure 20-4) in which the user should mark the feature types which should be included into the list of control points is opened. As in the previous case, only area, line and point features are examined, and for area features only outer boundary is taken, the target values are set equal to the source ones.
Figure 20-4. Selection of feature types when setting control points
The two last methods of adding enable the user to easily create a list containing a huge number of control points, that is why the user should be careful when using these possibilities. After every 50 control points the system asks a question if adding should be continued or not.
In any method of adding the system traces that there were no identical control points. In individual adding a message is displayed: “Duplicated source (target) coordinates of the control point”, in two other adding methods duplicated points are not included into the list.
For correction of the list of control points the buttons Change, Remove and Remove all can be used. To change the source and/or target coordinates of the control point the user should select this point from the list, change values in the fields Source X,Y and Target X,Y and then push the button Change. The button Remove removes the control point selected in the list and the button Remove all – cleans the list completely.
On the fourth stage of wizard work (figure 20-5) the user determines which features should undergo coordinate transformation. There are several possibilities to do this.
Figure 20-5. Selection of features for transformation
It is possible to limit the transformation region so that all the features outside this region will not change their coordinates. For this purpose the radio button Custom region should be checked. Then the next wizard stage will be specifying this region (figure 20-6).
Figure 20-6. Setting transformation region
Any arbitrary polygon without self-intersections can be specified as a transformation region. The user can enter a list of vertices of this polygon from the keyboard (specifying coordinates of every vertex or indicating its distance form the previous vertex and azimuth) or use the button Group which adds all vertices of selected feature to the list of vertices (after the selected row of this list). If several features are selected all their vertices are added into the list, however, the user is responsible that transformation polygon was correct. Maybe removing of a part of vertices from the list will be necessary.
The checkbox Allow splitting edges during transformation allows the user to choose the method of processing such line and area features which fall into transformation region partially. If the box is cleared these features are not transformed. If the box is checked, in every point where line feature segment or boundary segment of area feature intersects the boundary of transformation region an additional vertex will be added. Outer part of the segment remains without changes, but inner vertex is transformed according to the specified rule.
The segments both vertices of which lie outside the transformation region do not undergo transformation even if such a segment intersects the transformation region.
At figure 20-7 examples of splitting edges when rectangular region is transformed are given. The transformation rule is a horizontal shift to the right.
Figure 20-7. Splitting edges during transformation
When performing splitting edges a possibility of violating correctness of area features is not excluded. In such cases the feature is not transformed.
Besides limiting the transformation region the user can also control feature selection subject to transformation. To do this on stage 4 of transformation wizard (see figure 20-5) there is a group of radio buttons Features which include four radio buttons:
All – all features of the present theme are subject to transformation (naturally taking into account the possible limitation of transformation region);
Selected only– only selected features are transformed;
With specified spatial category – only features of one or several selected spatial categories will be transformed;
Specified feature type – only the features belonging to one or several selected feature types will be transformed.
If the variant With specified spatial category or Specified feature type is selected, the user will have to select spatial categories or feature types taking part in the operation accordingly on one of the next stages. At figure 20-8 selection of feature types is shown. The ticks indicate which layers and feature types of these layers should take part in transformation. Spatial categories are selected in a similar way.
Figure 20-8. Selection of feature types for transformation
The checkbox Apply filter (figure 20-5) is enabled if the transformation operation is performed for a theme with a filter (see chapter 34 “Filters and their structure”). If the box is checked, only the features displayed taking into account the filter are transformed. If the box is cleared the filter action is not considered.
After selecting the region and the features taking part in the operation, the transformation wizard gives the user a possibility to determine the necessity of displaying the report on transformation and saving transformation settings and also indicate names of the corresponding files (figure 20-9). The saved transformation setting can be used when performing a similar operation a second time.
Figure 20-9. Selection of report and settings files
If the user selects the name of the existing file for displaying a report, he should decide what to do with the previous contents of this file: Overwrite, that is, write a new report instead of the old one, or Append, that is, continue to collect reports about several transformation operations in one file.
The situation is a little different for the settings file: since merging of different settings in one file doesn't make sense, if the file with the indicated name is present, the system asks the user if the contents should be replaced.
Report file about transformation always gets CTR extension, the file of saving settings – CTS extension.
Finally on the last stage of the transformation wizard the user can view selected parameter values and make sure they are correct. After pushing the button Transform, the operation of coordinate transformation is performed.