[Geoserver-users] Repeated labels for PolygonSymbolizer

     Below is the FeatureTypeStyle that draws polygon with labels. As you
can see from the attached image, the labels are repeated many times over the
polygon. Is there a <VendorOption> that I can use to suppress the behavior?

<sld:FeatureTypeStyle>
        <sld:Rule>
          <Name>Landing area</Name>
          <Title></Title>
          <ogc:Filter>
            <ogc:Or>
              <ogc:And>
               
<ogc:PropertyIsEqualTo><ogc:PropertyName>f_code</ogc:PropertyName><ogc:Literal>BD000</ogc:Literal></ogc:PropertyIsEqualTo>
               
<ogc:PropertyIsGreaterThan><ogc:PropertyName>hdp</ogc:PropertyName><ogc:Literal>20</ogc:Literal></ogc:PropertyIsGreaterThan>
              </ogc:And>
               <ogc:And>
               
<ogc:PropertyIsEqualTo><ogc:PropertyName>f_code</ogc:PropertyName><ogc:Literal>BD200</ogc:Literal></ogc:PropertyIsEqualTo>
               
<ogc:PropertyIsEqualTo><ogc:PropertyName>vrr</ogc:PropertyName><ogc:Literal>4</ogc:Literal></ogc:PropertyIsEqualTo>
               
<ogc:PropertyIsGreaterThan><ogc:PropertyName>hdp</ogc:PropertyName><ogc:Literal>20</ogc:Literal></ogc:PropertyIsGreaterThan>
              </ogc:And>
            </ogc:Or>
          </ogc:Filter>
          
          <PolygonSymbolizer>
            <Stroke>
              <sld:CssParameter name="stroke">#92A4A6</sld:CssParameter>
              <sld:CssParameter name="stroke-width">2</sld:CssParameter>
              <sld:CssParameter name="stroke-dasharray">12
6</sld:CssParameter>
            </Stroke>
          </PolygonSymbolizer>
         <sld:TextSymbolizer>
            <sld:Label>
              <ogc:PropertyName>txt</ogc:PropertyName>
            </sld:Label>
            <sld:Font>
              <sld:CssParameter name="font-family">Arial</sld:CssParameter>
              <sld:CssParameter name="font-size">8</sld:CssParameter>
              <sld:CssParameter name="font-style">normal</sld:CssParameter>
              <sld:CssParameter name="font-weight">bold</sld:CssParameter>
            </sld:Font>
            <sld:LabelPlacement>
              <sld:PointPlacement>
                <sld:AnchorPoint>
                  <sld:AnchorPointX>0.5</sld:AnchorPointX>
                  <sld:AnchorPointY>0.5</sld:AnchorPointY>
                </sld:AnchorPoint>
              </sld:PointPlacement>
            </sld:LabelPlacement>
            <sld:Halo>
              <sld:Radius>3</sld:Radius>
              <sld:Fill>
                <sld:CssParameter name="fill">#FFFFFF</sld:CssParameter>
              </sld:Fill>
            </sld:Halo>
           
          </sld:TextSymbolizer>
        </sld:Rule>
      </sld:FeatureTypeStyle>

<http://osgeo-org.1560.x6.nabble.com/file/n5146148/repeated-label.jpg&gt;

I greatly appreciate any comments on this issues.

Regards,
Tam

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Repeated-labels-for-PolygonSymbolizer-tp5146148.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Tam,
Grouping should do what you want - http://docs.geoserver.org/stable/en/user/styling/sld-reference/labeling.html#grouping-features-group

This transmission is intended for the named addressee(s) only and may contain confidential, sensitive or personal information and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

···

Cheers,
Jonathan

On 16 June 2014 19:40, tt5430 <tt9488@anonymised.com.84…> wrote:

Below is the FeatureTypeStyle that draws polygon with labels. As you
can see from the attached image, the labels are repeated many times over the
polygon. Is there a that I can use to suppress the behavior?

sld:FeatureTypeStyle
sld:Rule
Landing area

