2

I have a polygon layer with multiple polygon features drawn on it.

I need a tool that will draw a bounding box around each polygon feature individually. Right now everything I try in the tool box draws a single bounding box that encompasses all the polygon features. Is there such a tool?

  • 1
    Do you have one big multipart polygon? – BERA Jul 4 '18 at 6:02
  • 1
    @BERA You nailed it! (Please see bkg73123's comment to Cushen) – Kazuhito Jul 4 '18 at 14:49
  • Thank you so much! I was using the Bounding Box tool but it was giving me one big box. The iterate function didn't do it either. I had to do the multipart to singlepart tool first and then run the Bounding Box tool without iterate to get the results I needed. NOW I am trying to take the Bounding Boxes it created and Buffer them, but I need them to Buffer like they would a Line with the Flat end cap style. Should I create a new thread for this question or continue it here? When I try and buffer the bounding boxes it buffers them in all direction even if I select Flat end cap style. Thank you! – – bkg73123 Jul 4 '18 at 19:12
5

In the Processing Toolbox (Processing Tab > Toolbox) you will find a tool called Bounding boxes.
This will achieve what you want.

enter image description here

If your layer contains some multipart features you might want to run Multipart to singleparts first (Depending on what output you want.)

Input > Output: enter image description here

| improve this answer | |
  • You need to use the iterate tool (click on the green arrow) to get a bounding box for each polygon. – ahmadhanb Jul 4 '18 at 6:07
  • 1
    Are you sure? I'm running QGIS version 3.0.0-Girona and that is not the case, this tool creates a bounding box for each feature in an input layer. – Cushen Jul 4 '18 at 6:10
  • If the OP needs a separate feature for each bounding box, then clicking on the green arrow will give what he wants. – ahmadhanb Jul 4 '18 at 6:17
  • 1
    That is what the tool does, please try it locally, I have tested it. – Cushen Jul 4 '18 at 6:27
  • 1
    Thank you so much! I was using the Bounding Box tool but it was giving me one big box. The iterate function didn't do it either. I had to do the multipart to singlepart tool first and then run the Bounding Box tool without iterate to get the results I needed. NOW I am trying to take the Bounding Boxes it created and Buffer them, but I need them to Buffer like they would a Line with the Flat end cap style. Should I create a new thread for this question or continue it here? When I try and buffer the bounding boxes it buffers them in all direction even if I select Flat end cap style. Thank you! – bkg73123 Jul 4 '18 at 13:33
3

If you want to have a separate feature class for each bounding box, you need to use the iterate tool (click on the green arrow) to get a bounding box for each polygon.

enter image description here

Without using the iterator, you will get all bounding boxes in one fearture class:

enter image description here

But using the iterator (the green arrow) will produce a bounding box for each polygon individually as a new feature class:

enter image description here

| improve this answer | |

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.