[OpenLayers-Users] [mapserver-users] Pie chart does not show

Neelima Emmani neelima.emmani at iictechnologies.com
Tue Jul 3 03:19:33 PDT 2012


Hi Julia, 
I can feel from your map extent that the projection can be  in EPSG:900913.

1. First thing you did not mention any projection system for your map.
2. Secondly, today I had similar problem.I took googlemap through openlayers plugin into QGIS and overlayed my vector layers onto QGIS project.Removing googlemap i generated mapfile using Mapserver export . This resulted me to a mapfile which has extents "EXTENT -11200915.450834 1806123.935255 -7549155.530742 4135504.126708 " .And the projection in the web is "EPSG:3857" .When i tried to check this map file , same like your result for me also it resulted to a blank image.And finally what i found is it is not blank image but , the map is formed as a dot.and soem where else. Even I did not find th esolution for it.\

 So, i request you to let me know if you find any solution for this.

I am also copying my mapfile below --


MAP
  NAME "Mymap"
  # Map image size
  SIZE 600 600
  UNITS meters

  EXTENT -11200915.450834 1806123.935255 -7549155.530742 4135504.126708
  FONTSET './etc/fonts.txt'
  SYMBOLSET ./etc/symbols.txt'
  CONFIG "PROJ_LIB" "C:/ms4w/proj/nad/"
  CONFIG GDAL_DATA "C:\ms4w\gdaldata"

  PROJECTION
    'proj=merc'
    'a=6378137'
    'b=6378137'
    'lat_ts=0.0'
    'lon_0=0.0'
    'x_0=0.0'
    'y_0=0'
    'k=1.0'
    'units=m'
    'nadgrids=@null'
    'wktext'
    'no_defs'
  END

  # Background color for the map canvas -- change as desired
  IMAGECOLOR 255 255 255
  IMAGEQUALITY 95
  IMAGETYPE agg

  OUTPUTFORMAT
    NAME agg
    DRIVER AGG/PNG
    IMAGEMODE RGB
  END
  # Legend
  LEGEND
      IMAGECOLOR 255 255 255
    STATUS ON
    KEYSIZE 18 12
    LABEL
      TYPE BITMAP
      SIZE MEDIUM
      COLOR 0 0 89
    END
  END

  # Web interface definition. Only the template parameter
  # is required to display a map. See MapServer documentation
  WEB
    # Set IMAGEPATH to the path where MapServer should
    # write its output.
    IMAGEPATH '/ms4w/tmp/ms_tmp/'

    # Set IMAGEURL to the url that points to IMAGEPATH
    # as defined in your web server configuration
    IMAGEURL '/ms_tmp/'

    # WMS server settings
    METADATA
      'ows_title'           'Mymap'
      'ows_onlineresource'  'http://localhost.com/cgi-bin/mapserv.exe?map=C:/ms4w/apps/openlayers-2.11/examples/workiic/mapfile/mymap.map'
      'ows_srs'             'EPSG:3857'
    END

    #Scale range at which web interface will operate
    # Template and header/footer settings
    # Only the template parameter is required to display a map. See MapServer documentation
    #TEMPLATE 'fooOnlyForWMSGetFeatureInfo'
  END

  LAYER
    NAME 'layer1'
    TYPE POLYGON
    DUMP true
    #TEMPLATE fooOnlyForWMSGetFeatureInfo
    EXTENT -11200915.450834 1806123.935255 -7549155.530742 4135504.126708
    CONNECTIONTYPE OGR
    CONNECTION 'D:/Neelima/layerpath....'
    DATA 'data'
   
    METADATA
      'ows_title' 'Mymap'
    END
    STATUS ON
    TRANSPARENCY 100

    PROJECTION
    'proj=merc'
    'a=6378137'
    'b=6378137'
    'lat_ts=0.0'
    'lon_0=0.0'
    'x_0=0.0'
    'y_0=0'
    'k=1.0'
    'units=m'
    'nadgrids=@null'
    'wktext'
    'no_defs'
    END

    CLASS
       NAME 'Mymap' 
       STYLE
         WIDTH 0.91 
         OUTLINECOLOR 0 0 0
         COLOR 205 133 91
       END
     LABEL 
      FONT tahoma
      TYPE truetype
      SIZE 12
      COLOR 0 0 0
      ANGLE 0
      POSITION cc
      FORCE true
      ANTIALIAS true
      PARTIALS true
     END 
    END

  END
END

With Regards,
Neelima Emmani
GIS Developer
Phone Number - 04039144487
Mobile Number - 9490817875

________________________________________
From: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] on behalf of julia paredes [japr94 at hotmail.com]
Sent: Tuesday, July 03, 2012 4:29 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Pie chart does not show

Hi all

I want to create a pie chart for some data. The problem that I'm facing is that i'm not getting any errors when I test the layer using shp2img; however, I just get a white image. This is my mapfile:

MAP
        EXTENT -20037508 -20037508 20037508 20037508
        SIZE 400 400
        IMAGETYPE PNG
LAYER
    NAME "Survey"
    TYPE CHART
    CONNECTIONTYPE OGR
    CONNECTION "MSSQL:server=myserver;database=data;uid=me;pwd=key"
    DATA "SELECT Option, COUNT(*) AS RESULT FROM Survey GROUP BY Option"
    PROCESSING "CHART_TYPE=pie"
    PROCESSING "CHART_SIZE=30"
    STATUS ON
    CLASSITEM 'Option'
    CLASS
        EXPRESSION '1'
        NAME "one"
        STYLE
        SIZE [RESULT]
        COLOR 255 244 237
        END
    END
    CLASS
        EXPRESSION '2'
        NAME "two"
        STYLE
        SIZE [RESULT]
        COLOR 255 217 191
        END
    END
    CLASS
        EXPRESSION '3'
        NAME "three"
        STYLE
            SIZE [RESULT]
            COLOR 255 186 140
        END
    END
    CLASS
        EXPRESSION '4'
        NAME "Four"
        STYLE
            SIZE [RESULT]
            COLOR 255 186 0
        END
    END
END
END


Any ideas of what could be missing in my mapfile?

Thanks


More information about the Users mailing list