2

I have a GML file that I'm displaying in QGis - it contains a set of contours and they are written out in such a way that the lowest contour (largest polygon) is drawn last thus covering up all the smaller polygons. While I can work round this by writing out the GML in reverse order I was wondering if there was a way to reverse the draw order directly inside QGis.

1
  • It will be simply derided from how it parses the GML; I am sure there's no way to force a parsing order. I had the similar issues with MapInfo and drawing GML and it was simply the way it did it.
    – Hairy
    Dec 8 '11 at 14:20
2

Updated answer: in QGIS 2.18 you are able to define the rendering order using "control feature rendering order". You can then define an expression based on elevation and set it to ascending.

1
  • In general, it is quite useful to use $area in the expression and go descending for the order: this results in little features being rendered last (on top) so you are more likely to see everything. Feb 10 '17 at 22:10
1

How about just converting the polygons to linework? Then you wouldn't have to worry about display order.

Or maybe these previous questions will give you some suggestions you can use:

3
  • I need them to be polygons as I'm colouring them in. Since I control the code writing out the GML reversing the order is easy but I wondered what the correct answer should be.
    – Ian Turton
    Dec 8 '11 at 16:40
  • True, if you control the writing of the data, then it shouldn't be too tough to change the source data. I have yet to see any QGIS or ArcGIS functions that have the capability of sorting the draw order. It could be useful in certain circumstances, though, if it existed. Dec 8 '11 at 17:02
  • It's pretty easy in UDig so I expected it to be easy in QGis
    – Ian Turton
    Dec 11 '11 at 11:41
1

There are ways to create symbols that should give the desired effect:

Create a symbol made of two layers: 1) a fill layer, 2) an outline layer.

Enable "Symbol layers" to tell QGIS to first render the the fill layer for all features in and then the outline layer.

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.