I wanted to create a symbol like this (see screenshots below(first and second: white circle)), the shape of these symbols are different, some of them are a straight line, some of them are curved. How do I do it?

Screenshot 1

enter image description here

Screenshot 2 (See white circle)

enter image description here

How can I reduce the space between line and rectangle?

enter image description here

  • 1
    I posted a similar question before. JGH provided a nice answer using SVG symbol. It may applicable to your case, too.
    – Kazuhito
    May 23 '18 at 13:54
  • @Kazuhito btw: if its "single symbol", how to style the line with two Marker lines? simply by clicking "+" or use "rule based" ? thx again
    – ndr
    May 23 '18 at 14:35
  • If the line is a mix of two markers, yes, I would probably click "+" to add second marker and set offset to make sure these markers do not hide each other.
    – Kazuhito
    May 23 '18 at 14:42
  • @Kazuhito yes, I've figured it out. but in the "answer" said: "Each Marker line is made of a Simple Marker, the half-circle."--->"half-circle": instead of half circle, I need a half rectangle, i found only full not half...:( plz help..
    – ndr
    May 23 '18 at 14:59
  • I see your point. The linked answer by JGH had started from a half-circle, so it required another (180-rotated) marker. If you have full cycle rectangle, you do not need second marker.
    – Kazuhito
    May 23 '18 at 15:07

Just in case you need a "gear-like" SVG symbol:

<svg width="5.0" height="2.5" version="1.1" viewBox="0 0 5.0 2.5" xmlns="http://www.w3.org/2000/svg">
 <path d="m0 1.25v1.24h2.48v-2.48h2.48v1.25" fill="none" stroke="param(outline)" stroke-width="param(outline-width) 0.2"/>

I am not good at drawing. Modify as required.

Credit should go to JGH for all the ideas and detailed steps provided in the answer to Drawing wavy, wiggly lines in QGIS?.

One additional from me is: Please keep the marker interval and size width equal. (Click on the Marker line as seen on the picture below to find interval. In this example size width and interval are both 4.0 mm.)

enter image description here

Further notes

  • SVG path has to be set correctly (e.g. here).
  • SVG symbol outline width might have been preset to No outline or 0 (automatic) depending on previous SVG setting, which makes it invisible. Set it to 0.2 mm or any other numbers.
  • My apologies @ndr I have mixed up size and width probably looking at somewhere else. That part should read "size and marker interval are the same".
    – Kazuhito
    May 24 '18 at 9:04
  • @ndr Just one possibility; do you see the Outline width in the SVG marker settings? If it is set to No outline the marker does not show up.
    – Kazuhito
    May 24 '18 at 12:09
  • @ndr As far as I see from your third image (Layer Properties), you are doing the same as myself. Perhaps you can post your SVG file (as I have done so in my answer) so that I can test it?
    – Kazuhito
    May 24 '18 at 12:41
  • 1
    I see. Sorry I misunderstood @ndr. Only difference I now see is I put SVG files in my .qgis2/svg folder. My procedure is described here. Not sure it works for you, though.
    – Kazuhito
    May 24 '18 at 13:12
  • hey, thank you for your help. I found the problem: 1) wrong svg path 2) i have to set the 'outline width' to 0.2 or something, it was 0 (automatic) (under "SVG marker"). now is working,well at least i saw the symbol on my map. thanks a million! you are the best! thank you !
    – ndr
    May 24 '18 at 15:20

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .