WMS:GRASS Grid (GSSHA Maps)

From XMS Wiki
Jump to: navigation, search

WMS can import GRASS ASCII grid for use as a background DEM. Since it is a simple file format, other digital elevation data can be formatted in the same way and then imported into WMS using the Open command in the File menu.

The GSSHA model also uses GRASS ASCII grid files format for all of the map parameters. The GRASS ASCII format is shown in Figure 1, and an example of file is shown in Figure 2.

north: n /* Northern boundary grid coordinate */
south: s /* Southern boundary grid coordinate */
east: e /* Eastern boundary grid coordinate */
west: w /* Western boundary grid coordinate */
rows: nrows /* Number of rows in the grid */
cols: ncols /* Number of columns in the grid */
z11 z12 z13 ... z1ncols /* values of row 1 */
z21 z22 z23 ... z2ncols /* values of row 2 */
.
.
.
znrows1 znrows2 znrows3 ... znrowsncols /* values of last row*/

Figure 1. GRASS ASCII Grid File.

north: 3451250
south: 3438850
east: 298960
west: 290860
rows: 10
cols: 5
0 1 1 0 1
1 1 0 0 1
.
.
0 0 1 1 0

Figure 2. Sample GRASS ASCII Grid File.

The card types used in the GRASS grid file format are self explanatory.