[mapserver-users] layertype CHART - how to get the pie chart for a specific polygon
Lime, Steve D (DNR)
Steve.Lime at state.mn.us
Mon May 17 14:28:04 PDT 2010
Two ideas off the top of my head:
- use straight MapServer CGI and not WMS for the embedded chart request. That way your idea for runtime subs might work.
- consider using something other than MapServer to build a stand-alone chart. I'm guessing you have the data necessary to build the chart available via the template and you could pass it to a charting tool. The old OWTChart package is one example where you pass it the data via URL and it returns a gif. I'm sure there are many other options...
Steve
-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Arnd Wippermann
Sent: Monday, May 17, 2010 2:06 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] layertype CHART - how to get the pie chart for a specific polygon
Hi,
i use the layertype CHART to display the results of the election in nrw 2010
for the electoral districts. It works great. The layer shows perfectly the
pie charts for every polygon.
http://gis.ibbeck.de/ginfo/apps/Landtagswahl_NRW_2010/Wahlen_NRW_2010.asp
But is it possible to get the pie chart for a specific polygon? I want to
display the pie chart i.e in a query like this:
http://gis.ibbeck.de/include/mapserv52/mapserv.exe?map=ginfo/apps/Landtagswa
hl_NRW_2010/Landtagswahl_NRW_2010.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetF
eatureInfo&QUERY_LAYERS=WKNR&LAYERS=WKNR&BBOX=965552.54116394,6743580.382492
7,980839.94681885,6758867.7881476&SRS=EPSG:900913&X=50&Y=50&WIDTH=100&HEIGHT
=100&FORMAT=image/png&INFO_FORMAT=text/html&FEATURE_COUNT=1&STYLES=
I have managed this in the template by use of <img src="WMS Request"> and
&BBOX=[shpext format="$minx,$miny,$maxx,$maxy"] in the WMS request for the
pie chart. And adjust of image width and pie chart size.
If the polygon has a polygon inside (isle), then this approach doesn't work,
because I get two pie charts:
http://gis.ibbeck.de/include/mapserv52/mapserv.exe?map=ginfo/apps/Landtagswa
hl_NRW_2010/Landtagswahl_NRW_2010.map&&SERVICE=WMS&VERSION=1.1.1&REQUEST=Get
FeatureInfo&QUERY_LAYERS=WKNR&LAYERS=WKNR&BBOX=951105.94282005,6738535.53862
66,966393.34847496,6753822.9442815&SRS=EPSG:900913&X=50&Y=50&WIDTH=100&HEIGH
T=100&FORMAT=image/png&INFO_FORMAT=text/html&FEATURE_COUNT=1&STYLES=
I would like to get the specific pie chart by the district number and cgi
substitution. That would mean, that one get a better control of displaying
the pies in an own context.
CLASS
EXPRESSION ([F12]=%WKNR%)
NAME 'CDU' #F10
STYLE
SIZE [F10]
COLOR 0 0 255 #000000
#OUTLINECOLOR 0 0 0
#WIDTH 1
END
END
But that doesn't work. Is there an other way possible?
Regards
Arnd Wippermann
http://gis.ibbeck.de/
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list