Supported Vector Formats

Parent Previous Next

Supported Vector Formats

MapServer can render map layers by using various vector layer sources. You can set up the source by setting the Connection Type parameter in the Layer Property Editor. The vector layer sources can be divided into the following 2 categories:


Built in layer sources


Inline

Inline features refer to coordinates entered directly into the map file. They are not a file or database format and do not require any DATA or CONNECTION parameters. Instead they use a FEATURE section to define the coordinates. Inline features can be used to define points, lines and polygons as if taken from an external file. This requires direct entry of coordinate pairs in the map file using a particular syntax. This is a native MapServer option that doesn’t use any external libraries to support it. To specify this layer data source the Connection Type must set to MS_INLINE in the MapManager Layer Property Editor.

You cannot edit Inline features in the MapManager. To add, edit or remove them you must open the .MAP file in a text editor.

Note: For more information about inline features please refer to the MapServer documentation


OGR

The OGR Simple Features Library is a C++ open source library (as part of the GDAL library) providing read (and sometimes write) access to a variety of vector file formats including ESRI Shapefiles, and MapInfo mid/mif and TAB formats. The OGR Simple Features Library allows MapServer users to display several types of vector data files in their native formats. For example, MapInfo Mid/Mif and TAB data do not need to be converted to ESRI shapefiles when using OGR support with MapServer. MapManager supports to use the following ogr formats to be rendered on the map:



To specify these formats as a layer data source the Connection Type must set to MS_OGR in the MapManager Layer Property Editor.

Note: For more information about the OGR driver please refer to the MapServer documentation

MYGIS

MapServer has a build in MySQL driver to access the MySQL spatial data sources. To specify this layer data source the Connection Type must set to MS_MYGIS in the MapManager Layer Property Editor.

Note: For more information about the MySQL driver  please refer to the MapServer documentation

POSTGIS

PostGIS is supported directly by MapServer. The CONNECTION parameter is used to specify the parameters to connect to the database. CONNECTION parameters can be in any order. Most are optional. dbname is required. user is required. host defaults to localhost, port defaults to 5432 (the standard port for PostgreSQL). The DATA parameter is used to specify the data used to draw the map. The form of DATA is “[geometry_column] from [table_name|sql_subquery] using unique [unique_key] using srid=[spatial_reference_id]”. The “using unique” and “using srid=” clauses are optional, but using them improves performance.

CONNECTIONTYPE POSTGIS
CONNECTION "host=yourhostname dbname=yourdatabasename user=yourdbusername password=yourdbpassword port=yourpgport"
DATA "geometrycolumn from yourtablename"


To specify this layer data source the Connection Type must set to MS_POSTGIS in the MapManager Layer Property Editor.

Note: For more information about the OGR driver please refer to the MapServer documentation


Shapefile

Also known as ESRI ArcView Shapefiles or ESRI Shapefiles. ESRI is the company that introduced this format. ArcView was the first product to use shapefiles. Shapefile access is built directly into MapServer. It is also available through OGR, but direct access without OGR is recommended as MapServer can handle this format directly without OGR interpretation.

To specify this layer data source the Connection Type must set to MS_SHAPEFILE in the MapManager Layer Property Editor.

Note: For more information about the OGR driver please refer to the MapServer documentation


WMS

Web Map Service (WMS) specification is an Open Geospatial Consortium (OGC) specification. WFS allows a client to retrieve data in raster format by using standard parameters in the specified URL form.

To specify this layer data source the Connection Type must set to MS_WMS in the MapManager Layer Property Editor.
 

WFS

Web Feature Service (WFS) specification is an Open Geospatial Consortium (OGC) specification. WFS allows a client to retrieve geospatial data encoded in Geography Markup Language (GML) from multiple Web Feature Services. GML is built on the standard web language XML. WFS differs from the popular Web Map Service (WMS) specification in that WFS returns a subset of the data in valid GML format, not just a graphic image of data. To specify this layer data source the Connection Type must set to MS_WFS in the MapManager Layer Property Editor.

Note: For more information about the OGR driver please refer to the MapServer documentation 


Pluggable layer sources

Pluggable layer sources are special dll's not linked directly into MapServer. However you can set up the layers to utilise these sources on demand. To specify this layer data source the Connection Type must set to MS_PLUGIN in the MapManager Layer Property Editor. In addition you'll have to select the the dll name in the Plugin Library combo box according to the driver to be used.

ESRI ArcSDE

Spatial Database Engine (SDE) is one of ESRI‘s products which enables spatial data to be stored, managed, and quickly retrieved from leading commercial database management systems like Oracle, Microsoft SQL Server, Sybase, IBM DB2, and Informix. The ArcSDE client libraries must be installed and available on the system to be able to use this option. To specify this layer data source the Plugin Library must set to "msplugin_sde91" in the MapManager Layer Property Editor.

Note: For more information about the OGR driver please refer to the MapServer documentation


Oracle Spatial

Oracle Spatial is a spatial cartridge for the Oracle database. The OCI client libraries must be installed and avaibable on the system to be able to use this option. To specify this layer data source the Plugin Library must set to "msplugin_oci" in the MapManager Layer Property Editor.

Note: For more information about the OGR driver please refer to the MapServer documentation

MS SQL 2008 Spatial

The recent version of the Microsoft SQL Server supports native spatial data types which can now be retrieved by using the MSSQL2008 plugin as per MS-RFC-38. To specify this layer data source the Plugin Library must set to "msplugin_sql2008" in the MapManager Layer Property Editor.