I've used Shape Tools plugin's Azimuth Distance Digitizer tool, to point and click, and then enter azimuth and distance in order to get a line.

This case is the same, but I have many features, so it would be nice an automated way to create these line features.

I've read Draw line with lon, lat, distance and azimuth

Can someone point me in the right direction to make it with QGIS?

  • Welcome to gis.stackexchange! Please note that a good question on this site is expected to show some degree of research on your part, i.e. what you have tried and - if applicable - code so far. For more info, you can check our faq.
    – underdark
    Commented May 2, 2018 at 20:31
  • Yes! Thanks. Indeed, I'm writing some pyqgis code, and when done I'll share it here. As to the research, sure I've done that, but my question is so simple that I prefer not to bother with the details, since that research conduced me to ask that (plugin, way, script, tool) that I couldn't find.
    – Huan
    Commented May 2, 2018 at 20:42
  • For a better understanding: you want to select a few points and then you want to create line features (with azimuth and length) for this selection? Or do you have point attributes which are holding information about azimuth and distance?
    – Stefan
    Commented May 3, 2018 at 7:32
  • See also: gis.stackexchange.com/questions/258950/…. Especially: gis.stackexchange.com/a/259542
    – Stefan
    Commented May 3, 2018 at 7:37

2 Answers 2


I have answered a question similar to this previously which uses the python console.

See the full answer over here:
How to depict line symbols with length from attribute

Taking an input file (with start location, length, and Azimuth data) the final output looks like:

example output


If you want to know which pyqgis function corresponds to your qgis tool, here is the way :

Run the tool with appropriated parameters once in QGIS.

Go in Geoprocessing > History

You will find the right way to use it with pyqgis.

Good luck !

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