
Map Wardriving (and other!) Data with MapServer #92
Chapter 8, Building the Geospatial Web
|
467
HACK
File Bounds: ( -122.155, 37.459,0,0)
to ( -122.091, 37.493,0,0)
Shape:0 (Point) nVertices=1, nParts=0
Bounds:( -122.091, 37.459, 0, 0)
to ( -122.091, 37.459, 0, 0)
( -122.091, 37.459, 0, 0)
Shape:1 (Point) nVertices=1, nParts=0
Bounds:( -122.155, 37.493, 0, 0)
to ( -122.155, 37.493, 0, 0)
( -122.155, 37.493, 0, 0)
$ dbfdump myshape
name
NoCat
QueenFleeWee
Note that shpadd expects longitude first, not latitude!
Remember that the x-coordinate comes before the y-coordi-
nate, where longitude is measured along the x-axis. As usual,
coordinates west of Greenwich and south of the equator are
given negative values.
MapServer more or less requires you to provide the geographic extents of
the area you want to map. If you were creating a map file from the previous
example, you would take your extents from the
File Bounds section, and
your extent line would look like this:
EXTENT -122.155 37.493 -122.091 37.459
You can also check a shapefile’s extents with ogrinfo, a utility included with
the GDAL library. The command
ogrinfo -al -summary myshape will show
the metadata from all layers in a shapefile. See “Convert Geospatial Data
Between Different Formats”
[Hack #68] for more on the OGR and GDAL
utilities.
From Wardriving to Shapefiles
Netstumbler, the network scanning software I use, supports a logging for-
mat called