Hi,<br>
<br>
<br>
I've followed advices to use FORCE TRUE...etc....I am trying to compare
with and understand from some of you guys working code... have yet to
get it done. My knowledge is still far from there, although I've played
around quite a number of possibilities.<br>
<br>
Delfos, I'm interested to know how to open DGN as annotation
layer? (In fact, I'm confused labelled text attributes with
annotations) I think your suggestion can lead me to solve the problem.
In essence, what to put for the LABELITEM? In my case, as output from
OGRInfo, I assume it is called "Text" attribute. I could be wrong.<br>
<br>
I don't see error in the web server (apache)'s log.<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;">Are you sure there is a value for the "Text" attribute? Because this is
<br>different from the annotation layer that is stored in a DGN. The labels<br>you see in a DGN are annotations, NOT labelled text attributes. To show<br>those annotations, you'd have to open the DGN as an annotation layer, I
<br>think.<br><br>Also, you are defining it as a line layer, yet you ask for an outline<br>colour in the class, and "styleitem auto". If you use "styleitem auto",<br>your colours in classes will be ignored. But to define an outline colour
<br>for a line-layer may be a problem...<br><br>Anything in your logs?<br><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 16:21<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,<br><br> Thanks for highlighting the error. I've changed accordingly. But<br>I still see nothing for the label. I can't figure out what else needs to<br>be amended. I've tried different parameters but failed. To the minimum,
<br>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<br>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><br> On 11/8/05, Delfos, Jacob <
<a href="mailto:jacob.delfos@maunsell.com">jacob.delfos@maunsell.com</a>> wrote:<br><br><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<br>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,<br>BUILDING NAMES<br> DOES'NT APPEAR.<br><br><br> Hi
All,<br><br> Thanks
for your information. Based on your<br>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<br>put "Text", as<br> seen
in the dump out of OGRFeatures. (sorry, I am really<br>novice in the<br> terms
to use). I've tried amending the various<br>parameters but still<br> don't see the labels coming out.<br><br> Would
you please pinpoint me what else I should<br>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<br>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<br><<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>> wrote:<br><br> On
11/7/05, Jack Ling<br><<a href="mailto:fly2moon2@gmail.com">fly2moon2@gmail.com</a>> wrote:<br> > For
the text labels, they are<br>represented using the<br> LABEL function like<br> >
below and these are the ones NOT<br>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<br>Exhibition Centre<br> > Style
= LABEL(t:"Convention and<br>Exhibition<br> Centre",c:#ffffff,s: 1.800g)<br> > POINT
(835848.10800000001<br>816023.95000000007 0)<br> ><br> > It
is a steep learning curve for me<br>to understand<br> MapServer and the<br> >
elements behind. Hope someone can<br>point out what<br> should I do to make the<br> >
ROAD, BUILDING NAME labels appear<br>correctly.<br><br> Jack,<br><br> I
*think* the most common reason<br>autostyling text from<br> OGR fails in<br> mapserver
is forgetting to map the<br>"default" font in<br> your fontlist.txt file.<br> This
is the font name used when the<br>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><br> ------<br> I
set the clouds in motion - turn up |<br>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 |<br>Geospatial<br> Programmer for Rent<br><br><br><br><br><br><br></blockquote></div><br>