
466
|
Chapter 8, Building the Geospatial Web
#92 Map Wardriving (and other!) Data with MapServer
HACK
The Shapefile of Things to Come
Shapelib is a library for handling ESRI Shapefiles, written by Frank Warmer-
dam. It includes utility programs that allow us to create and dump the con-
tents of shapefiles and their matching database files from the command line.
The program is available at http://shapelib.maptools.org/. There is a binary
version for Windows and an RPM for Shapelib available at http://freegis.org/,
which also features other neat GIS-related software and links.
If you decide to build from source, the instructions suggest editing the
Makefile to suit your environment, but I was able to decompress the file and
successfully compile the library without manual configuration under
FreeBSD, Mac OS X, and Fedora Core 2. Type
make to compile the library
and the associated binaries. This will create the utility programs shpcreate,
shpadd, dbfcreate, dbfadd, shpdump, and dbfdump.
To create a shapefile, you need to generate .shp, .shx, and .dbf files. For
each item in your input data, you need to add the latitude and longitude to
the .shp and .shx files, and add any associated attribute data to the .dbf file.
For wardriving data, attributes might take the form of the ESSID, or name,
of the networks that you find, or the time that you recorded the network’s
location. It’s very important to line up