[Mapserver-users] Wind Barbs / Truetype font annotation?

Jan Hartmann jhart at frw.uva.nl
Tue Dec 3 12:06:32 EST 2002


Luke,

The way you do it the Barb layer has to be defined as a POINT layer. You 
are symbolizing individual points based on classes and symbols from the 
MapFile itself. Alternatively, you can use an ANNOTATION layer, but in 
that case the annotation for each site (i.e. the character numbers of 
the wind-barb symbols) has to be present as a separate column in the 
DATA-file (or computed via PostGIS). In that case you only need a 
LABELITEM, and all sites will be labeled according to the accompanying 
character. I agree, it is a subtle distinction.

Jan Hartmann

Luke Wallace wrote:
> 
> I've been working on the Texas Mesonet project, and am trying to get 
> Wind Barb plots for each of the sites based upon their wind speed and 
> direction.  I've looked through the archives, but the bits of code I've 
> found don't seem to work when combined together.  Below are the 
> important parts of my main mapfile
> 
> SYMBOL
>  NAME 'circle'
>  TYPE ELLIPSE
>  POINTS 1 1 END
>  FILLED TRUE
> END
> 
> SYMBOL
>   NAME 'wind1'
>   TYPE truetype
>   FONT 'Esri_Weather'
>   FILLED true
>   ANTIALIAS true
>   CHARACTER "b"        # symbol number in character map
> end
> 
> #
> # Working Point Layer
> #
> LAYER
>  NAME weather-metar
>  TYPE POINT
>  DATA currentWeather
>  STATUS ON
>  LABELCACHE OFF
>  TOLERANCE 10
>  CLASS
>    NAME 'Weather Stations'
>    COLOR 100 200 164
>    SYMBOL 'circle'
>    SIZE 7
>    TEMPLATE "weather_refresh.html"
>  END
> END
> 
> #
> # Non-working Barb Layer
> #
> LAYER
>  NAME weather-barbs
>   STATUS DEFAULT
>    TRANSFORM FALSE
>    TYPE ANNOTATION
>    DATA currentWeather
>    CLASS
>       EXPRESSION "([WINDSPD] = 0)"
>       SYMBOL 'wind1'
>       SIZE 25
>     COLOR 0 0 0
>    END
> END
> 
> I realize I'm going to need more classes (with more expressions) to get 
> this to be a truly correct barb, but I'm trying to take small steps and 
> just get any symbol to show.
> 
> The following layer in my mapfile puts a single barb in the lower left 
> corner of the map. This shows my fontset is set up correctly (right?).
> 
> LAYER
>    NAME credits
>    STATUS DEFAULT
>    TRANSFORM FALSE
>    TYPE ANNOTATION
>    FEATURE
>      POINTS 4 696 END
>      TEXT 'b'
>    END
>    CLASS
>      LABEL
>        TYPE TRUETYPE
>        FONT Esri_weather
>        SIZE 50
>        ANTIALIAS true
>        COLOR 0 0 0
>        POSITION UR
>      END
>    END
> END
> 
> 
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online 
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 

Jan Hartmann
Depratment of Geography
University of Amsterdam




More information about the mapserver-users mailing list