I have some lines of symbols. I want to vary the number of symbols based on a value.

I working on households I don't know the street where the are living but not exactly their address. For one household the point should be located a the middle of the polyline / line.

enter image description here


1 Answer 1


You need to change your line symbology or add a second style, using cmarker line$length/"column holding your numbers".

Choose interval (topmost bulletpoint), change the spacing to map units, then hit the rectangle to the right of the option in order to access data defined override using the option edit in the drop down menu. Enter $length/"column holding your numbers" ad value. This will create a marker symbol every x meter along your line, where x is its length divided by the number you mentioned.

The style still begins at the starting point of the line, so you need to move the first marker along the line. Again, choose map units and access data defined override. Here you enter $length/"column holding your numbers"/2 - this will move your first marker x/2 m along the line, with x being the same as above.

For orientation & illustration of the style, check the attached screenshot.

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.