I'm using QGIS 2.18. I have a grid that I need to calculate Azimuth and length for each side. Most have 4 sides but some ( see Gird C below) many more , up to 12.

My process now convert Polygon to lines, then clean the lines to break at the intersections, then calculate the azimuth with the following degrees(azimuth(start_point($geometry), end_point($geometry))) then calculate the length of each line using $length with the field calculator then make a duplicate of the layer , label azimuth on the bottom of the line in red (see below) and then in the second layer label the distance in blue on top of the line (see below) then by hand transfer the data to a spreadsheet, I start in the NW corner and then move clockwise. enter image description here

Any help on how to automate this would be great as I am trying to get into scripting in Q. enter image description here

  • 2
    It seems you can combine the steps of your workflow as processing model, using the graphic modeler. Why do you transfer the data "by hand"? It should be possible to copy/paste the attribute table of your line layer. – Redoute Sep 26 '18 at 18:11

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.