History
The project started off in 1999 to write a program to produce assist cavers in drawing
beautiful cave maps. Not
something which produces 3D and allows virtual reality flights, but one that is
more like a drawing package with features where the wall outlines could
automatically update when the survey data is corrected for closures, implement
a fine level of wall shape using fractals, add shading or texturing to the
surrounds of walls and many wonderful things. Wouldn't you like a package which
has styles where you can have a modern looking map using your own countries
mapping standards yet change it easily to print out one using US based cave
symbols or BCRA ones? What about one in the style of an early 20th century
European map but using the latest symbols?
Alas I become side-tracked as I realised that what I would eventually need for
such a project was a powerfull and extensible data format.
Writing the data as an XML document appeared to be one way to go and
CaveScript XML was created.
Cave Mapping using LaTeX
A preliminary "proof-of-concept" program was written in late 1999
to test out some
algorithms on automatic wall adjustments for my cave mapping program. The
program was a perl script which read in a simple text based cave map format and
output a LaTeX format file which was then converted to Postscript. The perl
program linked the wall detail with the Survex survey data which could be
adjusted and the program re-run to regenerate the LaTeX/Postscript output.
This program is not included as it is a bunch of Perl scripts which require
LaTeX as an intermediary to the Postscript output.
Postscript printouts "before" and "after" show cave walls
nicely follow the survey legs as loops are closed or survey shots corrected.
You can have a look at the
results here with these PDF files; a
before map and an
after map.
Here is the Survex survey data
that the map is based on and the
wall data file.
Note that this data format is now superceded by the XML based data format.
However LaTeX was designed for text processing and
the requirement for LaTeX to be able to read and interpret cave data
places constraints on the data format.
Ensuring portability and extensibility is difficult.
That's why the data format for CaveScript will be in an XML format.
An advanced cave mapping application that does use TeX can be found at
Therion.
XML DTD to XML Schema
July 2000
Martin Laverty re-casts the XML DTDs into Schemas. As Martin says
in the Glossary on his website:
"XML Schema - an XML successor to the DTD for describing the structure
and content of XML files. The allowable content can be defined in much
more detail so as to increase confidence in the validity of data."
Martin has also created an XSLT (eXtensible Stylesheet Language for
Transformations). This will enable appplications to
transform documents from one XML vocabulary (such as CaveScript) to
another. This could be a plain text, non XML output such as Survex files,
Walls file etc.