The DEM format is very complicated. Therefore I don't include a documentation of the text format here. Please look in the ``Unofficial DEM format description''. The current version is available at http://www.planetquake.com/demospecs/dem.
You will understand my textual representation of the DEM format by inspecting a sample file and reading a bit about the structure in the mentioned document.
If someone is willing to write a documentation of my DEM text format please
inform me and your document will be included right here. For the die-hard
hacker: the lex file udeml.l
and the yacc file udemy.y
contain the complete language grammar documentation.