                                                                export 
Chapter 15 Import and Export Operations

EXPORT FORMATS

Data may be exported for input to a variety of other applications.  Export
files are typically placed in the /u[sr]/ltp/export directory.  The ascii
export file may also be written directly to a DOS partition or DOS-format
floppy (as with the import command).  The export function supports a number of
popular data formats, including:

    cell      This is a fairly generic cell format for handling grid-based
              information.  It is commonly used for importing data from MTHMAP
              and R2MAP.

    cff       Cartographic Feature File is the vector format associated with
              the base layer data supplied by the Geometronics Service Center
              (GSC).

    dem       Digital Elevation Model, a term created by the U.S. Geological
              Survey to describe topographic data stored as horizontal and
*             vertical coordinates.

    dig       A vector format used to bring digitized data into the ERDAS
              software environment.  See also the import gis format, used by
              ERDAS.

    digit     A vector and attribute format for the GRASS GIS (SCS).

    dlg3      This is a comprehensive vector format developed by the U.S.
              Geological Survey and compatible with a variety of external
              applications, including the ARC/INFO GIS.

    dxf       Rapidly becoming the CAD industry standard, this vector format is
              most closely associated with the AutoCad software package.

    moss      This is a data-intensive vector format which supports the MOSS
              GIS application.

    rdef2     Raster Data Exchange Format, developed for use with DWRIS, LIDES
              and LTPlus.

    rstr      A generic raster format.

*   scsgef    This format was developed for use by the SCS as the digital soil
*             survey component of SSURGO data base.  It is a vector format.

    snap      This includes formats for both polygon (timber unit) and line
              (roads) output files.  Both are vector files intended for use
              with USDA Forest Service PC-Snap software.

*   xy        Any user specified (generic) xy vector format.


EXPORT COMMAND PARAMETERS

The export command writes data in the format specified by type to the named
file.  If the specified file name does not contain '/' character, then it is
assumed that it is in the default path (config file).  The data is read from
the active map.  A file may be exported directly to a DOS device (a:, b: or c:)
by including the appropriate device identifier as part of the full pathname
(fname) or by setting the export_path element of the config file to the desired
device identifier (a:, b: or c:).  Different format types require different
optional parameters [p1]...[pn], which should be included in the indicated
sequence following the file name.  The parameters associated with each command
are (note that parameters in brackets are optional):

    cell fname t c w h [str]
    cff fname c s
*   dem fname c w h g e1 e2 st f
    dig fname a c s
    digit fname a c s
    dlg3 fname a at c s
    dxf fname a c s
    moss fname a c otype s
    rdef2 fname a rc
    rstr fname b n m
*   scsgef fname [-f]
    snap fname otype c s
*   xy fname c s cd dl dp ht i1 i2 a1 a2 v1 v2 x1 x2 y1 y2

The parameter definitions are:

    a    Attribute code:
         1 =  export objects only
         2 =  export attributes only
         3 =  export both objects and attributes
*        4 =  use attribute for 3D elevation value (avail. with dxf output only)
*
*	a1    Beginning column for attribute information.
*
*	a2    Ending column for attribute information.
*
    at   Attribute type code:
         1 =  numeric code pairs
         2 =  text strings

    b    Bits-used code (1-255)
         This value specifies the bits of each byte to be taken as raster
         data.  To use the low four bits, set this value to 15; to use all
         eight bits, set this value to 255.  In general, the bits used form an
         8-bit binary integer, less the flag bits used.

    c    Coordinate type code
         0 = raster pixels
         1 = lon/lat, ddd/mm/ss.ss
         2 = utm meters
         3 = state plane feet
         4 = digitizer1 coordinates
         5 = digitizer2 coordinates
         6 = map inches
         7-9 = reserved
         10-19 = user-defined coordinates
