Description: Terrain - third party format Version: 450 Updated: 01.06.05
Terrain - third party format
Some terrain data formats of third party software can be converted to the WindSim .gws format. As guidance, key data interpreted by WindSim found in third party formats are reproduced below. Both data organised as contour lines and in a regular grid can be converted. Be aware that the data must be in total compliance with the below examples for a successful conversions. If you experience any problems using the conversion tools, please send your format to VECTOR, as the Tools->Convert terrain model will be in continuous development.
Contour data -> grid.gws
WAsP (.map)
The WAsP .map format starts with 4 header lines, where only the fourth line is interpreted by the conversion tool. The fourth line contains the scaling and offset factors z_scale and z_offset. If these values are set different from 1.0 and 0.0 respectively, then the following heights will be established in WindSim; z_windsim = z_scale*(z_offset + z_map).
The following lines contain the contour data. If a line starts with a real (Z) and an integer (N), then the integer gives the number of following pairs of east-west and north-south coordinates with a height given as the real Z. If a line starts with two real numbers (R1) and (R2) and then an integer (N), then the integer gives the number of following pairs of east-west and north-south coordinates with a roughness height given by the real numbers R1 and R2 as the right and left hand side values respectively. Each record with contour data could be given with single pairs or as three pairs on each record. The below example shows three pairs per record.
The conversion from contours to a regular grid is based on linear interpolation of the contours nodes located nearest to the nodes of the regular grid. If the differences in distance between adjacent nodes forming the contour lines become too large, the conversion method could be inaccurate. A refinement of the contour lines is automatically suggested if the distance between contour nodes become too large.

extract from .map file

+DEMO|UnKn  (Unknown datum)
        0.0         0.0         0.0         0.0
        1.0         0.0         1.0         0.0
        1.0         0.0
      830.0          16
   166894.0   5703949.0    166906.0   5703950.0    166920.0   5703951.0
   166934.0   5703950.0    166949.0   5703939.0    166951.0   5703915.0
   166936.0   5703899.0    166924.0   5703893.0    166910.0   5703890.0
   166897.0   5703890.0    166884.0   5703893.0    166871.0   5703899.0
   166858.0   5703915.0    166862.0   5703938.0    166882.0   5703947.0
   166894.0   5703949.0
   .
   .
   .
     0.5000      0.0300          27
   159036.9   5705728.0    159116.0   5705761.0    159148.9   5705741.5
   159188.5   5705603.0    159293.9   5705504.5    159366.4   5705392.5
   159478.5   5705445.0    159630.1   5705478.0    159676.3   5705596.5
   159722.4   5705741.5    159801.5   5705833.5    159841.1   5705880.0
   159893.8   5705965.5    159906.9   5705998.5    159972.9   5706024.5
   160071.8   5706057.5    160229.9   5706057.5    160236.5   5706057.5
   160243.1   5705886.5    160210.1   5705761.0    160196.9   5705695.5
   160098.1   5705550.5    160104.7   5705544.0    160117.9   5705484.5
   160183.8   5705247.5    160190.4   5705063.0    160198.5   5705040.5
   
Regular grid data -> grid.gws
Autocad (.dxf)
The file must contain regular 4 noded cells where x,y,z values are stored in a counter clockwise direction starting at the Southwest corner. Each cell is identified with a keyword; e.g. "TERRENG", which is Norwegian for "TERRAIN". Other keywords will be used in other countries, and the conversion tool will be adapted in accordance with the different keywords in use. Currently the following keywords are recognised: "TERRENG".

extract from .dxf file           comments not found in file

TERRENG                        ! TERRENG followed by "10" within the next 5 lines
62
    3
