compass import into cavern

Simeon Warner simeon at cs.cornell.edu
Thu Oct 7 15:07:16 BST 2004


I'm working with the Lechuguilla Compass dataset and have a problem
importing this into survex because of 999.00 (and sometimes -999.00)
values used to indicate no-value (e.g. a backsite only reading has 999.00
for foresight comp and clino). I assume this is a standard feature of
Compass and should thus be incorporated in the data import.

I tweaked datain.c to check for this but note that data_normal() doesn't
know what the input data format is so I'm recklessly checking for a
'special' (-)999.0 value for both compass and survex input data. To do
this well I think one needs to make data_normal() aware of the format so
one can write tests like:

   if (fmt == FMT_DAT && is_compass_NaN(VAL(Comp)) {
     VAL(Comp)=HUGE_REAL;
   }

in each affected case. I'd like to be able to contribute these fixes so I
ask for guidance on whether it is reasonable to pass the format in to
data_normal (and promote the enum for FMT_* to the file level) or whether
I should look at some other approach.

Cheers,
Simeon




More information about the Survex mailing list