DEM Files

DEM files are used for storing DEMs processed by WMS. After clipping, thinning, or smoothing an imported DEM you may wish to save it to a WMS formatted file so that it can be recalled later without having to perform the same processing steps. The DEM file format is shown in Figure 1 and a sample file is shown in Figure 2.

DEM

/* File type identifier */

ORIGIN xlowerleft ylowerleft

/* Southwest coordinare of DEM */

DELTAX deltx

/* X spacing of elevation points */

DELTAY delty

/* Y spacing of elevation points */

ELEVATIONS ncol nrow

/* Number of columns and rows in DEM */

z11

/* elevation of row 1 column 1 */

z21

/* elevation of row 2 column 1 */

z31

/* elevation of row 3 column 1 */

.

 

.

 

.

 

zncol,nrow

/* elevation of row nrow column ncol */

Figure 1. DEM File Format.

 

DEM

ORIGIN 1000.0 1500.0

DELTAX 30.0

DELTAY 30.0

ELEVATIONS 450 300

101

104

.

.

250

Figure 2. Sample DEM File.

 

The cards used in the DEM file are as follows:

Card Type

DEM

Description

File type identifier. Must be on first line of file. No fields.

Required

YES

 

Card Type

ORDER

Description

Defines the order in which elevations are read in.

Required

NO (By default row major starting in upper left corner is assumed)

Format

ORDER ordertype

Sample

ORDER 0

Field

Variable

Value

Description

1

xlowleft

0-3

0 - Elevations start at upper left, one row at a time.

1 - Elevations start at upper left, one col. at a time.

2 - Elevations start at lower left, one row at a time.

3 - Elevations start at lower left, one col. at a time.

 

Card Type

ORIGIN

Description

Defines the lower left (southwest) coordinates for the DEM.

Required

YES

Format

ORIGIN xlowleft ylowleft

Sample

TNAM 1000.0 1500.0

Field

Variable

Value

Description

1

xlowleft

±

Lower left X coordinate of the DEM

2

ylowleft

±

Lower left Y coordinate of the DEM

 

Card Type

DELTAX

Description

The X spacing between DEM points.

Required

YES

Format

DELTAX deltx

Sample

DELTAX 30.0

Field

Variable

Value

Description

1

deltx

+

X spacing of DEM points.

 

Card Type

DELTAY

Description

The Y spacing between DEM points.

Required

YES

Format

DELTAY delty

Sample

DELTAY 30.0

Field

Variable

Value

Description

1

delty

+

Y spacing of DEM points.

 

Card Type

ELEVATIONS

Description

Elevations for the DEM.

Required

YES

Format

ELEVATIONS ncol nrow

Sample

ELEVATIONS 450 300

101

104

.

.

.

98

Field

Variable

Value

Description

1

ncol

+

Number of columns.

2

nrow

+

Number of rows.

3-n

z

+

Elevations of DEM points.