Description: Terrain - third party format Version: 9.0.0 Updated: 01.01.13

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 WindSim AS, as the Tools->Convert terrain model will be in continuous development.

Contour data ® grid.gws

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.

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 .map example shows three pairs per record:

+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
   .
   .
   .
   

AutoCAD (.dxf, .dwg)

The AutoCAD .dxf and .dwg formats containing contours must be filtered in order to only contain the contour line data before converting the data to the .gws format. The filtering can be done with the freeware Dxf2xyz available at http://www.guthcad.com.au Extract from filtered .xyz file:

1423867.259069,4893089.049024,780.000000
1423865.991614,4893066.028702,780.000000
1423860.985547,4893051.592401,780.000000
1423855.974078,4893038.853271,780.000000
1423848.397813,4893033.643849,780.000000
1423838.682060,4893033.080448,780.000000
1423828.944912,4893032.627098,780.000000
1423829.030462,4893009.063536,780.000000
1423826.965463,4892994.864576,780.000000
1420368.647705,4893108.244240,640.000000
1420373.963842,4893108.971279,640.000000
1420440.207429,4893109.737264,640.000000
1420478.365962,4893115.274838,640.000000
1420607.657164,4893172.829613,640.000000
.
.
.
   

ESRI Shapefile (.shp)

The ESRI Shapefile .shp format containing contours must be filtered in order to only contain the contour line data before converting the data to the .gws format. The filtering can be done with the program Arcv2CAD converting .shp files into .dxf files. As a second step the .dxf must be converted to .gws as described above. The program Arcv2CAD is available at http://www.guthcad.com.au

Regular grid data ® grid.gws

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, see below sample:

                               ! comments not belonging to the format
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.

                               ! comments not belonging to the format
  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.

The storing type is determined automatically based on the file structure. Hence, either the first or second column must contain equal numbers in the first two rows, see below sample extract of a valid xyz file:

                               ! comments not belonging to the format
649000  4332300  840  0.05     ! xyz format of type 1.
649050  4332300  840  0.05     ! the fourth column is optional,
649100  4332300  840  0.05     ! if included it will be interpreted
649150  4332300  840  0.05     ! as a roughness height
649200  4332300  840  0.05
649250  4332300  840  0.05
649300  4332300  840  0.05
649350  4332300  840  0.05
649400  4332300  840  0.05
649450  4332300  840  0.05
649500  4332300  840  0.05
649000  4332350  839  0.05
649050  4332350  840  0.05
649100  4332350  840  0.05
649150  4332350  840  0.05
649200  4332350  840  0.05
649250  4332350  840  0.05
649300  4332350  840  0.05
649350  4332350  840  0.05
649400  4332350  840  0.05
649450  4332350  840  0.05
649500  4332350  840  0.05
.
.
.