# Making lines curvy in QGIS

In QGIS I am working on a map with lines connecting locations created with the MMQGIS plugin. Is there an easy way to make those direct lines somewhat curvy for aesthetic purposes?

I'm trying to achieve something like the map below but with several hubs. I have read suggestions on how to do this with PostGIS and other advanced tools, so I've done my research (including other posts here) and tried using several plugins, and I'm specifically asking for an easy solution because I don't have much experience.

• is there a way to undo the curve while editing or undo a point where you accidentally placed it?
– 3mm
Commented Jan 24, 2019 at 17:33
– Andy
Commented Jan 24, 2019 at 17:56
• If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review
– csk
Commented Jan 24, 2019 at 18:43
• Please, do not forget about "What should I do when someone answers my question?" Commented Jun 20, 2022 at 5:52

Use Arrows style instead of Simple Line style.

For example, these lines with Simple Line style:

look like this with Arrow style:

You can turn off the arrow heads by setting the head width and length to 0.

As you can see, the straight line becomes a straight arrow, while the lines with a middle vertex become curved arrows. The placement of the middle vertex determines the curve of the arrow.

To convert your straight lines to curved arrows, you'll need to add a middle vertex to every line, and then offset that vertex enough to generate a curved arrow.

Use the Geometry Generator style with Geometry type: Linestring. This expression will create a line with a midpoint 200 distance units to the east and north of the original midpoint of the line.

``````  make_line( start_point( \$geometry), translate( centroid( \$geometry), 200,200), end_point(\$geometry))
``````

Change the line to display as an Arrow style. Adjust the centroid offset values in the geometry generator expression until you're happy with the shape of the arrows. If you want, you can make them proportional to the length of the original line, eg `\$length/10`. The full expression would be:

``````make_line( start_point( \$geometry), translate( centroid( \$geometry), \$length/10, \$length/10), end_point(\$geometry))
``````

Here's what it looks like, with the original lines in pink and the geometry-generated arrows in black:

If you aren't satisfied with the line midpoint placement, you can adjust them manually. First, convert the geometry generated line style into an actual layer. Copy the expression from the geometry generator into the `geometry by expression` tool (Processing toolbox). Then use the Vertex Tool (Digitizing toolbar) to manually move the vertices.

• I think only translating the Y direction would give the effect of being straight when the lines are oriented north and south,like his original picture. Commented Jul 15, 2020 at 2:17

If you are using QGIS 2.12 or later, you would have "Add circular string" Tool in "Digitizing Toolbar". Or you may want to try "Spline plugin".

(LHS) Add circular string tool during digitize, (RHS) Spline tool during digitize

You can see Add circular string tool (LHS) draws a circular or semi-circular line, while Spline tool (RHS) interpolates points to fit your line to spline curve. Whichever you choose, you just need to click 3 points: start point, curve point and end point.

And you will get:

There are other tools such as CadTools but it will be more exciting if you find it yourself.

• Thanks. I'm not looking to create lines, but to curve (not manually) the ones I already created with mmqgis. Also not looking for excitement, just for something to get the job done. It's why I came here, so any help would be appreciated! :)
– darj
Commented Oct 26, 2016 at 16:18
• Got that, thanks. And sorry I was mistaken. Now I understand you already have Hub Lines created by MMQGIS plugin. Commented Oct 26, 2016 at 18:12

You have to make a few more steps: (I have the Dutch version so if it's not the right translation, sorry). Like @bugmenot did, but then again choose Fill and and change it from Symbol Layer Type Standard Filling to : 'Rand/Edge?:Arrow . I'v done a coloureffect gradual filling[geleiddelijke vulling] in the last 'Fill'. Hope it helpd.

• Thanks! Is it possible to adjust the angle of the curve so it's more flat like in the image I posted?
– darj
Commented Oct 27, 2016 at 18:39
• I dont think thats possible. Perhaps with some scripting in Python, but thats not my cup of thea. Commented Oct 30, 2016 at 21:26