[mapserver-users] CLUSTER - Average Value
Mark Davidson
mark at 4each.co.uk
Fri Mar 22 06:49:46 PDT 2013
That works great thanks Tamas. I'm now trying to use that expression as a
condition on a class.
I'm trying to style the clusters a different colour depending on the
calculation of that expression. Can multiple styles be applied to a single
cluster point?
CLASS
NAME "Clustered Point"
EXPRESSION ("[Cluster:FeatureCount]" != "1")
STYLE
SIZE 22
SYMBOL "circle"
COLOR 255 0 0
END
LABEL
TEXT ([Sum:lowesttemperature]/[Count:lowesttemperature])
FONT "arial"
TYPE truetype
SIZE 8
COLOR 255 255 255
END
END
CLASS
EXPRESSION (([Sum:lowesttemperature]/[Count:lowesttemperature]) > 1)
STYLE
SYMBOL "circle"
COLOR 0 255 0
END
END
On 22 March 2013 13:15, Tamas Szekeres <szekerest at gmail.com> wrote:
> Mark,
>
> I think LABEL level expressions would work in this case. Something like:
>
> LABEL
> TEXT ([Sum:itemname]/[Count:itemname])
> TYPE TRUETYPE
> ...
> END
>
> Best regards,
>
> Tamas
>
>
>
> 2013/3/22 Mark Davidson <mark at 4each.co.uk>
>
>> Hi All,
>>
>> I'm new to using mapserver and have been implementing a WMS overlay using
>> the CLUSTER funcionality got pretty much everything I need working, but I
>> can't seem to get an average value of a cluster to use as part of the
>> styling and labelling.
>> I've tried everything I can think of to try and get it working but am
>> having no luck. I thought that since you can do [Max:itemname] and
>> [Count:itemname] I would be able to do an equation to work out the average,
>> but I just get syntax errors with everything I try and haven't been able to
>> find any examples of doing this.
>>
>> Could anyone tell me if its possible to do this? And if so provide an
>> example?
>>
>> Any input would be very much appreciated,
>>
>> Thanks,
>>
>> Mark Davidson
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130322/9b01b026/attachment.htm>
More information about the MapServer-users
mailing list