Examining Data Content

Examining data content is an important part of any project. Understanding information specific to your dataset will help you use it more effectively. Each piece of spatial data will have some geographic component to it (coordinates describing the location of real features), but it will also have what are called attributes.These are non-geographic data about the geographic feature, such as the size of population, the name of a building, the color of a lake, etc. You will often hear the geographic coordinate data described as spatial data and the attribute information referred to as tabular, attribute, or nonspatial data. It is equally valid to call any dataset spatial if it has some geographic component to it.

Viewing Summary Information About Airports

The MapServer demo data includes a variety of vector spatial files; therefore you will use the ogrinfo tool to gather information about the files. At the command prompt, change into the workshop folder, and run the ogrinfo command to have it list the datasets that are in the data folder. The output from the command will look like Example 6-1.

Example 6-1. Showing a list of the layer names available in a folder containing shapefiles
> ogrinfo data INFO: Open of 'data' using driver 'ESRI Shapefile' successful. 1: twprgpy3 (Polygon) 2: rmprdln3 (Line String) 3: lakespy2 (Polygon) 4: stprkpy3 (Polygon) 5: ctyrdln3 (Line String) 6: dlgstln2 (Line String) 7: mcd90py2 (Polygon) 8: twprdln3 (Line String) 9: plsscpy3 (Polygon) ...

Get Web Mapping Illustrated now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.