Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am using Mapserver v5.6 and used MapFile with 2 layers. One layer to show polygon and other to show label at ST_PointOnSurface of the same polygon... There are another way to show unique-label at POSITION CC of the polygon?

I tested REPEATDISTANCE 9999 but no effect.

Even Mapserver v6 documentation have no instruction about "no-repeat" options.

The polygon-layer was tested (with no effect) with this mapfile fragment for label

      LABEL
        ALIGN center
        FONT "ubuntu"
        TYPE TRUETYPE
        SIZE 15
        POSITION CC
        COLOR 255 0 0
        REPEATDISTANCE 9999
        OUTLINECOLOR 50 200 60
      END #label
share|improve this question
add comment

2 Answers

Add the following to your mapfile. It should work.

LAYER
-------
POSTLABELCACHE FALSE
PROCESSING "LABEL_NO_CLIP=ON"
LABELCACHE ON
-----
    LABEL 
      -------
      PARTIALS TRUE
      MINDISTANCE 50
      REPEATDISTANCE 9999
      --------
    END    
END
share|improve this answer
    
This is a correct answer but I only added the processing directive. This caused the label to be positioned on centroid of feature. –  cavila Jan 17 at 12:36
add comment

What you are looking for is at the LAYER level. It's a processing directive called LABEL_NO_CLIP. This make sure that the polygon is not clipped between tile so the label doesn't repeat.

LAYER
  NAME ...
  PROCESSING "LABEL_NO_CLIP=True"
  ...
  CLASS
    ...
    LABEL
      ALIGN center
      FONT "ubuntu"
      TYPE TRUETYPE
      SIZE 15
      POSITION CC
      COLOR 255 0 0
      OUTLINECOLOR 50 200 60
    END #label
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.