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