3

I have a contour map which I have applied a symbology to add arrows pointing 'downslope' (defined by the average of adjacent line segment directions) by editing a linetype and adding markers.

I am now looking at editing the spacing of these markers to suit the map I am looking to produce and have run into a problem where I have lots of small/ short contour 'loops' which are being given their own direction arrow - but these are cluttering up the main topography of the site.

I would like to stop the shorter contours displaying as at the scale I am likely to be working these will not be visible (but their symbology arrows unfortunately are). I have added a length field and extracted the contour lengths, and I would like to filter the displayed features by a length.

Is this possible to achieve, ideally without Python/ PYQGIS as access to this is difficult (IT Policies etc.).

I realise I could copy the layer and manually delete the shorter features but I am after a more flexible solution which I could apply to future situations/ dynamically (i.e. if I decide to alter the cutoff value).

Windows 10, QGIS 3.8.2

Symbology generation example

Example of symbols/ contours to hide/ filter

2
  • 1
    Please add an image of your symbology window to show how exactly you create your arrows, as well as an image of a "problematic" area.
    – Erik
    Jan 16, 2020 at 11:10
  • Have you tried using rule based symbology?
    – ian
    Jan 16, 2020 at 11:48

1 Answer 1

5

You can turn off the whole Marker line if it is too short using built in data driven symbology.

For example my data:

enter image description here

I want to remove the arrows from the smaller islands. These are all line features, so looking at the length of the line is good. I am working in British National Grid, so my units are in meters.

So to switch off the markers from all lines that are under 5km long:

enter image description here

I am using the "Enable layer" switch, and to edit the expression you click on the button next to the text.

With the following expression string:

$length > 5000

Which is pretty simple, if the length of the feature is over 5000 meters then switch the Marker line layer on, if not switch it off.

Result:

enter image description here

Your Answer

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

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