[mapserver-users] RE: Postgresql join with chart

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Fri Jul 30 11:12:21 PDT 2010


Can you check your Postgres logs and see what SQL exactly is being passed to the database server? Steve

From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Strunck, Alexander
Sent: Wednesday, July 28, 2010 8:51 AM
To: 'mapserver-users at lists.osgeo.org'
Subject: [mapserver-users] Postgresql join with chart

Hello List,

i am relativly new to mapfiles and mapserver.
I am right now trying to bild an chart layer with my data.
if i got only one postgresql table i got pie charts with no problem...
LAYER
 NAME 'Grenzen aller Länder'
 GROUP 'baselayer'
 TYPE CHART
 INCLUDE "postgis.config"
 DATA "the_geom from (SELECT c.gid, c.area, ST_Centroid(c.the_geom) AS the_geom FROM basemap AS c ) as foo using unique gid using SRID=4326"
 STATUS on
PROCESSING "CHART_TYPE=PIE"

 METADATA
  WMS_TITLE 'Grenzen aller Länder'
  WMS_FEATURE_INFO_MIME_TYPE 'text/html'
 END #METADATA

 CLASS
  NAME 'Grenzen aller Länder'
   STYLE
SIZE [gid]
    COLOR 0 104 55 # CMYK 100, 25, 90, 0
    OUTLINECOLOR 1 1 1
WIDTH 2
   END #STYLE
 END # CLASS
 CLASS
  NAME 'Grenzen aller Länder'
   STYLE
SIZE [area]
    COLOR 49 163 84 # CMYK 81, 0, 76, 0
    OUTLINECOLOR 1 1 1
WIDTH 2
   END #STYLE
 END # CLASS
END # Layer

if i try to make pie charts with a join, i don´t get a map back.
LAYER
 NAME 'Grenzen aller Länder'
 GROUP 'bicc_baselayer'
 TYPE CHART
 INCLUDE "postgis.config"
DATA "the_geom from (SELECT c.gid, gmi.milps, gmi.milpr, ST_Centroid(c.the_geom) AS the_geom FROM bicc_basemap AS c LEFT JOIN bpb_m3_thema1_2008_2 AS gmi ON c.iso3_code = gmi.iso3_code) as foo using unique gid using SRID=4326"
gid using SRID=4326"
 STATUS on
PROCESSING "CHART_TYPE=PIE"

 METADATA
  WMS_TITLE 'Grenzen aller Länder'
  WMS_FEATURE_INFO_MIME_TYPE 'text/html'
 END #METADATA

 CLASS
  NAME 'Grenzen aller Länder'
   STYLE
SIZE [milps]
    COLOR 0 104 55 # CMYK 100, 25, 90, 0
    OUTLINECOLOR 1 1 1
WIDTH 2
   END #STYLE
 END # CLASS
 CLASS
  NAME 'Grenzen aller Länder'
   STYLE
SIZE [milpr]
    COLOR 49 163 84 # CMYK 81, 0, 76, 0
    OUTLINECOLOR 1 1 1
WIDTH 2
   END #STYLE
 END # CLASS
END # Layer

Can anyone help me?!?

Thanks

Alex


________________________________
--
Internationales Konversionszentrum Bonn
Bonn International Center for Conversion (BICC) GmbH
Pfarrer- Byns-Straße 1, 53121 Bonn, GERMANY
Tel. / Phone: +49-228-911 96 0, Fax: +49-228-911 96 - 22
Internet: www.bicc.de, E-mail: bicc at bicc.de

Firmensitz/ Office: Bonn
Registergericht/ Registered at: Amtsgericht Bonn, HRB 6717
Geschäftsführer/ Director: Peter Johannes Croll
Prokurist/ Authorized Signatory: Michael Dedek
Vorsitzender des Aufsichtsrates/ Chairman of the Supervisory Board:
Staatssekretär/ Deputy Minister Dr. Michael Stückradt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100730/ae937070/attachment.htm>


More information about the MapServer-users mailing list