ROAD, STREET, BUILDING NAMES DOES'NT APPEAR.

Jack Ling fly2moon2 at GMAIL.COM
Tue Nov 8 03:21:29 EST 2005


Hi,

Thanks for highlighting the error. I've changed accordingly. But I still see
nothing for the label. I can't figure out what else needs to be amended.
I've tried different parameters but failed. To the minimum, what's missing
in the following portion?
I have the sans font properly put at the right place

Since DGN file has just one layer, I assume I only needs to deal with one
layer here?

Below is the portion of the code for the layer.



LAYER
NAME dgn
TYPE LINE
STATUS DEFAULT
CONNECTIONTYPE OGR
CONNECTION "11sw9d.dgn,0"
STYLEITEM "AUTO"

LABELITEM "Text"

CLASS
NAME "USA"
OUTLINECOLOR 60 60 60
SYMBOL 0

LABEL
COLOR 255 255 255
SHADOWCOLOR 218 218 218
SHADOWSIZE 2 2
TYPE TRUETYPE
FONT sans
SIZE 12
ANTIALIAS TRUE
POSITION CL
PARTIALS FALSE
MINDISTANCE 300
BUFFER 4
END # end of label
END

END # Layer



On 11/8/05, Delfos, Jacob <jacob.delfos at maunsell.com> wrote:
>
>
> Your label definition must sit inside the class. So:
>
> LAYER
> ...
> CLASS
> .....
>
> LABEL
> ...
> END #end label
>
> END #end class
>
> END #end layer
>
> ________________________________
>
> From: UMN MapServer Users List
> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Jack Ling
> Sent: 8 November 2005 12:43
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] ROAD, STREET, BUILDING NAMES
> DOES'NT APPEAR.
>
>
> Hi All,
>
> Thanks for your information. Based on your comments, I've added
> label section, the fonts and font list for FONTSET.
>
> I don't know what should I put for LABELITEM. I put "Text", as
> seen in the dump out of OGRFeatures. (sorry, I am really novice in the
> terms to use). I've tried amending the various parameters but still
> don't see the labels coming out.
>
> Would you please pinpoint me what else I should change in the
> map file? Thanks.
>
> My MapFile below:
>
> MAP
> NAME USA1
> STATUS ON
> SIZE 800 500
> IMAGETYPE PNG
> IMAGECOLOR 0 0 0
> SHAPEPATH "../../data/usa"
> EXTENT 835249.751000 815599.751000 836000.249000
> 816200.249000
> UNITS METERS
> FONTSET "../../etc/fonts.txt"
>
> WEB
> IMAGEPATH "/ms4w/tmp/ms_tmp/"
> IMAGEURL "/ms_tmp/"
> END
>
> LAYER
> NAME dgn
> TYPE LINE
> STATUS DEFAULT
> CONNECTIONTYPE OGR
> CONNECTION "11sw9d.dgn,0"
> STYLEITEM "AUTO"
>
> LABELITEM "Text"
> CLASS
> NAME "USA"
> OUTLINECOLOR 60 60 60
> SYMBOL 0
> STYLE
> COLOR 232 232 232
> END
> LABEL
> COLOR 132 31 31
> SHADOWCOLOR 218 218 218
> SHADOWSIZE 2 2
> TYPE TRUETYPE
> FONT sans-bold
> SIZE 12
> ANTIALIAS TRUE
> POSITION CL
> PARTIALS FALSE
> MINDISTANCE 300
> BUFFER 4
> END # end of label
> END
>
> END # Layer
>
>
>
> END
>
>
> On 11/7/05, Frank Warmerdam <warmerdam at pobox.com> wrote:
>
> On 11/7/05, Jack Ling <fly2moon2 at gmail.com> wrote:
> > For the text labels, they are represented using the
> LABEL function like
> > below and these are the ones NOT SHOWN:
> >
> > OGRFeature(elements):535
> > Type (Integer) = 17
> > Level (Integer) = 11
> > GraphicGroup (Integer) = 0
> > ColorIndex (Integer) = 0
> > Weight (Integer) = 0
> > Style (Integer) = 0
> > EntityNum (Integer) = (null)
> > MSLink (Integer) = (null)
> > Text (String) = Convention and Exhibition Centre
> > Style = LABEL(t:"Convention and Exhibition
> Centre",c:#ffffff,s: 1.800g)
> > POINT (835848.10800000001 816023.95000000007 0)
> >
> > It is a steep learning curve for me to understand
> MapServer and the
> > elements behind. Hope someone can point out what
> should I do to make the
> > ROAD, BUILDING NAME labels appear correctly.
>
> Jack,
>
> I *think* the most common reason autostyling text from
> OGR fails in
> mapserver is forgetting to map the "default" font in
> your fontlist.txt file.
> This is the font name used when the LABEL tool does not
> include
> an explicit font name, as in this case.
>
> Hopefully this will help.
>
> Best regards,
> --
>
> ---------------------------------------+--------------------------------
> ------
> I set the clouds in motion - turn up | Frank
> Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows |
> http://pobox.com/~warmerdam
> and watch the world go round - Rush | Geospatial
> Programmer for Rent
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20051108/b8f4c8b0/attachment.html


More information about the mapserver-users mailing list