5

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?

  • 1
    If the user is selecting "no Pen" for the border, but the border still gets rendered, should not this be reported as a bug? – Luís de Sousa Jul 12 '16 at 13:08
4

The only way to that is to set the boarder color same as the fill color, then boarder will disappear. You can keep setting the boarder line width is zero. Use 'Pick Color' to select exactly the same color from fill color.

enter image description here

enter image description here

enter image description here

Use Pick color to make the border color same as the filled color by selecting the filled color

enter image description here

The legend will look like this

enter image description here

And the final output is like this.

enter image description here

  • Like that I get a red border around each polygon. Which QGis version are you using? – Luís de Sousa May 20 '16 at 8:57
  • 1
    You need to select the same color for each filled color. For example red fill -> red border, Blue filled -> blue border, and so on. That is why you need to use Pick color tool under the border color to pick the same filled color. – ahmadhanb May 20 '16 at 9:24
  • I spent the last 20 minutes modifying each and every class style and the result is exactly the same. – Luís de Sousa May 20 '16 at 9:53
  • I updated the answer for more information. – ahmadhanb May 20 '16 at 10:03
  • 1
    The reason it hasn't worked for you is because you still have your border style set to "No Pen", so any changes you've done won't show. Change it to "Solid Line" and you should see the difference – Knightshound Jun 1 '16 at 10:35
1

choropleth-gen

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

  • Luis, just wanted to thank you for your script. Used it today, and it was very helpful! – Chris Aug 30 at 19:35

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.