[mapserver-users] Label alignment . . .

Bob Basques Bob.Basques at ci.stpaul.mn.us
Wed May 6 16:52:37 PDT 2009


All, 

I'm playing around with generating a map collar image by labeling some lines with MapServer. 

I get the labels looking about what I would like them to look like, but the alignment vertically ( and this applies to horizontal  alignment as well ) is not playing nice. 

See this link: http://gis.ci.stpaul.mn.us/datasets/SHP/FED/USGS/USNG/mn_usng_lines_labels_public_2.map?mapext=503179.6728349806%20111379.8994326578%20508281.0020239575%20135621.41573867595&mapsize=70%20600&mode=map&MOOSETIME=1241653121858 ( http://gis.ci.stpaul.mn.us/datasets/SHP/FED/USGS/USNG/mn_usng_lines_labels_public_2.map?mapext=503179.6728349806%20111379.8994326578%20508281.0020239575%20135621.41573867595&mapsize=70%20600&mode=map&MOOSETIME=1241653121858 ) 

I'm thinking that the labels are moving back and forth horizontally because of the underlying line work, It's not strictly horizontal but curved slightly, and there may or may not be a vertice visible within a view.  (Can a vertice be marked somehow?) So I think MapServer is using the longest straight segment within the view to center on for labeling. 

Question, how do I get these to line up vertically (and horizontally)?  I know there was some recent justification work going on, but didn't follow it in detail. 

Thanks 

bobb 

Pertinent mapfile chunks: 

  LAYER 

    METADATA       

          "ows_title" "layer_0" 

          "gml_include_items" 

          "all" 

    END 

         NAME 'usng' 

    DATA '0000_00/MN_Line_Experiments/MN_USNG_Ramsey_Line_Northing_Beta' 

    STATUS DEFAULT 

    TYPE LINE 

    LABELITEM 'NORTHING'   

    CLASS 

      LABEL 

        TYPE TRUETYPE 

        FONT bluehigh 

        SIZE 10 

        COLOR 25 25 25 

        OUTLINECOLOR 255 255 254 

        ANGLE 0 

        OFFSET -15 -1 
        FORCE true 
      END 

    END 
  END 

  LAYER 

    METADATA       

          "ows_title" "layer_0" 

          "gml_include_items" 

          "all" 

    END 

         NAME 'usng' 

    DATA '0000_00/MN_Line_Experiments/MN_USNG_Ramsey_Line_Northing_Beta' 

    STATUS DEFAULT 

    TYPE LINE 

    LABELITEM 'NORTHING'   

    CLASS 

      LABEL 

        TYPE TRUETYPE 

        FONT bluehigh 

        SIZE 15 

        COLOR 25 25 25 

        OUTLINECOLOR 255 255 254 

        ANGLE 0 

        FORCE true 
      END 

    END 
  END 

  LAYER 

    METADATA       

          "ows_title" "layer_0" 

          "gml_include_items" 

          "all" 

    END 

         NAME 'usng' 

    DATA '0000_00/MN_Line_Experiments/MN_USNG_Ramsey_Line_Northing_Beta' 

    STATUS DEFAULT 

    TYPE LINE 

    LABELITEM 'NORTHING'   

    CLASS 

      LABEL 

        TYPE TRUETYPE 

        FONT bluehigh 

        SIZE 10 

        COLOR 25 25 25 

        OUTLINECOLOR 255 255 254 

        ANGLE 0 

        OFFSET 14 -1 
        FORCE true 
      END 

    END 

    MAXSCALE 5000000 

  END 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090506/19626bff/attachment.htm>


More information about the MapServer-users mailing list