How can I find polygon's length and width in QGIS (regular polygon and irregular polygon)?

I have area and perimeter but not length and width.

enter image description here

  • 2
    That's very complicated, the length and width of an irregular polygon is something that's easy for a person to discern but very difficult for a computer to establish. For building outlines you could try finding the longest side, rotating based on this side such that the side is flat and then reading the envelope length and width - this will give an answer that may be satisfactory; alternately you could find the longest transverse line as a hypotenuse and use the opposite and adjacent as length and width, again not accurate but might be good enough. – Michael Stimson Apr 23 '14 at 5:53
  • Oh, and I should add that either (or indeed any) option will require some programming. – Michael Stimson Apr 23 '14 at 5:55
  • If it's just several regular polygons you're wanting to find the length and width for then you can use the MEASURE LINE function from the Attributes selection. If you're wanting to do it for a lot of polygons and/or for irregular ones then I think Michael has given good advice. – Joseph Apr 23 '14 at 11:15
  • 1
    Not sure if this would work - but could you not convert the polygons into lines with an identifier, calculate the length of each line. This would give you the length of each of the edges. Depending on the nature of your polygons you could identify the length and width by doing that. You could also use the start and end geometry to figure out which direction the line is going in. Would that work for you? – Neil Benny Apr 28 '14 at 9:36

You could use the "Oriented minimum bounding boxes" first then run the "Polygons to lines" tool.

The output of Polygons to lines will have area, perimeter, angle, width and height of the minimum bounding box already calculated.

These results will be exact for square and rectangular shape and get worse the more your input polygon is irregular....

enter image description here

  • If I have a shapefile with multiple polygons, it only create the bounding box. In this case, what I want is to have the same result but for every polygon, not the entire shapefile. – Roger Almengor Jul 22 '20 at 16:28
  • 1
    @RogerAlmengor either you have used the 'Minimum bounding geometry' algorithm that work on a full layer when you should have used the "Oriented minimum bounding box" that work on each feature, or your polygons are one multipolygon and you need to use the "Multipart to singleparts" algorithm as a first step – J.R Jul 22 '20 at 16:38

ETGeoWizards has the functionality to do this: http://www.ian-ko.com/ET_GeoWizards/UserGuide/polygonCharacteristics.htm#ToolBox_implementation

Your Answer

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

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