
Map Wardriving (and other!) Data with MapServer #92
Chapter 8, Building the Geospatial Web
|
469
HACK
This line takes the output of the previous line from the script and creates our
final command:
./shpadd wiscan -122.15488 37.49284 ; ./dbfadd wiscan "QueenFleeWee"
It does this by printing the shpadd WiScan, followed by the rest of the first
“field” that was passed in. The default field separator is whitespace, but you
can use
-F to set the field separator. In this case, we set it to ),soweget
everything up to the
)BSS(.
Map This Shapefile!
Throw the shapefiles into your data directory [Hack #91], and then add a layer
to an existing map file:
layer
name wiscan
type point
status default
data "wiscan.shp"
labelitem "name"
class
label
size tiny
color 255 0 0
end
color 0 0 255
end
end
This layer contains only simple parameters, enough to get the layer to dis-
play. Note the
labelitem entry, and the label class. These control the label
display. In our case, we are using the SSID name, which is extracted from
the .dbf file and stored in the
name field. The label will be red (R = 255, G =
0, B = 0), and the dot marking the station will be blue (R = 0, G = 0, B =
255).
A thorough reference to map-file syntax can be found in the MapServer doc-
umentation (http://mapserver.gis.umn.edu).
Hacking the Hack: Adding Aerial Photographs
Once you’ve set up MapServer and have a few shapefiles going, you might
want to use aerial ...