Loading coordinates from a text file

Top Next

The program downloads the coordinates obtained in the field conditions on geodetic instruments equipped with electronic processing means in format of the text file with dividers. Source files can be presented in various extensions (TXT, CSV, XYH, ...), the main condition is the divider between fields in a string. The structure of the file is defined so that one line corresponds to one spatial object. So, for the results of field measurements one line that contains the direct coordinates of the points (X,Y,H) corresponds to the picket point. In consequence of that, each line contains several fields with coordinates or a single field with a common coordinate description in WKT format.

The result of the program's work is a map in format MAP, SIT, SITX, containing only point objects for structure of fields X Y H, or objects of any type for the structure of WKT format.

Task is carried out by GeoImprt.dll module which is called through Run Application item of Tool menu or through Updating or Import from… items of the File menu.

The program works in a dialog mode. The dialog window consists of six parts:

 

clip0033

 

1. Path to an edited map in MAP or SIT format (it is possible to choose necessary one from the list of open maps or to create new (at Import from …)).

2. Input data:

- Path of access and name of an initial file in which there are data in the text kind, received from geodetic devices (in case of need the user can refuse work with this file and specify other file. For this purpose there is a button, which is placed to the right of the path name to a text file).

- Fields for input of shift on X and Y, allowing to place drawn objects onto the necessary place.

- The line to start reading the file - you can skip the first few lines (for example, comment) and start processing the file from the specified line..

- In the bottom part of group the multilines window is located, used for viewing and the analysis of contents of a text file after which the user should define a variant of data processing of input file. By default into a window first ten lines of a file are deduced, but it is possible to specify and other number of displayed lines.

3. The data for adjustment of the program onto processing of input text file which are saved in INI-file of the open document:

- Choice of string format (allows to set and choose String format of input text file).

- Choice of divider - a symbol by which the data in a string of a text file are divided.

- Choice of coordinate system.

- Choice of semantics codes, introduced into object.  

4. Additional parameters:

- Selecting image of created objects.

- Title setup.

- An opportunity of selection of created objects.

- To write transactions log or not.

5. Information about data processing state

6. Controlling keys (Execute, Exit, Help)

 

After appearance of the main window the opportunity is given to user or to use the settings read from INI-file of the open document, or to change them at own discretion, having taken new values from the offered list as the program allows to process the data in various variants of representation.

 

Processing of the initial data should be constructed as follows:

1. At Import from text file create the user map (the button is on the right).

2. Choose an input text file (at Updating a map the input file is chosen before start of a task), thus contents of a file at once will be shown in a multilines window of dialog. If necessary, set the shift of coordinates.

3. Having analysed structure of a file you can choose String format and Divider. If necessary to choose a code of necessary semantics (the corresponding edited window near to a designation of a code of semantics from a string format).

4. To choose coordinate system of a text file (Meters, Degrees of 1942, Degrees of WGS);

5. Choose a name of a target map if it is necessary (by default objects will be created in a background map from which the task has been started).

6. If in an input text file there are codes of objects it is possible to adjust them - Code turning button (if the file of turning of codes is not present, then by default the objects will be mapped by a system code: Marking of point). If in an input file there are no codes it is possible to choose image of created objects. For this purpose it is necessary to disconnect From file button and to choose object, having pressed on the image of object or its name. In addition, you can create a linear object by coordinates from one file (for this purpose it is necessary to activate the Linear objects button).

7. If it is necessary to add titles to created objects it is necessary to set up titles.

8. To start the task onto execution - Execute button.

 

The state of data processing is displayed in a running line.