McCauley's new site format proposal

I have been looking at the new site record format proposal by Darrell
McCauley/Bernard Engel. Looks like a big leap forward. There is however
one problem in handling string attributes and since I'm not able to
attend the Reston Conference I'll bring this up here: Strings can not
contain whitespace. Extending the example on page 3, 2nd paragraph:

#56 @clay %5.6
#54 @"blue" clay %5.4
#62 @Rosebloom silt loam, frequently flooded %6.2
#49 @Rosebloom silt loam, ponded %4.9
Unless I'm very mistaken G_new_get_site() will return an error status on
records 2,3,4,5 because it sees the wrong number of string fields; 2, 5,
4 and 3 respectively. My suggestion is to indicate strings by enclosing
them between double quote characters:

#56 "clay" %5.6
#54 "\"blue\" clay" %5.4
#62 "Rosebloom silt loam, frequently flooded" %6.2
#49 "Rosebloom silt loam, ponded" %4.9
#55 "Memphis silt loam" %5.5

This mechanism is much used in our daily software like cc, shells
(including the celebrated tclsh), troff, scripts for r.binfer etc. etc.

Raymond

I agree.I think it is essential that strings are able to contain
white space.

I also think it would be a good idea to incorporate a header in
the site file that names what each Z or string variable is and
what the units are if relevant.If there are many Z fields
in a site file how will the user remember which field is which.

It would be nice from a user's point of view to be able to select site
variables by name rather than position when running r.surf.tps or
other surface interpolation procedures.
Consider the geochemist who may have 20 element variables in his site
file.

If it is considered unpalatable to have a header in the site file itself
then an alternative could be to have a separate header file as is done for
vector and raster data sets.This header could also contain details of data
format as well as variable names and units. ie.self describing

Sorry for getting into this so late but from a user's perspective
these are important issues.

Rod Paterson
Aberfoyle Resources Ltd
Phone: 61-3-8822226
Fax: 61-3-8131086
Email: rgp@aberfoyle.oz.au

Rod Paterson (rgp%abba@haw.oz.au) writes on 5 Apr 94:

#54 "\"blue\" clay" %5.4
#62 "Rosebloom silt loam, frequently flooded" %6.2

I agree.I think it is essential that strings are able to contain
white space.

I apologize for not making the new library routines available
sooner, but class work sometimes has to take priority :slight_smile:
I am currently implementing changes to support quotes (as in
the two examples above).

The standardization efforts have focused on the data records
themselves and not the entire file. There are comment and
description records (desc|) already in the current format.

One idea under consideration is to add a format record. For the
above example,
  name|type-pH
  desc|soil type, soil pH
  format||#@%
  1|1|#54 "\"blue\" clay" %5.4
  2|3|#62 "Rosebloom silt loam, frequently flooded" %6.2

This would make programming easier. However, my primary concern
is to support quoted strings and then hand it over to CERL.