I am creating a sea chart. The sea chart has ships lanes in a line layer. In the same layer, the safe depth of the ship lane is found in a column. I want to use this safe depth as a label on the ship lane, which works without a problem. But to follow standard themathising rules and get a clear view of the number, I need the ships lane line not to be visible underneath and just around the number (see as an example of what I want QGIS to do the number 2,4 on the image below). Creating a white background under the text is not an option, this could cover other important features. So is it possible to make the line just disappear under the label and for instance 2mm on the sides of the label?

Example of how I mean

  • similar to this question, do any of the answers to that help? – Steven Kay Jun 26 '17 at 16:49
  • Thanks @StevenKay, unfortunately they do not help, the number of ship lanes and safe depths are so massive that manual label placing would not work, and the other solutions does not seem to really help. – Benjamin Donner Jun 26 '17 at 17:18
  • You could try using a multi-layer symbol instead of a label. One symbol layer is a marker line > font marker > data defined override > choose safe depth attribute. The other layer would be a line with a custom dash pattern set so that the gaps line up with the font markers. – csk Jun 26 '17 at 20:24
  • @BenjaminDonner where is the label positioned along the line? At a specific point (the middle, for example), or it can move along it (for example when zooming)? – mgri Jun 29 '17 at 22:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.