I am working with QGIS and I have a vector file of the earth Latitude and longitude enter image description here. I need to show the horizontal lines as a dash lines and the vertical as a solid line. I am sure that if I make to layer, one horizontal and vertical, it will solve me problem.

However, I wonder is there a more elegant way to solve this problem?

Can it be done with the Attribute Table?

enter image description here

  • 1
    Is there any attribute field that makes difference between the horizontal and vertical lines?
    – mgri
    Jul 3, 2017 at 14:46
  • 1
    you should be able to set up a rule in your styling that sets up categories for direction in ('n', 's') and another one for direction in ('e', 'w') - would that work? Jul 3, 2017 at 15:13
  • Yes, it solve it. Am I supposed to right done the answer? Jul 3, 2017 at 15:18
  • 2
    @NitzanMatan If you describe the solution you found as a new answer, it would help future readers with a similar problem.
    – mgri
    Jul 3, 2017 at 15:39

1 Answer 1


This answer is for this specific problem, but it should work for other project with the same task.

The first step is to categorized the layers be their direction in the layer styling barenter image description here If you only need to change the color of a line It can be done be clicking on the sub layer in this bar enter image description here

If you need to change the line pen style mark the sub layer you need to change and then press "change"
enter image description here

Now you have more option the change the line style enter image description here

In order of changing the pen style click on the "Simple line" icon and the Symbol layer type bar will open enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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