Saturday 16 January 2016

symbology - Forcing QGIS to remove polygon borders?


I have a GML layer representing an hexagonal grid that I would like to include in some maps. In QGIS (version 2.14.2) I applied a graduated style and completely removed the polygon border:


enter image description here


However, in the map canvas the borders are still being portrayed:


enter image description here


Zooming in one can see the border around each polygon, it is thin, but it is still there:


enter image description here


Suspecting this was an issue with the map canvas itself, I tried to produce some maps with the Print Composer. Even in vector format the polygon borders are portrayed. Please check these files:




Is there any way to force QGIS to remove these borders?



Answer




Tired of creating choropleths by hand for QGis I decided to create a little code package for the purpose. It has the suggestive name choropleth-gen and can be installed from PyPi, issuing a command like:


pip install choropleth-gen


The package installs two scripts in the system: gen_greyscale_choropleth and gen_spectral_choropleth. Both these scripts take the same arguments, identified with specific flags:



  • -b - bottom value in the choropleth.

  • -t - top value in the choropleth.

  • -c - number of colour classes to generate.


  • -o - path to the resulting SLD file.


Example:


gen_spectral_choropleth -b 10 -t 50 -c 20 -o style.sld


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...