For further information on LMP files look in the ``Unofficial LMP format description''. The current version is http://www.planetquake.com/demospecs/lmp.
For further information on DMO files look in the ``Unofficial DMO format description''. The current version is http://www.planetquake.com/demospecs/dmo.
For further information on DEM files look in the ``Unofficial DEM format description''. The current version is http://www.planetquake.com/demospecs/dem.
For further information on QWD files look in the ``Unofficial QWD format description''. The current version is http://www.planetquake.com/demospecs/qwd.
For further information on DM2 files look in the ``Unofficial DM2 format description''. The current version is http://www.planetquake.com/demospecs/dm2.
A DEM file editing guide can be found at http://www.planetquake.com/qsep/movies.html.
There do exist some DEM file manipulation tools from other authors. Find them in Slipgate Central.