dlg3 standard to optional converter program

stafford at sfrankli.oh.nrcs.usda.gov stafford at sfrankli.oh.nrcs.usda.gov
Sat Dec 9 07:00:00 EST 1995


I have placed the file s2o.c.Z on the moon ftp site under
incoming.  This c program will convert dlg3 standard format
files to dlg3 optional format files.  It seems to be passing
the test after checking it against some otherwise converted
standard format files.  Nevertheless, send bug reports to me
at jim.stafford at oh.nrcs.usda.gov or
jimstaff at freenet.columbus.oh.us

The following is a help screen from the program itself:


Name : s2o - standard to optional

s2o converts Digital Line Graph 3 (dlg3) ascii
data files from standard format to optional
format so that the GRASS GIS programs
can read the data.  GRASS can only read dlg3
optional format files through the input routines
of v.in.dlg or v.import.  s2o is a
stand alone c program that runs independently of the GRASS
environment.  A temporary file 'temp99zz' is created during
a two pass conversion process.


The s2o program will prompt the user interactively
for file names and optional flag, or, alternatively,
if the user places these items on the command line no
prompting takes place.  Format for program start-up
is as follows (where [] indicates optional input):

s2o [help]
       OR
s2o input_file output_file [-r]
       OR
s2o [-r] input_file output_file


The -r flag causes the major/minor attributes to be
reversed in order so that the last major/minor pair
becomes first and the first last.  This option meets
the need of importing the hypsography layer with
the elevation of each contour as the first attribute rather
than the last.  By importing s2o output with v.in.dlg or
v.import without the multiple attribute option, elevations
will be automatically assigned to the contours.

Jim Stafford





More information about the grass-user mailing list