The QGIS composer has an option to toggle anti-aliasing (composer-options=>rendering=>rendering-quality=>"make lines appear less jagged at the expense of some drawing performance"). The standard map renderer does not seem to have such an option.

Anti-aliasing is a visualization feature. For visual use, the anti-aliasing result is almost always 'better' than without. However, sometimes, map output may be used for other purposes: the pixel colors can be used as categories or raster values or be used to mask other maps or rasters, etc. When used for such cases, the visually intermediate pixel-values produced by anti-aliasing distort the category or pixel information.

For comparison, Geoserver has an option to disable anti-aliasing.

I have set up QGIS as a WMS server and want to somehow disable anti-aliasing in order to use the WMS output as a mask for other data.

Can I somehow configure the layer style or rendering options or WMS server output to disable anti-aliasing?

  • If you are using a WMS server for a none visualization function you are almost certainly abusing it, use a WCS if the actual value of pixels is important to you. – Ian Turton Apr 16 '18 at 16:20
  • Agreed, this use case may be abusing WMS if WMS is by definition/specification for visualization only(?). With GeoServer, the 'abusing' setup works ok, so why should that be bad? WCS is for raster sources, WMS can also be used with vector sources. WCS would require a separate conversion routine from vector to raster which is about the same as the QGIS render-engine, only anti-aliasing disabled and probably less flexible? Client tools may have a client that can consume WMS only. If you want 1bit/pixel black-and-white maps, this can only be achieved with anti-aliasing disabled? – anneb Apr 16 '18 at 17:27

Your Answer

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

Browse other questions tagged or ask your own question.