Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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 come from a shapefile, it is not a DB query.

The errorlog 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"
#CONFIG  "MS_ERRORFILE" "stderr"
#CONFIG  "MS_DEBUGLEVEL" "3"
#DEBUG 3 # can also set at layer level

NAME "MyProject"
STATUS ON
SIZE 600 440
RESOLUTION 96
#IMAGECOLOR 160 200 255
#IMAGECOLOR 253 250 170
IMAGECOLOR 255 255 255

#IMAGETYPE GD_PNG

IMAGETYPE AGGA

PROJECTION
  #"init=epsg:4326"
  "init=epsg:31468"      
END
INCLUDE "mapfiles/outputformat.map.inc"



#END


#EXTENT 11.2 50.8 14.8 53.6 
#GK 4
# 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
        #COLOR 10 255 10
        SIZE 20

    END
    #OPACITY 0

    #DEBUG 3
END     

LAYER
    NAME "simmodb"
    GROUP "model boundaries"
    TYPE POLYGON
    STATUS ON
    DATA "simgeomod/SIM-Modell"
    CLASS
        STATUS ON
        OUTLINECOLOR 255 10 10
        #COLOR 140 100 255
        #COLOR 10 255 10                    
        SIZE 20
    END
    #STYLE OUTLINECOLOR 128 0 0 END
    #OPACITY 30
    #DEBUG 3
END

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

share|improve this question
    
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? –  geographika 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. –  geographika 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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.