dynamic symbols, eg bar graphs or pie charts

Steve Lime Steve.Lime at DNR.STATE.MN.US
Fri Jun 9 10:18:54 EDT 2006


Thomas: I hadn't looked at Tim's implementation but "thought" he was using
the pie chart demo I had put together. That is a native implementation. It 
would be helped by a startangle parameter which would make data setup more
intuitive. (this is what got RFC percolating in my head)

As for bar charts, I was thinking about that too. With attribute bindings for size
this is almost doable with styles now. That is, each style could represent a bar.
with offsets applied to form the chart. The missing piece is that MapServer
locks the symbol aspect ratio for symbol scaling and/or allows only 1 size value.
One solution would be to allow size to set 2 values- width and height. With the second
being optional. That would be a painful modification I think. A better option might
be to use with already present WIDTH parameter for markers, so the width would
define the marker width (if present) and size would represent height (which is what
it really represents anyway). That would not be a difficult modification.

That would allow relatively simple charting, but for use as a marker that's really all
you could do.

One last idea would be to allow the use of a URL to define a marker. That would allow
remote images to be used, but would also allow the use of external programs to do things
like charting (think OWTCHART) or custom markers. Allow that URL to be a template and
take item substitutions:

  SYMBOL 'http://someserver.com/cgi-bin/charting?data=[X1],[X2],[x3],[x4]'

and you really have something interesting... With libcurl this might no be too bad.

Steve

>>> thomas bonfort <thomas.bonfort at GMAIL.COM> 06/09/06 7:37 AM >>>
hi all,
I'd be interrested in having/adding  pie charts or bar graphs to mapserver,
in order to output thematic maps...
I've experimented with Tim Schaub's hack for pie charts which is very nice
but a bit too cumbersome for large datasets, and was wondering if this could
be natively done by mapserver...
Could this fit in the symbology methods of MS, by defining a new type of
"dynamic symbol" which would resemble a pixmap symbol except that the pixmap
is generated from the input data?
I'd be willing to give a shot at this if you folks think this is worthwile.
cheers,
tb



More information about the mapserver-dev mailing list