If you're writing in C or C++ it's strongly recommended that you use the img routine provided with Survex to read and write 3d files. Doing so means that you can take advantage of any revisions to the 3d format by simply rebuilding your software with the updated img routines, rather than having to update your own code. It also allows you to read a sub-set of the data in the file, restricted by Survey prefix.
This document only describes the most recent revision of the 3d format (version 3), which is produced by Survex versions 0.97 and later.
This consists of:
Following the header are a number of items. The last item must be a 0x00 byte when the current label is empty, which marks the end of the data. The first byte of an item identifies what it is:
Return station at the coordinates given, and update current position to coordinates given (FIXME: check this). The updated contents of the label buffer give the survey stations full name.
Olly Betts 2002-03-17, 2002-03-21