TransWikia.com

Select circular polygons in QGIS

Geographic Information Systems Asked on June 12, 2021

I have a multipolygon layer, in which some geometries are circles, drawn in an unknown GIS. How can I select only those features which are circular? A quick manual check confirms that circular features do not all have the same number of points/vertices.

2 Answers

You could use the field calculator in order to check whether the minimal circle differs much from the actual shape, e.g. by calculating the $area.

if(area(minimal_circle($geometry))<$area*1.05,1,0)

This checks, whether the the area of the minimal circle is smaller than the area of the original geometry times 1.05 (5 % tolerance accounting for different number of vertices) and will select the geometry, if this is the case.

Correct answer by Erik on June 12, 2021

The isoperimetric quotient of a circle in a plane equals 1. You could explode your multipart features. Add a new attribute and calculate the area of your polygons. Add a new attribute and calculate the perimeter of the polygons. Then use the field calculator to generate the IQ of the polygons in the attribute table using this formula:

Q = 4 pi A / P^2

For shapefiles the polygons will never be perfect circles since each will be using points to define the shapes of the polygons but the polygons with IQs closer to 1 will be circles.

Answered by GBG on June 12, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP