Besides the file you are reading, you will find in this directory:

Gmake.c		convert between ASCII .gon file and binary .G file
Lmake.c		convert between ASCII .line file and binary .L file
dangle		find segments with dangling endpoints
gdbuild.c	turn list of segments into .line and .gon files
gdclean		check for duplicate and degenerate segments
gdgraph		turn segment list into a graph
gdname.S	S function for interactively naming regions
intersect.c	compute all intersections among a set of segments
makefile	instructions for making some executables
map.h		common header for C code
mapget.c	includes code for pip() for doing point-in-polygon
pip.S		S function to interface to pip() C code
protoname	create a prototype .N file, naming polygons with dumb names
round		put segment endpoints into a fixed format
sub.gdb		create a new database as a subset of an existing one

A detailed description of how to use these tools is available in the
document:

	ftp://netlib.att.com/netlib/att/stat/doc/95/2.ps

A brief summary of what to do, lifted from that document, is given here:

# produce segfile, a list of segments, one per line
round 4 segfile | gdclean > j
mv j segfile
dangle segfile > dangles
# deal with each line of dangles and fix segfile
sed 's/\.//g' segfile | intersect > intersections
# deal with each line of intersections and fix segfile,
# then make sure that there are still no dangles
gdgraph < segfile | gdbuild foo
Lmake 0 s b foo.line foo.L
Gmake b foo.gon foo.G foo.L
protoname < foo.gon > foo.N
# set environment variable S_MAP_DATA_DIR to point to current directory
# load mapget.c code into S

and then in S:

z <- gdname("foo")
cat(paste(z$name,seq(z$name),sep="\t"),sep="\n",file="foo.N")


Note that some of the shell files use the awk command, and that if you
have an old version of awk you may need to change them to use nawk instead.
