The data I am using a polygon feature layer, consisting multiple polygons and I want to show the same without polygon outlines. In ArcGIS I simply use outline colour as no colour. This produce the below map.

map produced in ArcGIS

However the same does not work in GeoServer SLD. I tried both, without any tag definition, as well as the following:

     <CssParameter name="stroke">#000000</CssParameter>
     <CssParameter name="stroke-width">0</CssParameter>
     <CssParameter name="stroke-opacity">0</CssParameter>

But both of them produce the following:

Map produced in GeoServer SLD

How can I get rid of the tiny white line (or may be subtle gaps). I can not find anything like polygon-gamma, used in CartoCSS for the same, in SLD documentation.

  • The documentation shows the behavior as you are expecting from it, when no stroke is defined, but even that still renders with a thin stroke.
    – Kevin
    Dec 13, 2016 at 18:06
  • I seem to only being having the issue with the GeoWebCache tiles; hitting GeoServer directly seems to be correct.
    – Kevin
    Dec 13, 2016 at 18:07

3 Answers 3


You could set the polygon boundary stroke to be the same colour as the fill. You might have to give it more than zero width though.

  • Although this solves the above shown problem, I have a huge data set for many themes with more than 100 different classes. According to your solution, I will have to define outline for all these classes. I am just optimistically trying to avoid this laborious job.
    – thelastray
    Nov 23, 2013 at 11:50
  • 3
    The proposed solution is the only way, to solve the issue we'd need to control the gamma parameter of the Java antialiasing engine, but it is not exposed, so no luck. Nov 23, 2013 at 19:17
  • Tested - this does work when there is a border between two identical colours. Nov 16, 2015 at 8:54
  • You can do it also when the colour is different. One border will 'win', but because it is so thin, it will not be noticeable. Nov 16, 2015 at 8:58

The only other option is to merge the polygons in your database, some good information here from another Question, if you are using PostgreSQL and PostGIS


Using image/gif as output format seems to be a workaround for this problem.

Unfortunately, in contrast to other output formats, any transparency defined in the SLD is lost when using GIF:

comparison of image/png and image/gif as output format

See https://lists.osgeo.org/pipermail/openlayers-users/2010-January/015634.html for this opacity issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.