[GIS] Force all labels visible in GeoServer

geoserverlabelingsld

How can I force all labels to be visible in GeoServer

I have tried with both

<VendorOption name="conflictResolution">false</VendorOption>

and

<VendorOption name="spaceAround">-1</VendorOption>

But it doesn't seem to help much. The pointsymbolizer are always visible though.
And sometimes it doesn't even feel like its "crouded" when the labels isn't visible.

enter image description here

The (I guess) interesting parts in my sld file looks like following:

<PointSymbolizer>
    <Graphic>
                     <Mark>
                       <WellKnownName>circle</WellKnownName>
                       <Fill>
                         <CssParameter name="fill">#FFFFFF</CssParameter>
                       </Fill>
                      <sld:Stroke>
                        <sld:CssParameter name="stroke">#9F0000</sld:CssParameter>
                        <sld:CssParameter name="stroke-width">2</sld:CssParameter>
                      </sld:Stroke>                           
                     </Mark>
                     <Size>9</Size>
                   </Graphic>
                 </PointSymbolizer>                    
                <TextSymbolizer>
                <sld:Geometry>
                  <ogc:Function name="centroid">
                    <ogc:PropertyName>geom</ogc:PropertyName>
                  </ogc:Function>
                </sld:Geometry>                    
                    <Label>
                      <ogc:PropertyName>label</ogc:PropertyName>
                    </Label>
                    <Font>
                      <CssParameter name="font-family">Arial</CssParameter>
                      <CssParameter name="font-weight">Bold</CssParameter>
                      <CssParameter name="font-size">14</CssParameter>
                    </Font>
                    <LabelPlacement>
                      <PointPlacement>
                        <AnchorPoint>
                          <AnchorPointX>0.5</AnchorPointX>
                          <AnchorPointY>0.5</AnchorPointY>
                        </AnchorPoint>
                        <Displacement>
                          <DisplacementX>0</DisplacementX>
                          <DisplacementY>-15</DisplacementY>
                        </Displacement>
                      </PointPlacement>
                    </LabelPlacement>
                    <Halo>
                      <Radius>
                        <ogc:Literal>2</ogc:Literal>
                      </Radius>
                      <Fill>
                        <CssParameter name="fill">#9F0000</CssParameter>
                      </Fill>
                    </Halo>
                    <Fill>
                      <CssParameter name="fill">#FFFFFF</CssParameter>
                    </Fill>
                    <VendorOption name="conflictResolution">false</VendorOption>

                </TextSymbolizer>

Best Answer

Label placement is more an art than a science, GeoServer tries very hard to put as many labels as possible on to your map while making it look good. As part of this it will not draw a label that goes over the edge of the map. This means that with small tiles and relatively large labels it may not be possible to place many (or any) labels. The easiest solution to this is to use an untiled layer with just the labels on which you overlay on top of your map. Since there is not much rendering involved in labeling this should not be too slow if it isn't cached.

You can also work round this using options such as gutters and meta-tiling depending on the exact situation if you must have tiles.