1

I have two MapServer layers that get rendered only if the polygon boundaries are overlapping with the extent boundaries.

Note the red polygons

If the red lines were below the upper rim of the extent, the layer would not be visible (no red square, no red polygon). Neither the inner red hollow polygon nor the outer red rectangle do display unless they intersect the image boundary no matter if at the top, bottom, left or right. Data comes from a shapefile, it is not a DB query.

The error log says the layer gets drawn:

[Thu Jun 16 11:44:31 2011].947918 msDrawMap(): Layer 47 (simmodb), 0.014s
[Thu Jun 16 11:44:31 2011].973253 msDrawMap(): Drawing Label Cache, 0.024s
[Thu Jun 16 11:44:31 2011].973279 msDrawMap() total time: 0.621s

Why is that. Here is an extract of my mapfile:

MAP
    CONFIG "MS_ERRORFILE" "errorlog/mapsurfer-clean.log"
    NAME "MyProject"
    STATUS ON
    SIZE 600 440
    RESOLUTION 96
    IMAGECOLOR 255 255 255
    IMAGETYPE AGGA

    PROJECTION
      "init=epsg:31468"      
    END

    INCLUDE "mapfiles/outputformat.map.inc"

    # salzwedel oben
    EXTENT 4443704.656113 5629700.821527 4685449.281400 5944601.022604
    LAYER
        NAME "geomodb"
        GROUP "model boundaries"
        TYPE POLYGON
        STATUS ON
        DATA "simgeomod/GEO-Modell"
        CLASS
            STATUS ON
            OUTLINECOLOR 255 10 10
            SIZE 20
        END
    END
    LAYER
        NAME "simmodb"
        GROUP "model boundaries"
        TYPE POLYGON
        STATUS ON
        DATA "simgeomod/SIM-Modell"
        CLASS
            STATUS ON
            OUTLINECOLOR 255 10 10          
            SIZE 20
        END
    END

It does not change if layer status is set to DEFAULT.

3
  • If there are no polygons within the extent of the map requested by the client, then surely there won't be any features to render? Jun 16 '11 at 15:00
  • Or do you mean the red hollow polygon does not display unles sit intersects the red boundary? If the data is coming from a database you can use a profiler to see exactly what query is run. Jun 16 '11 at 15:01
  • @geograhika: I've edited the post. there are two independent red polygons (one of them a rectangle). Either one gets displayed only if it intersects the image boundary.
    – knb
    Jun 16 '11 at 22:07

Your Answer

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

Browse other questions tagged or ask your own question.