ROAD, STREET, BUILDING NAMES DOES'NT APPEAR.

Jack Ling fly2moon2 at GMAIL.COM
Wed Nov 9 09:19:32 EST 2005


Hi guys!


Thanks a lot everyone here. After trials and re-testing based on your
comments and suggestions, finally I've the labels come up! Great!

However, I've problem remain to be resolved: there are Chinese (or you
treat it as Unicode) characters in the DGN map don't show up correctly
(appears as garbage characters).

Is it an inherent problem when using DGN file with MapServer? Or
anybody can help?

Thanks a lot.

On 11/9/05, Delfos, Jacob <jacob.delfos at maunsell.com> wrote:
> Hi Jack,
>
> Annotation layers can be a bit confusing. They are not labels, but yet
> are partially treated as such.....
>
> Anyway, I find that the following annotation layer definition works
> quite well for me:
>
> ########################################################################
> LAYER
>    NAME "Annotation"
>    TYPE ANNOTATION
>    CONNECTIONTYPE OGR
>    CONNECTION "yourfile.dgn"
>
>    LABELITEM "TEXT"
>
>    STATUS OFF
>    STYLEITEM "AUTO"
>
>    CLASS
>
>    END
> END
> ########################################################################
>
> You MUST have the LABELITEM defined, and you MUST also have a class
> (which is best left empty). There is something called LABELANGLEITEM,
> but I am unable to get it to work. The result is that the labels are not
> rotated. Would be good if someone else could explain how to rotate DGN
> labels, because I don't know...
>
> Hope this helps,
>
> Regards,
>
> Jacob
>
>
>
>
>
> ________________________________
>
>         From: UMN MapServer Users List
> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Jack Ling
>         Sent: 8 November 2005 17:07
>         To: MAPSERVER-USERS at LISTS.UMN.EDU
>         Subject: Re: [UMN_MAPSERVER-USERS] ROAD, STREET, BUILDING NAMES
> DOES'NT APPEAR.
>
>
>         Hi,
>
>
>         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.
>
>         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.
>
>         I don't see error in the web server (apache)'s log.
>
>
>         On 11/8/05, Delfos, Jacob <jacob.delfos at maunsell.com > wrote:
>
>                 Are you sure there is a value for the "Text" attribute?
> Because this is
>                 different from the annotation layer that is stored in a
> DGN. The labels
>                 you see in a DGN are annotations, NOT labelled text
> attributes. To show
>                 those annotations, you'd have to open the DGN as an
> annotation layer, I
>                 think.
>
>                 Also, you are defining it as a line layer, yet you ask
> for an outline
>                 colour in the class, and "styleitem auto". If you use
> "styleitem auto",
>                 your colours in classes will be ignored. But to define
> an outline colour
>                 for a line-layer may be a problem...
>
>                 Anything in your logs?
>
>
>                 ________________________________
>
>                         From: UMN MapServer Users List
>                 [mailto:MAPSERVER-USERS at LISTS.UMN.EDU ] On Behalf Of
> Jack Ling
>                         Sent: 8 November 2005 16:21
>                         To: MAPSERVER-USERS at LISTS.UMN.EDU
>                         Subject: Re: [UMN_MAPSERVER-USERS] ROAD, STREET,
> BUILDING NAMES
>                 DOES'NT APPEAR.
>
>
>                         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
>
>
>
>
>
>
>
>
>
>



More information about the mapserver-users mailing list