1.
Introduction
Up one level
What is vector data? This quote from is a good description of what vector data is:
Vector: "An abstraction of the real world where positional data is represented in the form of coordinates. In vector data, the basic units of spatial information are points, lines and polygons. Each of these units is composed simply as a series of one or more coordinate points. For example, a line is a collection of related points, and a polygon is a collection of related lines. Vector images are defined mathematically as a series of points joined by lines. Vector-based drawings are resolution independent. This means that they appear at the maximum resolution of the output device, such as a printer or monitor. Each object is self-contained, with properties such as color, shape, outline, size, and position on the screen."
From: http://coris.noaa.gov/glossary/glossary_l_z.html#v
MapServer can access vector file formats and database connections. It can also access raster or image data. This is a summary of the vector and database formats with particular focus on how to use them in a MapServer map file and access them using command line tools like ogrinfo.
MapServer and vector data access
MapServer has two main methods for accessing data:
Through built-in, format-specific, data access capabilities.
The most basic form of data access uses the built-in capabilities that were linked into MapServer when it was compiled. These capabilities are limited to only a few types of vector data, such as ESRI Shapefile, PostGIS, Oracle Spatial and ArcSDE. The default, built-in, format for MapServer is the ESRI Shapefile format.
Using the capabilities of third-party data access libraries.
One of the most powerful features of MapServer is the ability to use data formats through a pseudo plug-in environment. The most significant third party library being used is GDAL/OGR. This includes raster (GDAL) and vector (OGR) data.
Using OGR
OGR is used behind the scenes by MapServer when requested. MapServer does not require OGR in order to run. Some users may never need the additional capabilities OGR offers, but many users find them absolutely necessary. Because MapServer is capable of accessing data via OGR, there is less need to program specific types of data format support directly into MapServer. Instead, further additions can be made to OGR and then be used by MapServer. In essence, the background libraries allow MapServer to bring the data into an internal, memory-based format that MapServer can use. For the most part, using OGR-related formats is seamless and intuitive.