3

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:

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

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 '16 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 '16 at 18:07
4

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 '13 at 11:50
  • 2
    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. – Andrea Aime Nov 23 '13 at 19:17
  • Tested - this does work when there is a border between two identical colours. – Steve Bennett Nov 16 '15 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. – MappaGnosis Nov 16 '15 at 8:58
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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