[mapserver-users] There is no default symbol for points or is there?

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Sun Nov 1 09:06:37 PST 2015


Hi,

>From document page http://www.mapserver.org/mapfile/symbol.html#symbol:

"Symbol 0 is always the degenerate case for a particular class of symbol. For points, symbol 0 is a single pixel, for shading (i.e. filled polygons) symbol 0 is a solid fill, and for lines, symbol 0 is a single pixel wide line."

Also, from http://mapserver.org/mapfile/style.html#style I can read:

"If SYMBOL is not specified, the behaviour depends on the type of feature.
    For points, nothing will be rendered."

I made a few tests and this CLASS does not render anything:
CLASS
        STYLE
            SYMBOL 0
            COLOR 100 200 100
         END #STYLE
END #CLASS

I can make points to render if I have this in the mapfile: 
SYMBOL
     NAME "circlef"
     TYPE ellipse
     FILLED true
     POINTS
      1 1
     END # POINTS
    END # SYMBOL
...
    CLASS
        STYLE
            SYMBOL "circlef"
            SIZE 15
            COLOR 100 200 100
         END #STYLE
    END #CLASS

Does this mean that "SYMBOL 0" is not supported any more but documentation lags behind, or should "SYMBOL 0" work for point layers but there is a bug?

I have been wondering about ten years now why I can give just color in a class and get something to show from lines and polygons, but for points I need to define symbol as well. I guess there is some good reason for that.

-Jukka Rahkonen-


More information about the MapServer-users mailing list