Geospatial – News

Publication of MapServer 6.4

19 September 2013

MapServer is a proven Open Source cartographic engine providing excellent performances and opportunities for highly advanced cartographic presentations. The compliance with the OGC standards allows its integration in service-oriented software architectures, such as the MapFish Geoportal which now benefits from all these innovations. MapServer has a very large community of developers and users.

The development team has just released a new version of MapServer. This article aims to present the new additions made in the new version. The information is taken from RFCs (proposals submitted to the vote of the developers who describe the added features, constraints, etc..). The list of fixes and improvements is long enough to earn a synthesis that we propose here:

Camptocamp offers intra-company and/or inter-company trainings and support onMapServer. Do not hesitate to contact us!

Vector Contour Rendering

Internally, a CONTOUR layer will have its own renderer/driver code. It’s an hybrid layer because it reads the raster source and creates a vector dataset from it. It uses the internal GDAL function GDALContourGenerate(). All other functions behave like a vector layer. The layer can be drawn as a normal line layer using whichShape, GetShape etc.

Basic internal draw process of a CONTOUR layer:

  • whichShape() is called: the raster data source is read using the internal GDAL functions, an ogr dataset is stored in the internal layer structure.
  • getShape() is called: loop through the ogr dataset and return the shapeObj (Line).
  • MapServer draws its line feature as any other vector layer.

Example from the RFC :

LAYER NAME "my_contour_layer"
  TYPE LINE
  STATUS DEFAULT
  CONNECTIONTYPE CONTOUR
  DATA /mnt/data/raster/grib/dem.grib
  PROCESSING "BANDS=1"
  PROCESSING "CONTOUR_ITEM=elevation"
  PROCESSING "CONTOUR_INTERVAL=0,25000:5" # interval of 5 for scales
  of 25000 or less
  PROCESSING "CONTOUR_INTERVAL=25000,500000:10" # interval of 10 for
  scales in the 25000 to 500000 range
  PROCESSING "CONTOUR_LEVELS=500000,0:10,25,50,100" # explicit list
  of levels for scales of 500000 and up
  LABELITEM "elevation"
  CLASS
    STYLE
      WIDTH 2
      COLOR 255 0 0
    END
    LABEL
      ...
    END
  END

Saving MapServer Objects to Strings

This RFC provides the option to save map objects to strings as mapfile string fragments. This functionality will mainly be utilized in MapScript and a new method (convertToString) will be added to the corresponding objects. This new method will provide the inverse option for updateFromString that has already been added within the scope of RFC 31.

Layer Geomtransforms

MapServer 6.0 introduced the concept of geometry expressions within a styleObj-geomtransform.

Three new operations have been added:

  • simplify : simplification via the Douglas-Peucker algorithm in GEOS.
  • simplifypt : simplification with topology preservation using GEOS.
  • generalize.

Enable/Disable Layers in OGC Web Services by IP Lists

This RFC provides the option to enable or disable OWS layers by IP lists. The aim is to let the admin to define list of users, identified through their IPs to allow or deny access to one or more specific WxS layers.

Shape smoothing

This RFC proposes the addition of shape smoothing in MapServer. The initial solution will implement the SIA algorithm: Smoothing via Iterative Averaging. To find out more about the SIA technique, see http://www.ijcee.org/papers/501-P063.pdf. More algorithms could be implement in the future. Smoothing is simply a new geomtransform function available at the layer and style levels.

To enable the smoothing for a layer with the default settings, we only need to set the geomtransform: GEOMTRANSFORM (smoothsia([shape]))

Support for lists in expression parser

When filter ingdata using an attribute, multiple values ​​can now be listed for filtering, for example, have made ​​the same for road type in primary and secondary OSM game, we can use:

LAYER
  ...
  CLASSITEM "type"
  CLASS
    EXPRESSION {primary,secondary}
    ...
  END
END

Time Dimension Support in MapCache Tilesets

MapCache is part of the MapServer suite. It generates a tile cache to improve performance. The TIME parameter is now managed and generates different tile caches  according to the TIME parameter. MapServer has been managing for a while the WMS-T services (WMS with the TIME option).

Management SVG icons on linux systems

Few versions backs, the management of SVG symbols was added in MapServer. The library used was a problem for unix-like systems. A new library is used to maintain compatibility across systems. Support for SVG symbols is now compatible on unix systems.