*   
*   cd   coordinate display type (not coordinate system code):
*        1.  decimal x & y (or decimal degrees)
*        2.  ddd/mm.mm (degrees, decimal minutes)
*        3.  ddd/mm/ss.ss (degrees, minutes, decimal seconds)
*
*   dl   ASCII decimal value of delimeter used in ddd/mm/ss.ss notation
*        (it would be 47 in the example above, for '/').
*        NOTE:  32 = ' ' (blank), 39 = ''' (apostrophy), 44 = ',' (comma), 
*        45 = '-', 47 = '/'.  NOTE:  this character will immediately follow the 
*        degrees or minutes ending column specified and will be there only
*        if the next smaller value is specified.
*
*   dp   Number of decimal places for output of x and y coordinates. 
*
    e1   Map attribute units:
         1 = feet (* normal)
         2 = meters
     
    e2   Output dem units:
         1 = feet
         2 = meters (* normal)
     
    f    Number of smoothing passes:
         0 =  none, no smoothing
         1-3 = number of passes (normally 1)
*
*   -f   flag for creation of feature file (scsgef format only)
*    
    fname     Export file name
         The fname parameter may be a file name (with or without a complete
         path), or a directory name.  If fname does not contain the '/'
         character, it is assumed to be a file name in the default export
         directory (listed in the config file).  If it does contain the '/'
         character, it is assumed to be a path name.  The path is checked to
         see if it is a file or a directory.  If it is a file, the file is
         imported.  If it is a directory, the program looks in that directory
         for a file which has the same name as the map.  This is to allow easy
         batch exporting for a list of maps.
     
    g    Clipping coordinate type code:
         0 = raster pixels
         1 = lon/lat, ddd/mm/ss.ss
         2 = utm meters
         3 = state plane feet
         4 = digitizer1 coordinates
         5 = digitizer2 coordinates
         6 = map inches
         7-9 = reserved
         10-19 = user-defined coordinates
     
    h    Cell height (pixels; normally 30)
*
*   ht   header type code:
*        1 = no header lines at all.
*        2 = header line for each object. Attribute on header line.
*        3 = header line for each object. Attribute on vertex line(s).
*        4 = ONLY header lines, with x,y,attribute (opt. item number)
*            using object centroid locations.
*
*   i1   beginning column number for item number (1st col = 1) 0 = none.
*
*   i2   ending column number for item number (1st col = 1) 0 = none.
*    
    m    Maximum line length

    n    Mask:
         Value of 0-255, inclusive, specifies byte to be combined with the
         data.
     
    otype Object type code:
         0 =  any node
         1 =  any segment
         2 =  any polygon
         3 =  node with 0 branches: an isolated point 
         4 =  node with 1 branch: a spur endpoint 
         5 =  node with 2 branches: a node on a simple island 
         6 =  node with 3 branches: a junction node 
         7 =  node with 4 branches: a junction node 
         8 =  segment with 2 free (spur) ends: a free segment 
         9 =  segment with 1 free (spur) end: a spur 
         10=  segment with no free ends
         11=  single links to islands (segment)
         12=  segments between polys with same attribute 
         13=  possible segment contour attr. sequence error 
         14=  interior polygon
         15=  exterior polygon (negative area)
         16=  map border exterior polygon (negative area)

    rc   Registration code:
         0 =  omit registration
         1 =  include registration
     
    s    Set number of objects to be exported

    sn   State abbreviation and name of soil survey
     
    st   Smoothing type, where:
         0 = none, no smoothing
         1 = smooth all points
         2-2000 = variable smooting

         All dem grid points which are on a (min) profile section longer than
         st will be smoothed.  The st value is in grid units; e.g., if the dem
         is on a UTM grid, then st is in meters.  For a standard dem from 40
         ft. contours, a value of 200-400 will normally do a good job of
         leaving well-contoured areas untouched while smoothing areas of less
         than 5-2.5% slope.  This removes streaking in flat areas typical of
         programs like this which use multiple profiles to calculate dem's.
         Note that lower numbers mean more smoothing, while  higher numbers
         mean less smoothing.

    str  Characters used for polygons with no attributes.
     
    t    Characters per cell
*    
*   v1   Beginning column (in header line) for number of verticies.
*
*   v2   Ending column (in header line) for number of verticies.
*
*   x1   Beginning column number for x coordinate.  If the coordinate type is
*        geodetic, you may enter dd.mm.ss where dd = column numbers for the 
*        beginning of the degrees, minutes, and seconds (0 indicates leave out).
*
*   x2   Ending column number for x coordinate.  If the coordinate type is 
*        geodetic, you may enter dd.mm.ss where dd = column numbers for the 
*        ending of the degrees, minutes, and seconds (0 indicates leave out).
*
*   y1   Beginning column number for y coordinate.  If the coordinate type is 
*        geodetic, you may enter dd.mm.ss where dd = column numbers for the 
*        beginning of the degrees, minutes, and seconds (0 indicates leave out).
*
*   y2   Ending column number for y coordinate.  If the coordinate type is 
*        geodetic, you may enter dd.mm.ss where dd = column numbers for the 
*        ending of the degrees, minutes, and seconds (0 indicates leave out).
*
    w    Cell width
     
    ___________________________________________________________________________
    Example(s):

    To format the current, active map file for input to MOSS and store the new
    format as a file called cub_moss, where objects only are passed, with
    coordinates in state plane feet and where the objects are polygon only and
    the set containing the selected objects to be formatted is number 3, enter:

         export moss cub_moss 1 3 2 3
    ___________________________________________________________________________
    See also:

              crit_type, coord_type, import
    ___________________________________________________________________________
