[Geoserver-users] Multiple labels for each linear feature

GeoServer is rendering multiple labels for long linear features for a WMS request of a feature type with a multiLineStringProperty geometry. This problem occurs for requests of PNG and JPEG formats, but not for PDF formats.

I have attached the SLD that I am using for rendering the linear feature type. Note: This is not a name grouping issu–the problem is with individual features. Also, this is not a tiling issue since I was viewing the images using GeoServer’s built-in OpenLayers demo feature without tiles.

The data source for the feature type was created from a polyline shapefile. Using ArcMap, I have checked that these long linear features are single features–I checked both the raw shapefile and the data returned by a WFS call.

Here is the software versions that I am using:
GeoServer 1.6.2
Tomcat 6.0.16
Java 1.5.0_12-b04
Java Advanced Imaging 1.1.3
Java Advanced Imaging Image I/O Tools 1.1
Red Hat Enterprise Linux ES release 3 (Taroon Update 9)
Linux 2.4.21-51.EL (uname -s -r)

Thank you,
Alan

contour-halo.sld (2.01 KB)

I am trying to render a MultiLineString feature with a SLD LineSymbolizer. However, it appears that only one of the line strings is being rendered. Any thoughts on what might be going on? Should LineSymbolizer work for a MultiLineString? One note, the multiple line strings are NOT connected.

Thanks, David Robison

--

David R Robison
Open Roads Consulting, Inc.
708 S. Battlefield Blvd., Chesapeake, VA 23322
phone: (757) 546-3401
e-mail: drrobison@anonymised.com
web: http://openroadsconsulting.com
blog: http://therobe.blogspot.com
book: http://www.xulonpress.com/book_detail.php?id=2579

Here is the WFS GetFeature dump of the multilinestring in question.

<gml:MultiLineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326&quot;&gt;
    <gml:lineStringMember>
    <gml:LineString>
    <gml:coordinates decimal="." cs="," ts=" ">
-80.19981076,37.23097372 -80.19887208,37.23137369 -80.19871719,37.23143066 -80.19856308,37.23149756 -80.1984083,37.23156403 -80.19825479,37.23163099 -80.1980991,37.23169726 -80.19794271,37.23176416 -80.19778505,37.23183198 -80.19762624,37.23189889 -80.19746841,37.23196756 -80.19731119,37.23203613 -80.19715396,37.23210516 -80.19697841,37.23218285
</gml:coordinates>
</gml:LineString>
</gml:lineStringMember>
    <gml:lineStringMember>
    <gml:LineString>
    <gml:coordinates decimal="." cs="," ts=" ">
-80.10983054,37.28156697 -80.10970765,37.28157587 -80.10936321,37.2816083 -80.10917963,37.28162199 -80.10899027,37.28163728 -80.10880954,37.28165169 -80.10863149,37.28166485 -80.10846232,37.28167681 -80.10829652,37.28168699 -80.10810266,37.28171344 -80.10800713,37.28172328 -80.10793363,37.28172655 -80.10777314,37.28173746
</gml:coordinates>
</gml:LineString>
</gml:lineStringMember>
</gml:MultiLineString>

Does this look OK? The SLD is:

          <LineSymbolizer>
            <Stroke>
              <CssParameter name="stroke">#FF0000</CssParameter>
              <CssParameter name="stroke-width">5</CssParameter>
              <CssParameter name="stroke-opacity">1</CssParameter>
            </Stroke>
          </LineSymbolizer>

The second line string (I have omitted some of the coordinates) gets drawn but the first does not. Any ideas?

David

David R Robison wrote:

I am trying to render a MultiLineString feature with a SLD LineSymbolizer. However, it appears that only one of the line strings is being rendered. Any thoughts on what might be going on? Should LineSymbolizer work for a MultiLineString? One note, the multiple line strings are NOT connected.

Thanks, David Robison

--

David R Robison
Open Roads Consulting, Inc.
708 S. Battlefield Blvd., Chesapeake, VA 23322
phone: (757) 546-3401
e-mail: drrobison@anonymised.com
web: http://openroadsconsulting.com
blog: http://therobe.blogspot.com
book: http://www.xulonpress.com/book_detail.php?id=2579

This e-mail communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed. If you are not the intended recipient, you should immediately stop reading this message and delete it from all computers that it resides on. Any unauthorized reading, distribution, copying or other use of this communication (or its attachments) is strictly prohibited. If you have received this communication in error, please notify us immediately.

Never mind, user error. TNX David

David R Robison wrote:

···
-- 

David R Robison
Open Roads Consulting, Inc.
708 S. Battlefield Blvd., Chesapeake, VA 23322
phone: (757) 546-3401
e-mail: [drrobison@anonymised.com](mailto:drrobison@anonymised.com)
web: [http://openroadsconsulting.com](http://openroadsconsulting.com)
blog: [http://therobe.blogspot.com](http://therobe.blogspot.com)
book: [http://www.xulonpress.com/book_detail.php?id=2579](http://www.xulonpress.com/book_detail.php?id=2579)

This e-mail communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed.  If you are not the intended recipient, you should immediately stop reading this message and delete it from all computers that it resides on. Any unauthorized reading, distribution, copying or other use of this communication (or its attachments) is strictly prohibited.  If you have received this communication in error, please notify us immediately.