Creation of object group by coordinates received from file

Print Previous page Top page Next page

You can create object (or group of one-type objects) which is described in text file as coordinates set of its points.

For this purpose it is necessary beforehand to prepare the appropriate text file.

The program processes files with coordinates in the following formats: * .met, * .xyh, * .nxy, * .kml, * .txt, * .tob.

Formation rules of a text file with coordinates of created objects such as XYH:

The file such as XYH should have «xyh» expansion at the first file string there should be a service field XYH.

In the file such as XYH the coordinates can be submitted only in meters (on district).

In the file such as XYH the coordinates list of created point objects (of one type) or coordinates list of one linear object can be described.

After of XYH string directly the strings keeping the description of points coordinates  follow in the format:

NAME X Y H CODE, where

NAME - number or title of a point (the title should not contain blanks) at objects creation the title is automatically recorded in semantics of created object (own title, code of the characteristic 9);

X, Y - plane coordinates of a point;

H - the absolute altitude of a point (may be absent under condition of absence of CODE value);

CODE - the object code (absence is enabled, is not processed).

The values NAME, X, Y, H, CODE can be separated by arbitrary quantity of blanks or tab characters. Usage of other separators is not enabled.

File may have empty strings and strings - commentaries starting from a symbol /.

 

Example of the file such as XYH:

XYH

1 600.000 600.000 212.405 99

2 555.851 599.999 214.116 14

3 613.907 563.375 212.666 14

4 613.915 563.352 212.666 14

5 613.915 563.352 212.666 99

6 600.018 526.752 212.384 14

7 613.915 563.352 212.666 99

8 600.029 599.924 212.384 99

9 600.028 599.924 212.384 99

10 599.886 599.878 212.385 99

11 601.031 604.909 212.282 99

12 594.946 606.488 212.524 99

13 593.975 601.467 212.508 99

 

Formation rules of a text file with coordinates of created objects such as MET:

The file such as MET should have «met» expansion at the first file string there should be a service field MET.

The coordinates in the file such as MET can be submitted in meters (on district), or geodetic coordinates (radians, degrees, degrees - minutes - seconds).

The coordinates (in meters) can be submitted in right-hand (X Y) or left-hand (Y X) coordinate system.

In the file such as MET the coordinates list for following created objects can be described:

- for linear, area, dot (one point), vectorial (two points) objects;

- for objects - titles (two points);