ogc:PropertyIsEqualToogc:PropertyNamef_code</ogc:PropertyName>ogc:LiteralBD000</ogc:Literal></ogc:PropertyIsEqualTo>

ogc:PropertyIsGreaterThanogc:PropertyNamehdp</ogc:PropertyName>ogc:Literal20</ogc:Literal></ogc:PropertyIsGreaterThan>
</ogc:And>
ogc:And

ogc:PropertyIsEqualToogc:PropertyNamef_code</ogc:PropertyName>ogc:LiteralBD200</ogc:Literal></ogc:PropertyIsEqualTo>

ogc:PropertyIsEqualToogc:PropertyNamevrr</ogc:PropertyName>ogc:Literal4</ogc:Literal></ogc:PropertyIsEqualTo>

ogc:PropertyIsGreaterThanogc:PropertyNamehdp</ogc:PropertyName>ogc:Literal20</ogc:Literal></ogc:PropertyIsGreaterThan>
</ogc:And>
</ogc:Or>
</ogc:Filter>

#92A4A6 2 12 6 txt Arial 8 normal bold 0.5 0.5 3 #FFFFFF

</sld:TextSymbolizer>
</sld:Rule>
</sld:FeatureTypeStyle>

<http://osgeo-org.1560.x6.nabble.com/file/n5146148/repeated-label.jpg>

I greatly appreciate any comments on this issues.

Regards,
Tam


View this message in context: http://osgeo-org.1560.x6.nabble.com/Repeated-labels-for-PolygonSymbolizer-tp5146148.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Keep in mind that if you call the WMS layer for tiles, you will probably get repeated labels as well since each individual tile is requested independently of the other tiles.

Chris Snider

Senior Software Engineer

Intelligent Software Solutions, Inc.

Description: Description: Description: cid:image001.png@anonymised.com

···

Hi Tam,

Grouping should do what you want - http://docs.geoserver.org/stable/en/user/styling/sld-reference/labeling.html#grouping-features-group

Cheers,

Jonathan

On 16 June 2014 19:40, tt5430 <tt9488@anonymised.com> wrote:

Below is the FeatureTypeStyle that draws polygon with labels. As you
can see from the attached image, the labels are repeated many times over the
polygon. Is there a that I can use to suppress the behavior?

sld:FeatureTypeStyle
sld:Rule
Landing area

ogc:PropertyIsEqualToogc:PropertyNamef_code</ogc:PropertyName>ogc:LiteralBD000</ogc:Literal></ogc:PropertyIsEqualTo>

ogc:PropertyIsGreaterThanogc:PropertyNamehdp</ogc:PropertyName>ogc:Literal20</ogc:Literal></ogc:PropertyIsGreaterThan>
</ogc:And>
ogc:And

ogc:PropertyIsEqualToogc:PropertyNamef_code</ogc:PropertyName>ogc:LiteralBD200</ogc:Literal></ogc:PropertyIsEqualTo>

ogc:PropertyIsEqualToogc:PropertyNamevrr</ogc:PropertyName>ogc:Literal4</ogc:Literal></ogc:PropertyIsEqualTo>

ogc:PropertyIsGreaterThanogc:PropertyNamehdp</ogc:PropertyName>ogc:Literal20</ogc:Literal></ogc:PropertyIsGreaterThan>
</ogc:And>
</ogc:Or>
</ogc:Filter>

#92A4A6 2 12 6 txt Arial 8 normal bold 0.5 0.5 3 #FFFFFF

</sld:TextSymbolizer>
</sld:Rule>
</sld:FeatureTypeStyle>

<http://osgeo-org.1560.x6.nabble.com/file/n5146148/repeated-label.jpg>

I greatly appreciate any comments on this issues.

Regards,
Tam


View this message in context: http://osgeo-org.1560.x6.nabble.com/Repeated-labels-for-PolygonSymbolizer-tp5146148.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

This transmission is intended for the named addressee(s) only and may contain confidential, sensitive or personal information and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.