100
AcDbFace
10                             ! identification of x value for South-West node
37680.0                        ! x1
20                             ! identification of y value for South-West node
123820.0                       ! y1
30                             ! identification of z value for South-West node
19.12360191345214              ! z1
11                             ! identification of x value for South-East node
37690.0                        ! x2
21                             ! identification of y value for South-East node
123820.0                       ! y2
31                             ! identification of z value for South-East node
20.48887252807617              ! z2
12                             ! identification of x value for North-East node
37690.0                        ! x3
22                             ! identification of y value for North-East node
123830.0                       ! y3
32                             ! identification of z value for North-East node
18.99279594421386              ! z3
13                             ! identification of x value for North-West node
37680.0                        ! x4
23                             ! identification of y value for North-West node
123830.0                       ! y4
33                             ! identification of z value for North-West node
17.7557373046875               ! z4
Surfer (.grd)
The Surfer .grd format start with header information, giving number of nodes and extensions. Then follows the height data organised in a regular grid, starting at the Southwest corner proceeding towards East (nxp) and then towards North (nyp), with a blank line whenever nyp is augmented. Ten height values are stored in each record as real numbers.

extract from .grd file           comments not found in file

DSAA                           ! header
25 30                          ! nxp nyp; # nodes in West-East and South-North direction
0 900                          ! x_min x_max; Extension in West-East direction
0 700                          ! y_min y_max; Extension in South-North direction
25.0 150.0                     ! z_min z_max; Extension in vertical direction
 z1_1  z2_1 ......... z10_1    ! z values starting in South-West corner,
z11_1 ............... z20_1    ! progressing towards East and North
z21_1 ..... z25_1

 z1_2  z2_2 ......... z10_2
z11_2 ............... z20_2
z21_2 ..... z25_2

.
.
.

 z1_30 z2_30 ....... z10_30
z11_30 ............. z20_30
z21_30 .... z25_30
  
WAsP (.rsf)
The WAsP .rsf format start with header information, giving number of nodes and extensions. Then follows the height data organised in a regular grid, starting at the Southwest corner proceeding towards East (nxp) and then towards North (nyp). WindSim only interpret the first three columns with terrain data and skip the remaining columns with WAsP results. The first three columns must contain three integers, or three reals, a mixture of integers and reals will give a conversion failure.

extract from .rsf file             comments not found in file

  20     15            .....     ! nxp nyp; # nodes in West-East and South-North direction .....
 x1_1    y1_1    z1_1  .....     ! x,y,z values starting in South-West corner,
 x2_1    y1_1    z2_1  .....     ! progressing towards East (nxp) and North (nyp)
 x3_1    y1_1    z3_1  .....
   .       .       .   .....
   .       .       .   .....
x20_1    y1_1   z20_1  .....
 x1_2    y1_2    z1_2  .....
 x2_2    y1_2    z2_2  .....
 x3_2    y1_2    z3_3  .....
   .       .       .   .....
   .       .       .   .....
   .       .       .   .....
   .       .       .   .....
x20_14   y1_14  z20_14 .....
 x1_15   y1_15   z1_15 .....
 x2_15   y1_15   z2_15 .....
 x3_15   y1_15   z3_15 .....
   .       .      .    .....
   .       .      .    .....
x20_15   y1_15  z20_15 .....
  
XYZ Generic (.xyz)
A generic xyz format is provided, consisting of 3 or 4 columns, where the first three columns give the position of nodes in East-West, North-South and vertical direction. If the fourth column is present the values are interpreted as roughness heights. The values in the columns can be given as either integers or reals. The storing order of the nodes can be of the following four types:

 Type 1                 Type 2                 Type 3                 Type 4
-------------------    -------------------    -------------------    -------------------
|          nyp*nxp|    |1 2 3 ....... nxp|    |nyp 2*nyp nxp*nyp|    |1  nyp+1         |
|                 |    |nxp+1       2*nxp|    |.                |    |2                |
|                 |    |                 |    |.                |    |3                |
|                 |    |                 |    |.                |    |.                |
|                 |    |                 |    |.                |    |.                |
|                 |    |                 |    |.                |    |.                |
|                 |    |                 |    |3                |    |.                |
|nxp+1       2*nxp|    |                 |    |2                |    |.                |
|1 2 3 ....... nxp|    |          nyp*nxp|    |1  nyp+1         |    |nyp 2*nyp nxp*nyp|
-------------------    -------------------    -------------------    -------------------
  
Independent of the original storing order the converted .gws format will be of type 1.