- for linear and area objects - circles (one point - a center of a circle, radius is set in meters in string with a field #CIRCLE, as so: #CIRCLE 2500.5).

The description of created objects should start from string having BEGIN field and to finish by string having END field. The description of each created object should start from string having # symbol.

After string having # symbol the strings having description of points coordinates of created objects follow directly.

After string having a symbol # arbitrary number of strings having SEM field (semantics of created object) and one string having TEXT field (at creation of objects - titles) can be recorded.

File may have empty strings and strings - commentaries starting from a symbol /.

You can use «.» or «,» symbols as a separator when you set coordinates as numbers with the whole and fractional part.

The following service fields can be in the file:

 

Field        Function        

MET        keyword of file beginning        

BEGIN        keyword of information beginning        

#        keyword of new object beginning        

$        keyword of new subobject beginning        

END        keyword of information end        

XY        rectangular coordinates (m.)        

RAD        Radians        

GRAD        degrees in decimal form (degree parts)        

GMS        degree, minute, second        

WGS84        geodetic coordinates are represented in WGS84 system        

H        tag of the three-dimensional metrics (after of symbol #, for example: #H)        

R        tag of left-hand coordinate system (Y, X) (after symbol #, for example: #R, is enabled #RH or #HR)        

 

CIRCLE        object - circle is creating (after symbol #, is not enabled together with fields H and R, the format #CIRCLE radius, where radius is a circle radius in m.)        

ELLIPSE        object - ellipse is creating (after symbol #, is not enabled together with fields H and R, format #ELLIPSE radius1 radius2 Angle, where radius1 is the large radius in m., radius2 is the small radius in m., Angle - grid azimuth of inclination of the ellipse semi-major axis in m.);        

QUADRO        object - square is creating (after symbol #, is not enabled together with fields H and R, format # QUADRO radius Angle, where radius - length of the side in m., Angle - grid azimuth of inclination in degrees ); Angle- the optional parameter, if it is absent the value will be equal to 0.        

ARC               Object - arch is created. A format of the line in a text file is the following one:

       #ARC

       x1 y1   x2 y2   x3 y3

x2 y2 - coordinates of the arch center. Points X1 Y1 and X3 Y3 set a direction of constructing an arch upwards clockwise. For drawing an arch downwards clockwise it is necessary to swap the points:

       #ARC

       x3 y3   x2 y2   x1 y1

SEM        semantics of object (format SEM code value, where code - code of the characteristic, value - value of the characteristic)        

/        comment string        

TEXT        object - circle is creating (format TEXT value, where value is the own text of a title)        

The service fields should start from the first string position.

The labels MET, BEGIN, END are mandatory key fields, the objects description is separated by # symbol.

By default (or after appearance of a service field XY) the objects form in rectangular coordinate system (the strings having coordinates pairs of object points in m. are follow after service field #).

After appearance of a service field RAD objects form in a geodetic coordinate system (after service field # the strings keeping coordinates pairs of object points (B, L) in radians are follow).

After appearance of a service field GRAD objects form in a geodetic coordinate system (after service field # the strings having coordinates pairs of object points (B, L) in degree parts are follow) for example:

#

57.123654 345.576543

58.123654 344.576543

The latitude can change from 0 up to 90 (northern) and from 0 up to -90 (southern). The longitude can change from 0 up to 360 degrees (or from 0 up to 180 and -180).

After appearance of a service field GMS objects form in a geodetic coordinate system (after service field # the strings keeping coordinates pairs of object points (B, L) in degrees, minutes and seconds are follow), for example:

#

7 20 37.123 345 57 54.322

-5 20 37.123 345 57 54.322

The latitude can change from 0 up to 90 (northern) and from 0 up to -90 (southern). The longitude can change from 0 up to 360 degrees (or from 0 up to 180 and -180).

One text file can contain the information of objects in different coordinate systems.

At object creation by rectangular coordinates it is necessary to remember that created objects must be described in the same coordinate system (and in the same zone for the topographic maps) as map on which one they are put.

 Object may be plotted on a map by geodetic coordinates only if the map is built in a projection supporting mutual recalculation between geodesic and rectangular coordinates. It can be tested if to attempt to change current coordinate system on geodesic (by using Options item menu). If you done it you can bravely create objects on geodetic coordinates.

  Under the description in a text file one-type objects are created. If you have necessity to plot objects of different type on a map by coordinates it is recommended to disunite their description to various text files.

The presence of symbols #H (instead of #) means that the object coordinates are written as three-dimensional metrics (X, Y, H).

The presence of symbols #R (instead of #) means that the object coordinates are written in the turned around (left-hand) coordinate system (Y, X).

 Using SEM field you can set semantics of created object. The format: [SEM code value] where code is the code of semantics, value is the value of semantics. By one SEM field one semantics may be described. Use some SEM fields to describe some semantics for object.

 

Example of a text file:

MET

BEGIN

// Create the point objects in radians in WGS84

WGS84

RAD

#

0.97065938 0.65882652

#

0.97058971 0.65838004

// Create a point object in degrees

GRAD

#

55.65802244 37.54409293

// Create a point object in meters

XY

#

6171257.20 7408038.50

// Create a point object in meters (three-dimensional metrics)

#H

6171257.20 7408038.50 122.5

// Create a point object with semantics ABSOLUTE HEIGHT

// and own name

#

SEM 4 122.5

SEM 9 h. Vysokaya

6171257.20 7408038.50

// Create a point object with the expanded metric (Y, X)

#R

7408038.50 6171257.20  

#

61677.20 7407298.50

// Create a point object (coordinates in degrees, minutes and seconds)

GMS

#

55 39 28.88 37 32 38.73

#

55 39 18.96 37 32 20.51

//Creation of arcs

#ARC

6199812.13 7457824.33 6199337.10 7458585.68 6200339.22 7458839.41

#ARC

6199252.51 7460759.09 6198764.47 7459789.52 6199545.34 7459919.66

END

 

For direct plotting of objects described in a text file use Creation of object mode of Map Editor (creation way: Load coordinates from file (appropriate button is in Object creation mode group)).