[mapserver-users] layertype CHART - how to get the pie chart for a specific polygon

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Tue May 18 10:42:16 EDT 2010


Could you share your data schema?

-----Original Message-----
From: arnd.wippermann at web.de [mailto:arnd.wippermann at web.de] 
Sent: Monday, May 17, 2010 4:47 PM
To: Lime, Steve D (DNR)
Cc: mapserver-users at lists.osgeo.org
Subject: AW: [mapserver-users] layertype CHART - how to get the pie chart for a specific polygon

Hi

Thanks for the ideas

Without testing I would think straight Mapserver cgi will also not work,
because I use substitution with WMS and that works, and EXPRESSION is not
defined in the docs for layer CHART.

But I will try.

OWTChart I don't know, but I will have a look. Problem is, that I do not
know the data, but Mapserver knows them. It seems without some scripting,
...

In my application I use the pie chart for externalGraphic in OpenLayers. For
the WMS request I do not need to know the data for the chart.

I have hoped, that it were possible with MapServer alone to get the chart
for a specific polygon.

Regards,
Arnd


-----Ursprüngliche Nachricht-----
Von: Lime, Steve D (DNR) [mailto:Steve.Lime at state.mn.us] 
Gesendet: Montag, 17. Mai 2010 23:28
An: Arnd Wippermann; mapserver-users at lists.osgeo.org
Betreff: RE: [mapserver-users] layertype CHART - how to get the pie chart
for a specific polygon

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