Date: | 2008/11/01 |
---|---|
Authors: | Stephen Lime, Thomas Bonfort |
Contact: | Steve.Lime at DNR.State.MN.US, thomas.bonfort at camptocamp.com |
Status: | Adopted (2008/12/08) |
Last Edited: | 2008/12/08 |
Version: | MapServer 5.4 |
Id: | $Id: ms-rfc-48.txt 8278 2008-12-23 21:34:31Z hobu $ |
The purpose of this RFC is to add the ability to Mapserver to interpret the geometries based on a user-defined GEOMETRYTRANSFORM keyword, and to render the interpreted geometry with the selected styling
An example usage would be:
GEOMETRYTRANSFORM "start([geom])"
to treat the underlying geometry as a point rendered on the first vertex current feature.
The directive to activate this behavior is the GEOMETRYTRANSFORM keyword, that initially belongs to the STYLE object. Further developments could be to enable the keyword at the LAYER level.
Usages of this parameter include drawing bounding boxes of underlying geometries, or adding arrowheads/tails to lines.
Further developments would allow complex expressions to be passed to the keyword, allowing nested transformations to the underlying geometry, eg:
GEOMETRYTRANSFORM "difference([geom],buffer([geom],10))"
and binding to attributes, eg:
GEOMETRYTRANSFORM "buffer([geom],[distance])"
The GEOMETRYTRANSFORM keyword initially accepts a shortcut version of these parameters :
These transforms are not initially implemented, but could be supported in the future:
Apart from the parsing and internal storage of which type should be used, the modifications of this RFC only affect the high-level rendering functions in mapdraw.c .
There are three main modifications:
For line layers, the transformations do not fit in with the current cache mechanism that draws the first style of each class in a first pass for all shapes, and the remaining styles in a second pass.
Getters and setters will have to be added to the different mapscripts.
A possible enhancement could also be to expose the transformation function to MapScript.
TBD post implementation
none expected.
Vote completed on 2008/12/08: