4

The image shown below

From the left polygon to right polygon, May I know how to achieve it by using QGIS?

I have tried the orthogonalized tool in QGIS, but there is no change in shape.

Taras
  • 32,823
  • 4
  • 66
  • 137
user237394
  • 41
  • 2
  • 1
    Do you get any error messages when you use the tool? It could be that your input building is too messy, perhaps try simplifying them first https://gis.stackexchange.com/questions/25914/smoothing-generalizing-polygon-in-qgis then perhaps increase the iterations. – Michael Stimson Jan 19 '24 at 03:54
  • @MichaelStimson, thank you for your reply. I have tried the way you said, but the result is quite not satisfied. May I ask you about the Automated Feature Extraction from LiDAR Orthophoto? Is there any ways to do the AFE by using QGIS? The features that i wanna extract is Building, transportation, hydro and vegetation. I have try the OTB tool and SCP working toolbar. And the output of polygon building and transportation is not in a smooth line. Is it I need to manual edit after the AFE? – user237394 Jan 19 '24 at 04:07
  • 1
    I know very little about automated feature extraction and/or machine learning. Generally this site requires one question per post, if you want to ask about automated feature extraction in QGIS you will need to ask a new question. – Michael Stimson Jan 19 '24 at 04:18
  • @MichaelStimson, Alright thanks, will post a new question. – user237394 Jan 19 '24 at 04:28
  • 3
    That's just a slightly shrinked oriented bouding box. – geozelot Jan 19 '24 at 07:18
  • Or a convex hull – Babel Jan 19 '24 at 07:32

1 Answers1

7

Create the Oriented Bounding box of the polygon with the Oriented minimum bounding box tool or with QGIS expressions (use Geoemtry Generator or Geometry by expression) with this expression (see oriented_bbox()):

oriented_bbox ($geometry)

Orange: initial polygon; blue: created by the expression above: enter image description here


Variant: same area

And, a bit more sophisticated, you can scale the resulting rectangle to get the same area as the input polygon:

with_variable (
    'scale',
    sqrt (area ($geometry) / area (oriented_bbox ($geometry))),
    scale( 
        oriented_bbox ($geometry),
        @scale,
        @scale
    )
)

Blue polygon created by the expression has the same area as the initial orange polygon: enter image description here

Babel
  • 71,072
  • 14
  • 78
  • 208