2

I have a problem with bar charts on mapserver. At first glance the charts are perfectly plotted and all is okay. But depending on the zoom level a few charts are not plotted which are plotted on other zoom levels.

The problem appeared on MapServer Version 5.6.5. Afterwards I tried Version 6.4.1 and the problem remains (but other charts are vanishing). Also the geometry type of the source (polygon or point) makes no difference.

Is there something wrong with the Mapfile or should I not use Shapefiles as source? Here is the Layer-Definitition:

LAYER       
   NAME "Gebiete_p"
   GROUP "Gewerbegebiete_p"
   TYPE POLYGON
   STATUS ON
   DATA GewGeb/GewGeb_Gewerbe_Privat.shp
    CLASS
        NAME "Gem"

        STYLE
           COLOR 120 120 120
           OUTLINECOLOR 20 20 20
           ANTIALIAS FALSE
           OUTLINEWIDTH 1
           #WIDTH 1
        END # STYLE
    END # Class

     PROJECTION
            "init=epsg:25832"
     END

         METADATA
                "wms_title" "Gewerbe_p"
                "wms_srs"   "EPSG:25832 EPSG:32632 EPSG:31466 EPSG:4326 EPSG:31468 EPSG:31467 EPSG:4314 EPSG:4258 EPSG:900913"
                "wms_server_version" "1.1.1"
                "wms_format" "image/png"
         END

    END #LAYER


    LAYER
       NAME diagr3_p
       Group Gewerbegebiete_p
       TYPE CHART
       #DATA GewGeb/GewGeb_Gewerbe_Privat.shp
       DATA GewGeb/GewGeb_Gewerbe_Privat_Zentroid.shp
       STATUS ON
       #LABELCACHE ON
       PROCESSING "CHART_TYPE=bar"
       PROCESSING "CHART_SIZE=35 45"
       #PROCESSING "CHART_BAR_MAXVAL=70"
       #MAXSCALE 14999
       #MAXSCALE 44999
       #MINSCALE 35000
       #SYMBOLSCALEDENOM 1000000

       CLASS
         NAME "1 Mbit"
         STYLE
           SIZE [p_diag1]
           COLOR [p_farbe1]
           OUTLINECOLOR 0 0 0
         END    
       END
       CLASS
         NAME "2 Mbit"
         STYLE
           SIZE [p_diag2]
           COLOR [p_farbe2]
           OUTLINECOLOR 0 0 0
         END
       END
       CLASS
         NAME "6 Mbit"        
         STYLE
           SIZE [p_diag6]
           COLOR [p_farbe6]
           OUTLINECOLOR 0 0 0
         END
       END
       CLASS
         NAME "16 Mbit"    
         STYLE
           SIZE [p_diag16]
           COLOR [p_farbe16]
           OUTLINECOLOR 0 0 0
         END        
       END
       CLASS
         NAME "30 Mbit"    
         STYLE
           SIZE [p_diag30]
           COLOR [p_farbe30]
           OUTLINECOLOR 0 0 0
         END        
       END
       CLASS
         NAME "50 Mbit"    
         STYLE
           SIZE [p_diag50]
           COLOR 0 0 255 #[p_farbe50]
           OUTLINECOLOR 0 0 0
         END        
       END

     PROJECTION
            "init=epsg:25832"
     END

         METADATA
                "wms_title" "diagr3_p"
                "wms_srs"   "EPSG:25832 EPSG:32632 EPSG:31466 EPSG:4326 EPSG:31468 EPSG:31467 EPSG:4314 EPSG:4258 EPSG:900913"
                "wms_server_version" "1.1.1"
                "wms_format" "image/png"
         END
    END

On the first zoom level the large grey area have no charts ...

first zoom level

on the second it have ...

second zoom level

on the third the chart in the middle is suddenly vanished

third zoom level

2
  • What do you use as a client? Does it make GetMap requests with small tile size?
    – user30184
    May 15 '18 at 15:04
  • Your are a genius!!! Thats it! My client is Openlayers and I missed out the option "singleTile: true". Many thanks for your answer!!! I didn'd found the reason for several days.
    – Jan
    May 15 '18 at 16:03
1

Bar charts are not rendered if there is not enough room for them on the map. That happens easily if the WMS client is making tiled 256x256 sized GetMap requests. Make sure that the client makes untiled request. For example with OpenLayers that is done with option singleTile=true http://dev.openlayers.org/examples/single-tile.html.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.