[mapserver-dev] ms rfc 48: adding a type keyword to the styleblock

Stephen Woodbridge woodbri at swoodbridge.com
Thu Nov 6 16:10:44 EST 2008


thomas bonfort wrote:
> On Thu, Nov 6, 2008 at 21:49, Tamas Szekeres <szekerest at gmail.com> wrote:
>> 2008/11/6 thomas bonfort <thomas.bonfort at gmail.com>:
>>> Why do you want to add the "geom" argument to the expressions ?
>>>
>> This is just a notation to denote the input geometry in the
>> expression. It would probably be replaced with the actual feature of
>> the layer when the expression is evaluated.
>> However we might want to use here the same style as for the attribute
>> binding, like:
>>
>> GEOMETRYEXPRESSION   "centroid([geom])"
> 
> in my understanding, the geometryexpression keyword already applies to
> the geometry that mapserver is treating, i.e.
> GEOMETRYEXPRESSION "centroid"
> would be enough.
> 
> do you see a use-case where an argument would be passed eg. to centroid() ?

You might have something like:

GEOMETRYEXPRESSION   "centroid(convexhull([geom]))"
GEOMETRYEXPRESSION   "centroid(buffer([geom],0.5))"
GEOMETRYEXPRESSION   "convexhull(buffer([geom],0.5))"
GEOMETRYEXPRESSION   "centroid(convexhull(buffer([geom],0.5)))"

as possibilities. I'm not sure if anyone would want to use these, but I 
can imagine that given a set of primatives the some combination of them 
might be appropriate.

-Steve W


More information about the mapserver-dev mailing list