m.dem.extract(1)	      Grass User's Manual	      m.dem.extract(1)



NNAAMMEE
       mm..ddeemm..eexxttrraacctt   - Extracts USGS Digital Elevation Model (DEM) data from
       1/2-inch magnetic tape.
       _(_G_R_A_S_S _D_a_t_a _I_m_p_o_r_t_/_P_r_o_c_e_s_s_i_n_g _P_r_o_g_r_a_m_)

SSYYNNOOPPSSIISS
       mm..ddeemm..eexxttrraacctt
       mm..ddeemm..eexxttrraacctt hheellpp
       mm..ddeemm..eexxttrraacctt  iinnppuutt==_n_a_m_e   oouuttppuutt==_n_a_m_e	 bblloocckkssiizzee==_v_a_l_u_e   ssttaarrtt==_v_a_l_u_e
       eenndd==_v_a_l_u_e

DDEESSCCRRIIPPTTIIOONN
       _m_._d_e_m_._e_x_t_r_a_c_t  extracts	USGS  Digital  Elevation Model (DEM) elevation
       data that fits into the user's current geographic region from the input
       file  _i_n_p_u_t,  in blocks of _b_l_o_c_k_s_i_z_e bytes.  If no _i_n_p_u_t file is speci-
       fied by the user, input is taken from /dev/rmt0, by  default.   Results
       are placed in the named _o_u_t_p_u_t file, and stored beneath the _c_e_l_l direc-
       tory of the user's current mapset.   _m_._d_e_m_._e_x_t_r_a_c_t  will  only  extract
       data  that  fall within the boundaries of the user's current geographic
       region.	 Data  falling	outside   this	 region   will	 be   ignored.
       _m_._d_e_m_._e_x_t_r_a_c_t  will  not  complain if the input file does not cover the
       entire geographic region.  The user should  run	_m_._d_e_m_._e_x_t_r_a_c_t  without
       specifying  output  file  (which only examines the input file) prior to
       extracting the data to determine the  size  of  the  geographic	region
       needed.	If the block size is unknown, run the command _m_._e_x_a_m_i_n_e_._t_a_p_e .


       The user can run this  program  either  non-interactively  or  interac-
       tively.	 The  program will be run non-interactively if the user speci-
       fies program arguments on the command line, using the form:


       mm..ddeemm..eexxttrraacctt iinnppuutt==_n_a_m_e [[oouuttppuutt==_n_a_m_e] [[bblloocckkssiizzee==_v_a_l_u_e]  [[ssttaarrtt==_v_a_l_u_e]
       [[eenndd==_v_a_l_u_e]



       Alternately,  the  user	can  simply  type mm..ddeemm..eexxttrraacctt on the command
       line, without program arguments.   In  this  case,  the	user  will  be
       prompted for needed parameter values using the standard GRASS interface
       described in the manual entry for _p_a_r_s_e_r .



   PPaarraammeetteerrss::
       iinnppuutt==_n_a_m_e
	      The full path name of tape device or file from  which  DEM  data
	      are to be extracted.
	      Default:	/dev/rmt0

       oouuttppuutt==_n_a_m_e
	      The name to be assigned to the output file containing raster DEM
	      data extracted from 1/2-inch tape.

       bblloocckkssiizzee==_v_a_l_u_e
	      The physical block size (record length) of each each record,  in
	      bytes.

	      _m_._e_x_a_m_i_n_e_._t_a_p_e
	       can be used to determine block size.

       ssttaarrtt==_v_a_l_u_e
	      First DEM quad to look at (default 1).

       eenndd==_v_a_l_u_e
	      Last DEM quad to look at (default 9999999).


NNOOTTEESS
       The  user  should  check  the  boundaries and resolution of the current
       region  setting	(see  _g_._r_e_g_i_o_n	)  BBEEFFOORREE   extracting	 data,	 since
       _m_._d_e_m_._e_x_t_r_a_c_t will only extract the data that falls within these bound-
       aries and only use the set resolution during extraction.


       WWaarrnniinngg:  This program assumes that the tape has OONNLLYY DEM data.	If the
       tape  contains other files (DLG, for example) the program will not skip
       over them.  In this case, forward the tape to the first DEM file.   Use
       the appropriate UNIX commands (mmtt to forward the tapes past the non-DEM
       files, and dddd to extract and copy the correct files)  on  the  tape  on
       another machine first to extract the non-DEM data from the tape.


       UUSSGGSS  TTaappeess:   This version of _m_._d_e_m_._e_x_t_r_a_c_t is sensitive to formatting
       errors.	If the format on a tape is wrong, the program exits  with  the
       error  message:	"The  file with incorrect data format encountered ..."
       Nevertheless, the program continues.  In this  case,  run  the  program
       without	specifying  input  files.  If the program exits again with the
       same error message, there is an inconsistency in the data format.


       The format error:  Each USGS Dem file consists of A and	B,  and  some-
       times C, records--
       type A record  header
       type  B	record	collection  of profiles with various numbers of eleva-
       tions
       type C record  accuracy


       This new version of _m_._d_e_m_._e_x_t_r_a_c_t cannot skip over any records  to  the
       end  of a DEM file. It first determines how many records there are in a
       file, reads those records, and then proceeds to the header  (record  A)
       of  the	next  file.  Thus it is very important for the program to know
       whether or not there is a C record to be read at the end of each  file.
       This  information  is given in the  file's header record (type A) which
       has a field set to 1 when a C-record exits, and to 0  when  a  C-record
       does not exist.


       In  some  DEM  files,  the accuracy field is set to 0, even though a C-
       record does exist.  Because of this error, when the  program  tries  to
       read  the  data,  it  will  not	try  to read the C-record, but instead
       attempts to go on to the next  file  and  read  its  header--a  type  A
       record.	 This  results	in the format error because type A records and
       type C records have different formats, and the  program	is  trying  to
       read a type A record  when  the tape is presenting a type C record.


       When  this  format  error in a file is encountered, forward the tape to
       the next file.



SSEEEE AALLSSOO
       _g_._r_e_g_i_o_n



       _m_._e_x_a_m_i_n_e_._t_a_p_e



       _r_._r_e_s_c_a_l_e



       _r_._s_u_p_p_o_r_t



       _p_a_r_s_e_r


AAUUTTHHOORR
       Andrew Heekin, U.S. Army Construction Engineering Research Laboratory


       Improvements to program code were made for GRASS 4.0 by
       David Satnik, Central Washington University


       Major enhancements for GRASS 4.1 to allow the input to  be  a  file  or
       tape were made by
       Olga Waupotitsch, U.S.Army Construction Engineering Research Laboratory

       _L_a_s_t _c_h_a_n_g_e_d_: _$_D_a_t_e_: _2_0_0_2_/_0_1_/_2_5 _0_5_:_4_5_:_3_3 _$



GRASS 5.0						      m.dem.extract(1)
