Optimizing line width
This documentation is no longer maintained. Please see the new GeoServer documentation at http://docs.geoserver.org
| This functionality requires version 1.7.3 or newer. |
Two ways to render thin lines
There are two ways that GeoServer renders thin lines in WMS output.
- (default) Optimized line width rendering. This method equalizes all stroke widths less than or equal to 1.5 pixels to result in the same output.
- Standard rendering, where all line widths remain unchanged.
The default is due to a legacy optimization for non-antialiased drawing, and will eventually be removed. However, if you would like to disable this optimization, you can do so now.
| Changing this setting may drastically alter the look of your maps! |
![]() |
| Optimized line width rendering (default) |
![]() |
| Standard rendering |
Turning off optimized line width
There are three ways to turn off optimized line width:
- Editing web.xml
- Command line parameter
- Environment variable
Editing web.xml
Add the following code:
<context-param>
<param-name>OPTIMIZE_LINE_WIDTH</param-name>
<param-value>false</param-value>
</context-param>
Command line parameter
Add the following text to the startup command:
-DOPTIMIZE_LINE_WIDTH=false
Environment variable
Set the environment variable OPTIMIZE_LINE_WIDTH=false. On a command line:
OS X / UNIX systems:
export OPTIMIZE_LINE_WIDTH=false
Windows:
set OPTIMIZE_LINE_WIDTH=false
Added by Mike Pumphrey, last edited by Mike Pumphrey on Mar 05, 2009
()

