[Geoserver-users] SLD for labelling streets

I would like to get my street labeling to appear somewhat like that found on the live geoserver demo.

A screen clip of what I am looking for can be found here:

http://www.yellowfinmusic.com/images/GeoServer%20Demonstration%20(full%20TIGER%20data%20on%20WMS)_1211400574281.png

My sld can be found here:

http://www.yellowfinmusic.com/street.sld

And my WMS renders the following which has entirely too many duplicate labels for my liking:

http://www.yellowfinmusic.com/images/OpenLayers%20map%20preview_1211399678212.png

Does anyone know of a way to limit label duplication other than combining multiple street segments into one feature?

Thanks in advance

Tim

Hi,

what you want is metatiling, I've tried to explain the concept here: http://geowebcache.org/trac/wiki/metatiles

GeoServer has 3x3 metatiling built in if you append tiled=true to every request. To do this in OpenLayers, add
tiled: true
to the layer parameters in OpenLayers.

Alternatively, if your projection is EPSG:4326 or EPSG:900913, you can use the GeoWebCache extension and get even larger metatiles (more distance between labels).

-Arne

Keane, Tim wrote:

I would like to get my street labeling to appear somewhat like that found on the live geoserver demo.

A screen clip of what I am looking for can be found here:

http://www.yellowfinmusic.com/images/GeoServer%20Demonstration%20(full%20TIGER%20data%20on%20WMS)_1211400574281.png <http://www.yellowfinmusic.com/images/GeoServer%20Demonstration%20(full%20TIGER%20data%20on%20WMS)_1211400574281.png&gt;

My sld can be found here:

http://www.yellowfinmusic.com/street.sld

And my WMS renders the following which has entirely too many duplicate labels for my liking:

http://www.yellowfinmusic.com/images/OpenLayers%20map%20preview_1211399678212.png

Does anyone know of a way to limit label duplication other than combining multiple street segments into one feature?

Thanks in advance

Tim

I'm not sure if this is exactly what you're looking for but I've seen this used as an example of a way to force space between labels:

<TextSymbolizer>
...
    <VendorOption name="spaceAround">somenumber</VendorOption>
...
</TextSymbolizer>

Thanks,
Mike

Arne Kepp wrote:

Hi,

what you want is metatiling, I've tried to explain the concept here: http://geowebcache.org/trac/wiki/metatiles

GeoServer has 3x3 metatiling built in if you append tiled=true to every request. To do this in OpenLayers, add
tiled: true
to the layer parameters in OpenLayers.

Alternatively, if your projection is EPSG:4326 or EPSG:900913, you can use the GeoWebCache extension and get even larger metatiles (more distance between labels).

-Arne

Keane, Tim wrote:

I would like to get my street labeling to appear somewhat like that found on the live geoserver demo.

A screen clip of what I am looking for can be found here:

http://www.yellowfinmusic.com/images/GeoServer%20Demonstration%20(full%20TIGER%20data%20on%20WMS)_1211400574281.png <http://www.yellowfinmusic.com/images/GeoServer%20Demonstration%20(full%20TIGER%20data%20on%20WMS)_1211400574281.png&gt;

My sld can be found here:

http://www.yellowfinmusic.com/street.sld

And my WMS renders the following which has entirely too many duplicate labels for my liking:

http://www.yellowfinmusic.com/images/OpenLayers%20map%20preview_1211399678212.png

Does anyone know of a way to limit label duplication other than combining multiple street segments into one feature?

Thanks in advance

Tim

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4051,48348af556286491211187!

Keane, Tim ha scritto:

I would like to get my street labeling to appear somewhat like that found on the live geoserver demo.

...

Does anyone know of a way to limit label duplication other than combining multiple street segments into one feature?

This is called grouping, it's not part of the SLD standard but we
do have an extension that we're using in the demo you linked above.
It's also used in the tiger_roads demo layer that we ship with.
Basically you have to add
<VendorOption name="group">true</VendorOption>
just before closing the text symbolizer, and GeoServer will group
all the features with the same label and paint the label just
once for the whole group.

You can find more information about SLD and examples about
the labeling options here:
http://geoserver.org/display/GEOSDOC/OGC+SLD+Explanations+and+Samples
http://geoserver.org/display/GEOSDOC/LabelingOptions

Hope this helps
Cheers
Andrea