[mapserver-users] RE: How to avoid drawing overlapping point symbols?
Sigda, Mark - Fort Collins, CO
Mark.Sigda at ftc.usda.gov
Wed May 5 15:10:28 PDT 2010
Option 1 works great (just had to remove "FONT" after "LABEL). "COLOR 0 0 0" wasn't needed.
Thanks Steve!!
> -----Original Message-----
> From: Lime, Steve D (DNR) [mailto:Steve.Lime at state.mn.us]
> Sent: Wednesday, May 05, 2010 4:00 PM
> To: Sigda, Mark - Fort Collins, CO; mapserver-users at lists.osgeo.org
> Subject: RE: How to avoid drawing overlapping point symbols?
>
> Hi Mark: There are a couple of ways to go. Either should work. Option 1
> is less of hack I so I'd start there. Option 2 is really more useful
> when you want to label the marker.
>
> Steve
>
> Option 1: TrueType symbol as text.
>
> LAYER
> NAME 'option1'
> DATA ...
> TYPE ANNOTATION
> CLASS
> COLOR 0 0 0 # may need this for things to draw, or you may not
> TEXT ',' # no need for a label item, this is references the symbol
> in your font you want to use
> LABEL
> FONT
> TYPE TRUETYPE
> FONT "nrcs-ssurgo"
> ANTIALIAS TRUE
> SIZE 10
> END
> END
> END
>
> Option 2: Use a marker symbol
>
> SYMBOL
> NAME "ROC"
> TYPE TRUETYPE
> FONT "nrcs-ssurgo"
> CHARACTER ","
> ANTIALIAS TRUE
> END
>
> LAYER
> NAME "option2"
> STATUS ON
> TYPE ANNOTATION
> DATA ...
> CLASS
> STYLE
> SYMBOL "ROC"
> SIZE 12
> COLOR 0 0 0
> END
> TEXT ' ' # a blank space
> LABEL
> SIZE tiny # doesn't matter what you define
> END
> END
> END
>
>
> ________________________________________
> From: Sigda, Mark - Fort Collins, CO [Mark.Sigda at ftc.usda.gov]
> Sent: Tuesday, May 04, 2010 1:51 PM
> To: Lime, Steve D (DNR); mapserver-users at lists.osgeo.org
> Subject: RE: How to avoid drawing overlapping point symbols?
>
> Thank you, Steve. I'm trying annotation, but haven't been able to get
> it working yet. I wasn't able to find examples of annotation layers,
> so I'm just hacking here. Would you please take a look at my map file?
>
> Below is basically what I'm doing (though I have many more symbols &
> classes). If I use the map file below, it draws nothing. If I
> uncomment the commented lines, it draws both the marker symbols and
> labels, but I don't want labels.
>
> Can you tell me how to draw just the marker symbols?
>
> Thanks,
>
> -Mark
>
>
> SYMBOL
> NAME "ROC"
> TYPE TRUETYPE
> FONT "nrcs-ssurgo"
> CHARACTER ","
> ANTIALIAS TRUE
> END
>
> LAYER
> NAME "featpoint"
> STATUS ON
> TYPE ANNOTATION
> CONNECTIONTYPE PLUGIN
> PLUGIN "msplugin_mssql2008.dll"
> CONNECTION "removed"
> DATA "ShapeGeometry from featpoint using unique featpointiid
> using SRID=4269"
> PROJECTION 'init=C:\ms4w\proj\nad\epsg:4269' END
> CLASSITEM "featsym"
> TRANSPARENCY ALPHA
> # LABELITEM "featsym"
> CLASS
> EXPRESSION 'ROC'
> STYLE
> SYMBOL "ROC"
> SIZE 12
> COLOR 0 0 0
> END
> # LABEL
> # ANTIALIAS true
> # POSITION AUTO
> # FONT "arial"
> # TYPE truetype
> # COLOR 0 0 0
> # SIZE 8
> # END
> END
> END
>
> -----Original Message-----
> From: Lime, Steve D (DNR) [mailto:Steve.Lime at state.mn.us]
> Sent: Monday, May 03, 2010 2:45 PM
> To: Sigda, Mark - Fort Collins, CO; mapserver-users at lists.osgeo.org
> Subject: RE: How to avoid drawing overlapping point symbols?
>
> Use an annotation layer, you can even use the truetype symbol as the
> text, collisions will be avoided in this case. Even if you have to use
> the truetype symbol as a marker symbol with accompanying text MapServer
> will still avoid overlap with the markers.
>
> Steve
> ________________________________________
> From: mapserver-users-bounces at lists.osgeo.org [mapserver-users-
> bounces at lists.osgeo.org] On Behalf Of Sigda, Mark - Fort Collins, CO
> [Mark.Sigda at ftc.usda.gov]
> Sent: Monday, May 03, 2010 2:52 PM
> To: mapserver-users at lists.osgeo.org
> Subject: [mapserver-users] How to avoid drawing overlapping point
> symbols?
>
> I have a point layer I'm drawing with a truetype symbol. When points
> are close together, a big mess of overlapping symbols is drawn.
>
> How can I tell MapServer not do draw symbols for points that are close
> together? I'm looking for something like GAP on the STYLE element, but
> that apparently applies only to line features.
>
> Thanks,
>
> -Mark
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list