Wednesday 20 September 2017

Single Image WMS in GeoServer to clear duplicate labels


I have set up GeoServer with PostgreSQL/PostGIS as database. Imported a country boundary shapefile into the database and published as WMS.
The data has got the Country name attribute in the "label" column.
I setup a map client using Openlayers, and it shows so many labels when zoomed in, one for each tile.


Can I publish the wms map as a Single Image, (without multiple image tiles) to avoid duplicate country name labels?


Or is there any other successful methods to do this in SLD?


I have read many answers and tried vendor options to correct this, nothing worked.
Some similar questions were seen as removed as duplicates, but sincerely, I got no solution for this duplicate label issue in GeoServer.


More Info: I am using GeoServer 2.7.0
Using openlayers javascript from :




http://openlayers.org/api/OpenLayers.js



And the Openlayers code is:





See the SLD below, with the vendor options "group" is given true.


Polygon with styled label SLD Cook Book: Polygon with styled label #FF0000 #CCCCCC 1
Arial 12 normal bold 0.5 0.5 #000000 160 0 true false




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...